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

NRF52 SDK14.0 sd_softdevice_enable() freezes if nrf_drv_clock_lfclk_request() was called before

I am using NRF52 SDK14.0 and SoftDevice S132 v5.0.0. Application freezes somewhere in SoftDevice if sd_softdevice_enable() is called after nrf_drv_clock_lfclk_request() was called before. If using a debugger, you can pause while frozen and if you hit run again, the application continues flawlessly. It seems it is stuck in some strange loop inside SoftDevice. If you are not using nrf_drv_clock_lfclk_request() before starting SoftDevice, everything works just fine.

Parents
  • OK, I've tried to recreate that on ble_app_hrs_freertos example, but here it worked fine for me too. I can't upload my code, but it is complex code with multiple FreeRTOS tasks. It would be a great help if someone with access to softdevice's S132 v5.0.0 code and disassembly could give me a hint, what is happening than PC counter is at address 0xBA24. Just above it at 0xBA22 there is a WFE instruction, and it seems, that CPU waits for some sort of event here, that is never happening and it freezes there until I pause execution and run the program from that point again. After that, no more problems with application occurs.

Reply
  • OK, I've tried to recreate that on ble_app_hrs_freertos example, but here it worked fine for me too. I can't upload my code, but it is complex code with multiple FreeRTOS tasks. It would be a great help if someone with access to softdevice's S132 v5.0.0 code and disassembly could give me a hint, what is happening than PC counter is at address 0xBA24. Just above it at 0xBA22 there is a WFE instruction, and it seems, that CPU waits for some sort of event here, that is never happening and it freezes there until I pause execution and run the program from that point again. After that, no more problems with application occurs.

Children
No Data
Related