|
With the limited information provided we are left to guess. Assume we know nothing about your design beyond what you have actually written/provided.
Is it wired correctly, do you are a circuit diagram for the oscillator section? Crystal or Oscillator? Is it a suitable part, with the correct capacitance/loading? Not working, how? Is it not Starting? XIN/XOUT what voltages? Have you enabled it correctly?
From the manual
8.6.1 Switch from Internal RC Oscillator to the 32768 Hz Crystal To switch from internal RC oscillator to the 32768 Hz crystal, the programmer must execute the following sequence: • Switch the master clock to a source different from slow clock (PLLA or PLLB or Main Oscillator) through the Power Management Controller. • Enable the 32768 Hz oscillator by setting the bit OSCEN to 1. • Wait 32768 Hz startup time for clock stabilization (software loop). • Switch from internal RC to 32768 Hz by setting the bit OSCSEL to 1. • Wait 5 slow clock cycles for internal resynchronization. • Disable the RC oscillator by setting the bit RCEN to 0.
|