The audio oscillator generates clock frequencies suitable for audio applications.
The audio oscillator has the following features:
- Adjustable frequency with 3.3 ppm resolution in two frequency bands - 11.176 MHz to 11.402 MHz, and 12.165 MHz to 12.411 MHz
- Low jitter, suitable for audio applications
- Always uses the HFXO
The HFCLKAUDIO clock generated by the audio oscillator is suitable for use as the source clock in the I2S and PDM audio peripherals. In order to use this clock, it must be selected in the corresponding configuration registers in these peripherals. It is required to trigger the HFCLKAUDIOSTART task before it is used. To stop the HFCLKAUDIO clock, the HFCLKAUDIOSTOP task must be triggered. After triggering this task, the oscillator will be kept running as long as a peripheral is using it.
In applications where the audio data is arriving asynchronously to on-chip clocks, the frequency can be adjusted to stay in sync with the sender. The frequency can be configured in register HFCLKAUDIO.FREQUENCY using one of the following equations.
The acceptable HFCLKAUDIO.FREQUENCY register value ranges for the two frequency bands are listed in the following table.
When switching between the two frequency ranges, the peripherals must be stopped.
| Frequency band | Register value and frequency | ||
|---|---|---|---|
| Min | Center | Max | |
| 11.176 MHz to 11.402 MHz | 12519 (11.176 MHz) |
15298 (11.289 MHz) |
18068 (11.402 MHz) |
| 12.165 MHz to 12.411 MHz | 36834 (12.165 MHz) |
39846 (12.288 MHz) |
42874 (12.411 MHz) |