Why is RESETREAS showing soft reset (x00000004) after reprogramming and running the firmware on nRF52DK (bootloader included)?

Hi,

I am developing a firmware for nRF52832, in which the device reset reason matters. I am reading the RESETREAS register to identify it but I observe something strange to me. If I reprogram the nRF52DK, and run the firmware from the SEGGER Embedded Studio (5.50a), the reset reason is always 0x00000004, i.e. soft reset (bit 2). If I press the reset button on the kit, the register is read as expected - 0x00000001 (reset pin), but again after reprogramming, it shows 0x00000004. Why is that? What am I missing? I also have the bootloader installed. If the bootloader influences the register content, why it doesn't do that when I am pressing the reset button? Is this something related to the usage of the Studio?

Regards

Parents Reply Children
Related