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

nRF52832 NVIC_SetPendingIRQ Crash

Using SDK14.0.0, nRF52832, GCC, GDB/Ozone, secure DFU

This question seems to get close to asking about my problem.

I am trying to debug my application with a loaded using either Ozone or JLinkGDBServer. I followed the advice here in Appendix 1 in order to be able to flash my application without using the DFU, which works just fine. However, using:

JLinkGDBServer -device nRF52832_xxAA -if swd -speed 1000

As my debugger, results in GDB choking when I pause the application and try to jump to main. On the other hand, when using Ozone I can get some use out of debugging, but after using the "Download and Reset Program" option the nRF seems to halt after running this line:

NVIC->ISPR[(((uint32_t)(int32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL));

The strange part is that it only crashes at this point after a fresh reprogramming; if I use the "Reset Program to Main" button at any point the nRF wont have any issues at the listed line. My code is based off of the Secure Buttonless DFU example, and it crashes in the power_management_init() function.

I'm not sure what's causing this, debugging with GDB would be ideal. Any advice would be appreciated!

Parents
  • Hi,

    It’s probably caused by how Ozon is handling the “Download and Reset Program” in combination with the SoftDevice, i.e. it’s not starting the application in a stream-lined fashion.


    Note that we have now released SDK 14.1, where we have added support for Segger Embedded Studio (SES) IDE. You can use Segger Embedded Studio for commercial and non-commercial purpose with Nordic Semiconductor devices free of charge without any code limit. This could be a better option for you than your current toolchain setup. See this article for more information.

    You can download SDK 14.1 here.

    You can download Segger Embedded Studio from here.

Reply
  • Hi,

    It’s probably caused by how Ozon is handling the “Download and Reset Program” in combination with the SoftDevice, i.e. it’s not starting the application in a stream-lined fashion.


    Note that we have now released SDK 14.1, where we have added support for Segger Embedded Studio (SES) IDE. You can use Segger Embedded Studio for commercial and non-commercial purpose with Nordic Semiconductor devices free of charge without any code limit. This could be a better option for you than your current toolchain setup. See this article for more information.

    You can download SDK 14.1 here.

    You can download Segger Embedded Studio from here.

Children
Related