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

Zigbee Light Switch Example running with internal RC

Is it possible to run the Zigbee Light Switch example with the internal RC.?

On the sdk_config.h I have changed the following:

#define NRFX_CLOCK_CONFIG_LF_SRC 0

But the device will get stuck at ZB_INIT() call, specifically on this function:

Any help is most welcome!

Thanks

Parents
  • Hi Ignacio

    You're absolutely right. Sorry, been a while since I looked into Zigbee and forgot it doesn't use the SoftDevice. I have edited my previous reply to avoid confusion for people with the same problem in the future, it should not reflect what defines you need to change in order to enable the RC clock.

    It seems like you have to do the calibration process of the RC clock manually when the SoftDevice isn't enabled, so you will have to use a timer (app_timer or a TIMER) and call the nrf_drv_clock_calibration_start (check out nrf_drv_clock.h for more info on the calibration functions) every 4-8 seconds in order to ensure that the RC clock stays calibrated.

    Best regards,

    Simon

Reply
  • Hi Ignacio

    You're absolutely right. Sorry, been a while since I looked into Zigbee and forgot it doesn't use the SoftDevice. I have edited my previous reply to avoid confusion for people with the same problem in the future, it should not reflect what defines you need to change in order to enable the RC clock.

    It seems like you have to do the calibration process of the RC clock manually when the SoftDevice isn't enabled, so you will have to use a timer (app_timer or a TIMER) and call the nrf_drv_clock_calibration_start (check out nrf_drv_clock.h for more info on the calibration functions) every 4-8 seconds in order to ensure that the RC clock stays calibrated.

    Best regards,

    Simon

Children
  • Hi Simonr,

    Thanks for the update. That was really helpful.

    I have set the below flag as indicated:

    #define CLOCK_CONFIG_LF_CAL_ENABLED 1

    That seems to be the main issue. I have flashed the device with the updated code and it has been working fine for good while.  Is it strictly required to manually calibrate the RC clock? Would it be a connection issue if RC clock is not manually calibrated?

    Thanks

Related