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

NRF51822 Get reset every time it hits the breakpoint

I have no idea what is going on.

I am using IAR 7.8 and as I wrote, it gets reset when it hit the breakpoint. every variable return to its initial value, and BLE get disconnected and advertising start.

Please help. Thank you.

Parents
  • Hi,

    The BLE link will get disconnected when hitting a breakpoint, because the CPU will be halted, and the radio will therefore not be able to transmit the necessary BLE packets to keep the connection alive. The link will get disconnected after a timeout given in the connect request (or a connection parameter update).

    If you want to do any debugging while in an active BLE connection, I would recommend turning on the logging module (nrf_log), and log messages using NRF_LOG_INFO(). Then use UART or Segger RTT to view the log.


    Note: On the nRF52 series we have something called monitor mode debugging that can be used, but this is unfortunately not available on the nRF51-sereis(The ARM Cortex-M0 core does not support it)

Reply
  • Hi,

    The BLE link will get disconnected when hitting a breakpoint, because the CPU will be halted, and the radio will therefore not be able to transmit the necessary BLE packets to keep the connection alive. The link will get disconnected after a timeout given in the connect request (or a connection parameter update).

    If you want to do any debugging while in an active BLE connection, I would recommend turning on the logging module (nrf_log), and log messages using NRF_LOG_INFO(). Then use UART or Segger RTT to view the log.


    Note: On the nRF52 series we have something called monitor mode debugging that can be used, but this is unfortunately not available on the nRF51-sereis(The ARM Cortex-M0 core does not support it)

Children
No Data
Related