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

Reset on_ble_connect when button event

Hello,

my problem is reproducable with this Setup:

  • nRF5-DK with ble_blinky_example (central)
  • nRF5-DK with ble_blinky_example (peripheral)
  • Press Button1 immediately on the peripheral after connecting (LED2 lights up).
  • watch how the peripheral goes back to Advertising (resets)
  • Press Button1 after the Connection is established a while, everything works fine.

 When the button_event_handler() is empty, the devices stay connected. What causes this and how to avoid it?

Kind regards,

DanKA

  • Hi Dan,

    It is quite easy to debug set a breakpoint at the app_error_handler and see which line caused this error.

    The answer I gave you in my last post is a fix for one bug we saw. And I realized it within few minutes of setting the breakpoint at everyplace in project that has NVIC_SystemReset();

    Please start your project in debug mode and see why the call stack when you see that your breakpoint is hit.

Related