This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF52832 Internal Oscillator Softdevice Enable Hanging

I'm using the nRF52832 chip without an external crystal. I configured it to use the internal RC with:

nrf_clock_lf_cfg_t clock_lf_cfg;
clock_lf_cfg.source = NRF_CLOCK_LF_SRC_RC;
clock_lf_cfg.rc_ctiv = 16;
clock_lf_cfg.rc_temp_ctiv = 2;
clock_lf_cfg.xtal_accuracy = 0;

// Initialize SoftDevice.
SOFTDEVICE_HANDLER_APPSH_INIT(&clock_lf_cfg, true);

However, the device seems to be hanging upon enabling the SoftDevice. When going through with a debugger, it just jumps to address 0 continuously. I have the Monitor Mode debugging set up based on the blog post, so I wouldn't think that would be the issue.

Am I doing something wrong in configuring the Softdevice to use the Internal RC?

Parents
  • Have you tried starting it without the app scheduler? I haven't ever used the scheduler but my understanding is that it only affects the way interrupts are handled and provides more resources to main. Assuming you aren't running gobs of code in handlers, you should get plenty of time back at main to run housekeeping even without the scheduler.

    So try:

    #define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_RC,
    .rc_ctiv = 16,
    .rc_temp_ctiv = 0}

    nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;

    SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);

Reply
  • Have you tried starting it without the app scheduler? I haven't ever used the scheduler but my understanding is that it only affects the way interrupts are handled and provides more resources to main. Assuming you aren't running gobs of code in handlers, you should get plenty of time back at main to run housekeeping even without the scheduler.

    So try:

    #define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_RC,
    .rc_ctiv = 16,
    .rc_temp_ctiv = 0}

    nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;

    SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);

Children
No Data
Related