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

S112 crash at address 0x18808

Hi,

On a dice projet based on NRF52810. Sometime when I plug the battery charger the firmware crash at address 0x18808 and the call stack is empty !

This address is in softdevice , and I can't determine the cause !

SDK 16.0

Softdevice version: s112_nrf52_7.0.1_softdevice.hex

Please can you explain what is the function at 0x18808 address ?

Regards,

Gaétan

Parents
  • Hi,

    The batterie charger is :

    I have found a current injection on a pin "LED" connected directly to nrf52810.

    When bootloader software is present -> sometime  fix at adresse 0x18808

    When bootloader software is not in flash -> sometime  firmwre restart

    Now I make multiple tests with nRF52810 pin forced to ouput whith high current configuration...

    Regards,

    Gaétan

    EDIT:

    Now, without charger...

    I allways have the same fix at address 0x18808 when I connected to NUS !

    Last log is : <info> app: Data len is set to 0xB6(182)

    NrfToolBox: 

    With s112_nrf52_7.3.0_softdevice.hex address is 0x188D4

    EDIT 2:

    When I put the firmware compiled for nRF52810 directly in a PCA10040 (NnRF52832) all is OK no fix but in a nRF52810 allways fix when etablish a NUS connection. No problem when using DFU service. 

  • Hi Gaetan, 

    Could you please confirm that even without the charger you still have the issue when you are trying to connect with NUS ? 

    Could you check if you have any log on the device ? Any assertion ? Could you send the full log ?
    If you test with unmodified NUS example do you have the same issue  ? 

  • Hi,

    Yes, without charger, we have the issue when I try to connect with NUS (nRFToolBox)

    Please found the log on device:

    I have no tested with NUS example because if DFU service is not initialized ->all is OK !

    static void services_init(void)
    {
        uint32_t           err_code;
        ble_nus_init_t     nus_init;
        nrf_ble_qwr_init_t qwr_init = {0};
    
    #ifdef WITH_DFU
    
        ble_dfu_buttonless_init_t dfus_init =
        {
            .evt_handler = ble_dfu_evt_handler
        };
    
        // Initialize the async SVCI interface to bootloader.
        err_code = ble_dfu_buttonless_async_svci_init();
    #ifndef DEBUG
        //En DEBUG on a pas le bootloader, il est donc normal d'avoir une erreur
        APP_ERROR_CHECK(err_code);
    #endif
    
        err_code = ble_dfu_buttonless_init(&dfus_init);
        APP_ERROR_CHECK(err_code);
    
    #endif
    
        // Initialize Queued Write Module.
        qwr_init.error_handler = nrf_qwr_error_handler;
    
        err_code = nrf_ble_qwr_init(&m_qwr, &qwr_init);
        APP_ERROR_CHECK(err_code);
    
        // Initialize NUS.
        memset(&nus_init, 0, sizeof(nus_init));
    
        nus_init.data_handler = nus_data_handler;
    
        err_code = ble_nus_init(&m_nus, &nus_init);
        APP_ERROR_CHECK(err_code);
    }
     

    Firmware: BL+Settings+App+SD.zip

  • Hi, 
    I noticed that there is a log saying "error : No bootloader was found" 
    Is this log with or without bootloader ? 
    How did you create the bootloader for nRF52810? 

Reply Children
  • Yes, with or without bootlader in memory, this the same.

    Bootloader source files:secure_bootloader_ble.zip

  • Please step into the nrf_dfu_svci_vector_table_set() function in your application and check why it says "error : No bootloader was found" 
    Without properly detecting the bootloader the application will fail when there is any activity related to the bootloader. It's most likely the reason of the crash. 

    To be able to detect the bootloader, either the bootloader address need to be written in to MBR or into UICR.


  • The issue is the same with the bootloader installed or not.

    Please look my code. APP_ERROR_CHECK is comment for my dev in DEBUG...

        // Initialize the async SVCI interface to bootloader.
        err_code = ble_dfu_buttonless_async_svci_init();
    #ifndef DEBUG
        //En DEBUG on a pas le bootloader, il est donc normal d'avoir une erreur
        APP_ERROR_CHECK(err_code);
    #endif

    SoftDevice is always loaded and I have make a lot of projects with SD and bootloader and I always use this code...

    Please can you run the firmare in a nRF52810 and check the crash at 0x18808 or 0x188D4 ?

  • Hi Gaetan, 

    The error at 0x18808 and 0x188D4 pointing us to the hardfault handler in the softdevices. 

    I know that it's the same with or without the bootloader. But from what I can see even with the bootloader installed you still receive "error : No bootloader was found" , is this correct ? 

    Please confirm if you test the NUS example without the DFU buttonless service implemented you don't have any issue. 

    If you don't flash the application did the softdevice + bootloader works (can do DFU ) ?

    If it's the case, please send us your bootloader project file so we can compile here, as well as the NUS + DFU buttonless project. 

  • I know that it's the same with or without the bootloader. But from what I can see even with the bootloader installed you still receive "error : No bootloader was found" , is this correct ? 

    No, when I have bootaloder, I don't have the message "error : No bootloader was found". All is ok with bootloader.

    Please confirm if you test the NUS example without the DFU buttonless service implemented you don't have any issue. 

    I confirm, all is ok with NUS example.

    If you don't flash the application did the softdevice + bootloader works (can do DFU ) ?

    I all is OK

    Here this Bootloader + Application + Sodtdevice with services (NUS +DFU) If you connect to NUS -> crash in softdevice

    I send all source file in private message...

Related