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

Softdevice assertion failed after some time of advertisment without event

Hello,

I've a very strange problem with the nrf52838 chip in the ISP4520 (https://www.insightsip.com/products/combo-smart-modules/isp4520).

The nrf52832 advertise all the time and after some time the softdevice assert an error. I have a watchdog so the device reeboot all the time.

The restart comes after 2h10 with an advertisement interval of 3000 (so 1875ms) and after 10min with advertisement interval of 32 (so 20ms). I don't find any parameter which correct my problem... This is my initialisation :

#define APP_ADV_INTERVAL                32
#define BLE_UUID_DEVICE_SHORT           0X1900
static uint8_t serial_number[8];
static ble_advdata_manuf_data_t m_advdata_manuf_data;
static ble_uuid_t m_adv_uuids[] =                                               /**< Universally unique service identifiers. */
{
    {BLE_UUID_DEVICE_SHORT, BLE_UUID_TYPE_BLE}
};

static void advertising_init(void)
{
    ret_code_t             err_code;
    ble_advertising_init_t init;

    memset(&init, 0, sizeof(init));

    init.advdata.name_type               = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance      = false;
    init.advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    init.advdata.uuids_complete.p_uuids  = m_adv_uuids;
    init.advdata.p_manuf_specific_data	 = &m_advdata_manuf_data;

    lmh_devEui_get(serial_number);
    m_advdata_manuf_data.company_identifier = 0xFFFE;
    m_advdata_manuf_data.data.size = sizeof(serial_number);
    m_advdata_manuf_data.data.p_data = serial_number;

    init.config.ble_adv_on_disconnect_disabled = true;
    init.config.ble_adv_fast_enabled  = true;
    init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
    init.config.ble_adv_fast_timeout  = BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED;

    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&m_advertising, &init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&m_advertising, APP_BLE_CONN_CFG_TAG);
}

While nrf52832 advertise, there is no event exept ble event. 

With the debug mode, the softdevice assert at Pc 0x00014CBC. I use the sdk 16.0.

Can anyone help me with this problem ?

Valentin

Parents
  • I have some good news, I think I found the bug and it's about the watchdog driver… I comment this part of my code and now there is no more reset. This was my WDT conf :

    // <e> NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver
    //==========================================================
    #ifndef NRFX_WDT_ENABLED
    #define NRFX_WDT_ENABLED 1
    #endif
    // <o> NRFX_WDT_CONFIG_BEHAVIOUR  - WDT behavior in CPU SLEEP or HALT mode
     
    // <1=> Run in SLEEP, Pause in HALT 
    // <8=> Pause in SLEEP, Run in HALT 
    // <9=> Run in SLEEP and HALT 
    // <0=> Pause in SLEEP and HALT 
    
    #ifndef NRFX_WDT_CONFIG_BEHAVIOUR
    #define NRFX_WDT_CONFIG_BEHAVIOUR 8
    #endif
    
    // <o> NRFX_WDT_CONFIG_RELOAD_VALUE - Reload value  <15-4294967295> 
    
    
    #ifndef NRFX_WDT_CONFIG_RELOAD_VALUE
    #define NRFX_WDT_CONFIG_RELOAD_VALUE 2000
    #endif
    
    // <o> NRFX_WDT_CONFIG_NO_IRQ  - Remove WDT IRQ handling from WDT driver
     
    // <0=> Include WDT IRQ handling 
    // <1=> Remove WDT IRQ handling 
    
    #ifndef NRFX_WDT_CONFIG_NO_IRQ
    #define NRFX_WDT_CONFIG_NO_IRQ 1
    #endif
    
    // <o> NRFX_WDT_CONFIG_IRQ_PRIORITY  - Interrupt priority
     
    // <0=> 0 (highest) 
    // <1=> 1 
    // <2=> 2 
    // <3=> 3 
    // <4=> 4 
    // <5=> 5 
    // <6=> 6 
    // <7=> 7 
    
    #ifndef NRFX_WDT_CONFIG_IRQ_PRIORITY
    #define NRFX_WDT_CONFIG_IRQ_PRIORITY 6
    #endif
    
    // <e> NRFX_WDT_CONFIG_LOG_ENABLED - Enables logging in the module.
    //==========================================================
    #ifndef NRFX_WDT_CONFIG_LOG_ENABLED
    #define NRFX_WDT_CONFIG_LOG_ENABLED 0
    #endif
    // <o> NRFX_WDT_CONFIG_LOG_LEVEL  - Default Severity level
     
    // <0=> Off 
    // <1=> Error 
    // <2=> Warning 
    // <3=> Info 
    // <4=> Debug 
    
    #ifndef NRFX_WDT_CONFIG_LOG_LEVEL
    #define NRFX_WDT_CONFIG_LOG_LEVEL 3
    #endif
    
    // <o> NRFX_WDT_CONFIG_INFO_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NRFX_WDT_CONFIG_INFO_COLOR
    #define NRFX_WDT_CONFIG_INFO_COLOR 0
    #endif
    
    // <o> NRFX_WDT_CONFIG_DEBUG_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NRFX_WDT_CONFIG_DEBUG_COLOR
    #define NRFX_WDT_CONFIG_DEBUG_COLOR 0
    #endif
    
    // </e>
    
    // </e>

    I try to change initialized value, can you help me about this ?

    Valentin

Reply
  • I have some good news, I think I found the bug and it's about the watchdog driver… I comment this part of my code and now there is no more reset. This was my WDT conf :

    // <e> NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver
    //==========================================================
    #ifndef NRFX_WDT_ENABLED
    #define NRFX_WDT_ENABLED 1
    #endif
    // <o> NRFX_WDT_CONFIG_BEHAVIOUR  - WDT behavior in CPU SLEEP or HALT mode
     
    // <1=> Run in SLEEP, Pause in HALT 
    // <8=> Pause in SLEEP, Run in HALT 
    // <9=> Run in SLEEP and HALT 
    // <0=> Pause in SLEEP and HALT 
    
    #ifndef NRFX_WDT_CONFIG_BEHAVIOUR
    #define NRFX_WDT_CONFIG_BEHAVIOUR 8
    #endif
    
    // <o> NRFX_WDT_CONFIG_RELOAD_VALUE - Reload value  <15-4294967295> 
    
    
    #ifndef NRFX_WDT_CONFIG_RELOAD_VALUE
    #define NRFX_WDT_CONFIG_RELOAD_VALUE 2000
    #endif
    
    // <o> NRFX_WDT_CONFIG_NO_IRQ  - Remove WDT IRQ handling from WDT driver
     
    // <0=> Include WDT IRQ handling 
    // <1=> Remove WDT IRQ handling 
    
    #ifndef NRFX_WDT_CONFIG_NO_IRQ
    #define NRFX_WDT_CONFIG_NO_IRQ 1
    #endif
    
    // <o> NRFX_WDT_CONFIG_IRQ_PRIORITY  - Interrupt priority
     
    // <0=> 0 (highest) 
    // <1=> 1 
    // <2=> 2 
    // <3=> 3 
    // <4=> 4 
    // <5=> 5 
    // <6=> 6 
    // <7=> 7 
    
    #ifndef NRFX_WDT_CONFIG_IRQ_PRIORITY
    #define NRFX_WDT_CONFIG_IRQ_PRIORITY 6
    #endif
    
    // <e> NRFX_WDT_CONFIG_LOG_ENABLED - Enables logging in the module.
    //==========================================================
    #ifndef NRFX_WDT_CONFIG_LOG_ENABLED
    #define NRFX_WDT_CONFIG_LOG_ENABLED 0
    #endif
    // <o> NRFX_WDT_CONFIG_LOG_LEVEL  - Default Severity level
     
    // <0=> Off 
    // <1=> Error 
    // <2=> Warning 
    // <3=> Info 
    // <4=> Debug 
    
    #ifndef NRFX_WDT_CONFIG_LOG_LEVEL
    #define NRFX_WDT_CONFIG_LOG_LEVEL 3
    #endif
    
    // <o> NRFX_WDT_CONFIG_INFO_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NRFX_WDT_CONFIG_INFO_COLOR
    #define NRFX_WDT_CONFIG_INFO_COLOR 0
    #endif
    
    // <o> NRFX_WDT_CONFIG_DEBUG_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NRFX_WDT_CONFIG_DEBUG_COLOR
    #define NRFX_WDT_CONFIG_DEBUG_COLOR 0
    #endif
    
    // </e>
    
    // </e>

    I try to change initialized value, can you help me about this ?

    Valentin

Children
No Data
Related