Hi,
I have a custom board with an external crystal at 32 MHz. How should I configure the clock using nRF Connect SDK 2.5.0, so it can use external crystal?
Thank you
Hi,
I have a custom board with an external crystal at 32 MHz. How should I configure the clock using nRF Connect SDK 2.5.0, so it can use external crystal?
Thank you
Hi,
If you are using one of the protocol stacks from Nordic that uses the radio (Bluetooth, Thread, Zigbee, etc), the protocol stack will automatically start the external 32 MHz crystal when it is needed, as this clock source is required for reliable operation of the radio.
If you want to have the clock running in the application, you can request it as suggested by wmuees or through the function mpsl_clock_hfclk_request() if you have a protocol stack enabled. Note that HFXO will increase the current consumption of the chip quite a bit when it is running, so it is normally only recommended to run it when you require the increased accuracy of the HFCLK compared to using the HFINT source (which is used by default whenever the HFXO is not explicitly started).
Best regards,
Jørgen
Note that the BLE stack uses the 32 MHz XTAL only when needed, resulting in an on/off/on/off usage pattern. This will give you a jitter in the clock signal and all clock controlled outputs (PWM etc..)
Requesting a constant 32MHz XTAL running will increase your current about 100uA.
Note that mpsl_clock_hfclk_request() should not be used with a clock manager.
Note that the BLE stack uses the 32 MHz XTAL only when needed, resulting in an on/off/on/off usage pattern. This will give you a jitter in the clock signal and all clock controlled outputs (PWM etc..)
Requesting a constant 32MHz XTAL running will increase your current about 100uA.
Note that mpsl_clock_hfclk_request() should not be used with a clock manager.