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

Simple question about S110 soft device App Timeout

Hello

Just few quick questions. What happens to the S110 Softdevice after the APP_ADV_TIMEOUT_IN_SECONDS period? I'm using the nRF51 DK and the ble UART example and I want the board to do a soft-reset after the advertising time-out occurs, how do I do this?

Thanks

Parents
  • Hi,

    Most of our examples will stop advertising after 3 minutes by default, and then go to system-off mode. This is the deepest power saving mode the system can enter. System-off mode is documented in Chapter 12.1.5 in Reference manual V3.0. To achieve what you want you can try to add something like this in the on_ble_evt() function in main.c:

    case BLE_GAP_EVT_TIMEOUT:    
        if(p_ble_evt->evt.gap_evt.params.timeout.src == BLE_GAP_TIMEOUT_SRC_ADVERTISING)
        {
            // Do a soft reset
            sd_nvic_SystemReset();
        }
        else
        {
            // Do something else.
        }
    
Reply
  • Hi,

    Most of our examples will stop advertising after 3 minutes by default, and then go to system-off mode. This is the deepest power saving mode the system can enter. System-off mode is documented in Chapter 12.1.5 in Reference manual V3.0. To achieve what you want you can try to add something like this in the on_ble_evt() function in main.c:

    case BLE_GAP_EVT_TIMEOUT:    
        if(p_ble_evt->evt.gap_evt.params.timeout.src == BLE_GAP_TIMEOUT_SRC_ADVERTISING)
        {
            // Do a soft reset
            sd_nvic_SystemReset();
        }
        else
        {
            // Do something else.
        }
    
Children
Related