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

Button 1-2 resets nRF51-DK

I am trying to set up a GPIO interrupt, and found that whenever Button 1 is pressed, if Button 1 or 2 is pressed later, the app will reset. This is even if there is any other buttons are pressed in between the two button presses. For example:

  • Pressing 1-1 resets the app
  • Pressing 1-2 resets the app
  • Pressing 1-3-4-3-3-4-2 resets the app

And I am not even setting GPIO button interrupt on Button 1 or 2. I am setting it up on Button 4. The application I am trying to add the button features to is based off the ble_app_uart example. Is this some kind of backdoor implemented by default in the nRF51-DK, or in the ble_app_uart example?

Parents
  • The softdevice could reset the chip, the hardfault handler could reset it and none of those would show up in a project wide system search for nvic_systemreset. There's only 3 options here, either a soft reset is being requested by something writing the register, error handler, hardfault handler, softdevice etc .., the reset pin is being pulled low or it's resetting because power was removed and replaced due to an electrical issue.

    Wy don't you clear the RESETREAS (by writing 0xffffffff) to it, then breakpoint in main() and find out after you get reset what the reason was.

    Or put a data breakpoint to find out when the register is written to (I think that ought to work).

Reply
  • The softdevice could reset the chip, the hardfault handler could reset it and none of those would show up in a project wide system search for nvic_systemreset. There's only 3 options here, either a soft reset is being requested by something writing the register, error handler, hardfault handler, softdevice etc .., the reset pin is being pulled low or it's resetting because power was removed and replaced due to an electrical issue.

    Wy don't you clear the RESETREAS (by writing 0xffffffff) to it, then breakpoint in main() and find out after you get reset what the reason was.

    Or put a data breakpoint to find out when the register is written to (I think that ought to work).

Children
No Data
Related