This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52832 Crystal frequency

The manual clearly states that the external HFXO should be 32MHz. However, if one would like to have precise 16kHz on the PDM and I2S interfaces a 32.768MHz crystal is required.

So, will things start to fail/degrade if I use a 32.768MHz crystal instead ?

  • The manual not only states the crystal must be 32MHz it also gives you the allowable tolerances for 2.4GHz and BLE applications at 60 and 40ppm respectively. So no you cannot use a crystal of 32.768MHz or anything like it unless you're not using the radio at which point .. why are you using the NRF52832.

  • You are confusing the 32.768kHz crystal with the 32MHz crystal. So that is kilohertz vs. megahertz.

    The 32.768kHz crystal drives the RTC and normally sleep/wake functions of the nRF.

    The 32MHz crystal is the frequency reference for the 2.4GHz radio and is required for radio operations. It is also generally the frequency reference for the processor. However there is also an internal RC based 32MHz oscillator that can be used to run the processor and peripherals. It uses less power than the external crystal and is the default for most application level work unless the accuracy of the external crystal is required.

    32MHz not kilohertz is the reference for the PDM and i2s. But if you for some reason choose to run off of the internal RC 32MHz the accuracy is not great. Therefore it is best to run off the 32MHz external crystal.

  • You should review page 457 of the nRF52832 spec which discusses the 32MHz clock and the frequencies of the i2s port:

    A RW MCKFREQ Master clock generator frequency. 32MDIV2 0x80000000 32 MHz / 2 = 16.0 MHz

    32MDIV3 0x50000000 32 MHz / 3 = 10.6666667 MHz

    32MDIV4 0x40000000 32 MHz / 4 = 8.0 MHz

    32MDIV5 0x30000000 32 MHz / 5 = 6.4 MHz

    32MDIV6 0x28000000 32 MHz / 6 = 5.3333333 MHz

    32MDIV8 0x20000000 32 MHz / 8 = 4.0 MHz

    32MDIV10 0x18000000 32 MHz / 10 = 3.2 MHz

    32MDIV11 0x16000000 32 MHz / 11 = 2.9090909 MHz

    32MDIV15 0x11000000 32 MHz / 15 = 2.1333333 MHz

    32MDIV16 0x10000000 32 MHz / 16 = 2.0 MHz

    32MDIV21 0x0C000000 32 MHz / 21 = 1.5238095

    32MDIV23 0x0B000000 32 MHz / 23 = 1.3913043 MHz

    32MDIV30 0x08800000 32 MHz / 30 = 1.0666667 MHz

    32MDIV31 0x08400000 32 MHz / 31 = 1.0322581 MHz

    32MDIV32 0x08000000 32 MHz / 32 = 1.0 MHz

    32MDIV42 0x06000000 32 MHz / 42 = 0.7619048 MHz

    32MDIV63 0x04100000 32 MHz / 63 = 0.5079365 MHz

    32MDIV125 0x020C0000 32 MHz / 125 = 0.256 MHz

  • Hi all !

    Thank you for your input. Some clarifications:

    1. I do mean the 32MHz, not the 32.768kHz.
    2. To the PDM input I want to connect a device which only accepts a 1.024MHz clock. If I feed it with 1.032MHz (i.e. 32MHz/(31*64bits) = 16129..Hz) i experience audio artifacts.
    3. I use a proprietay radio protocol, i.e. I'm not bound by any BLE(or similar) timing requirements.

    But, If I understand you correctly, the radio as such requires an exact 32MHz to function properly regardless of the transmission protocol used. Correct ?

    \Eric

  • yes - as in the spec, 32MHz +/- 60ppm for using the radio (non BLE). The radio uses the crystal to generate the correct frequencies.

Related