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
  • if the break point is greyed out then that probably indicates that's not the error handler compiled into your application. If that's not the one compiled in, defining DEBUG won't help. So that's the first thing to figure out, what app error handler is called from the app error check macro. Find it, put a breakpoint in it and force an app error check until you can hit your own debug point.

    There are few other things which would cause a chip reset. A bad error would go to the hardfault handler (but you should go see what that one does too, perhaps that also resets the chip), pulling the reset line low would do it.

Reply
  • if the break point is greyed out then that probably indicates that's not the error handler compiled into your application. If that's not the one compiled in, defining DEBUG won't help. So that's the first thing to figure out, what app error handler is called from the app error check macro. Find it, put a breakpoint in it and force an app error check until you can hit your own debug point.

    There are few other things which would cause a chip reset. A bad error would go to the hardfault handler (but you should go see what that one does too, perhaps that also resets the chip), pulling the reset line low would do it.

Children
No Data
Related