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

nrf_pwr_mgmt_run not returning

Hi,

I have the nRF52DK setup with SES. I can build the example ble_peripheral projects and I can run them in the debugger without any issues.

I also have a Telit BlueDev+S50 development board (which contains a Telit Bluemod+S50 module, which itself contains a nRF52832) that I have connected to the nRF52DK board via the JTAG connector. I can program and debug the BlueDev+S50 board without any problems.

The issue I have is running on the BlueDev+S50. When the execution got to the sd_softdevice_enable() function call, this function would not return. After searching online, I found that by enabling the 32kHz clock before calling this function (with the following code) allowed the function to return:

NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSTAT_SRC_Xtal << CLOCK_LFCLKSTAT_SRC_Pos);
NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
NRF_CLOCK->TASKS_LFCLKSTART = 1;
while(NRF_CLOCK->EVENTS_LFCLKSTARTED == 0)
;
NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;

Also, changing to the LF RC oscillator worked.

We will be developing our own hardware using the BlueMod+S50 and I wanted to know if this is a hardware issue and maybe something that can be avoided in the new product as it feels like a bit of a hack. I would like to know the reason this is extra code seems to be required.

Thanks

Pete

Parents
  • Hi Pete,

    Sorry, I read through the question a bit fast and just assumed it was the usual problem with using the wrong clock settings. The Softdevice is doing the same thing as you code except that it enters System ON while waiting for the crystal to ramp up. And I don't think I have seen this problem before where you have to "manually" start the crystal before calling sd_enabled(). Do the BLE peripheral projects seem to function normally when you add the code to start the LF crystal? E.g., if you can connect to it, etc. 

    Best regards,

    Vidar

Reply
  • Hi Pete,

    Sorry, I read through the question a bit fast and just assumed it was the usual problem with using the wrong clock settings. The Softdevice is doing the same thing as you code except that it enters System ON while waiting for the crystal to ramp up. And I don't think I have seen this problem before where you have to "manually" start the crystal before calling sd_enabled(). Do the BLE peripheral projects seem to function normally when you add the code to start the LF crystal? E.g., if you can connect to it, etc. 

    Best regards,

    Vidar

Children
No Data
Related