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

ble_app_uart NRF_BREAKPOINT_COND SDK_15.0.0

Hi,

I'm using nRF52832 with SDK 15.0.0 base on ble_app_uart example. But I meet a very strange problem. The project couldn't run after I program, no matter I use IAR or nRFgo to program. it runs to the NRF_BREAKPOINT_COND when I debug it. What reason would lead to this problem?

Thanks.

  • I was able to recreate this error by pressing button 1, and the bsp_event_handler(..) (callback function called from detection_delay_timeout_handler(..)) was called along with a BSP_EVENT_SLEEP event. Then the function sleep_mode_enter() will be called and put the chip to system OFF through the function sd_power_system_off()

    In debug mode, system OFF does not work. Instead, sd_power_system_off() will return an error, jump to the next line and eventually to the error fault handler.

        err_code = sd_power_system_off();
        APP_ERROR_CHECK(err_code); // This line will be executed in debug mode

    You can get around it by changing the lines above, to this:

       (void) sd_power_system_off();
        while(1);
        APP_ERROR_CHECK(err_code);

    I am not sure why the button handler function is invoked in your case. Do you use a custom board? The buttons on the Development Kit for the nRF are active low, which means that the button is activated when connected to ground. Are you connecting button 1 to ground?

    Best regards Simon

  • I use a board PCA10040 V1.2.1.  

    Yes, I connect the button 1 to the ground. 

    I noticed the following. 

    If you apply voltage to the Board and wait 10 minutes. After 10 minutes, you will not be able to connect to the device. Smartphone does not find Nordic_UART. Led1 stops blinking. 

  • I suspect the new error you are referring to is due to the timeout of the device after a given amount of time, thus the advertising will stop and the device go to sleep.

     Inside advertising_init(..) in the main file, the following line will set the timeout time (in units of 10 millisecond):

    init.config.ble_adv_fast_timeout  = APP_ADV_DURATION;

    When the timeout happens, and the advertising stops, a BLE_ADV_EVT_IDLE event will happen. Then the device will be put to sleep, and you wont be able to connect to it.

    You can solve this by setting the APP_ADV_DURATION define equal to a really large number, e.g. 3600 00 (1 hour).

    Best regards, Simon

Related