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

NRF52832 Crashing after sending Notification

Hi All,

I am developing an application with a custom BLE profile, one in which i would like to notify the central of certain values as soon as they connect. I have built the app such that once the user subscribes to the notifications, they are immediately notified of the values for the characteristic.  My problem is that immediately after I send the notification the program jumps to "unknown function at 0x000008c8". I've looked around a bit and i gathered that this is happening because of a softdevice assertion, is that correct?

I have tried to set breakpoints to get more info but i can't seem to get anything helpful. The problem occurs anytime i send a notification, although it is not directly after the sd_ble_gatts_hvx call, i can get a few stack calls away from that and then I lose the thread and I'm in no man's land. 

It might also be worth mentioning that I am using the RNG peripheral on the chip and I' not using the recommended sd_rand functions to access the values because they were not generating any values for me. I'm not sure if this would affect the softdevice in the aforementioned way.

this is what is shown in the disassembly when the error occurs. nothing is in the call stack except this address. I'm using softdevice s132 v. 5.0, and SDK14.2 on the NRF52 DK.

 

Any and all help is appreciated!

Patrick

Parents
  • Hello Patrick,

     

    It might also be worth mentioning that I am using the RNG peripheral on the chip and I' not using the recommended sd_rand functions to access the values because they were not generating any values for me. I'm not sure if this would affect the softdevice in the aforementioned way.

     It is not unlikely that this is what's causing the problems. How did you try to use the softdevice implementation for the random number generations, and what was it that didn't work?

  • I have made some more headway on the possible problem. After setting some breakpoints I can see that the sd_ble_gatts_hx() function is returning err_code 0x0C indicating that my data size transmission however I am only transmitting 16 bytes, well within the 20 byte MTU size when accounting for the opcode and handle length. Any ideas?

Reply Children
No Data
Related