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
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.
Hi, Could you please advise, I have a board without an external low-frequency crystal, only with a high-frequency one. I opened the Beacon example; do I need to perform any actions to ensure its proper functionality on my board? If I add the parameter CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to proj.conf, the code works, but the phone cannot detect the device. Without it code just freezes.
I've been discussing this issue : Case ID: 319143