This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

S140 bootloader,no timeout?

Hi,

I use the bootloader in the SDK V13.0, I found that no timeout as the SDK v12.x. However, I have added the WDT to the bootloader refer to the link link text it still stay at the bootloader and never switch to the application from bootloader when the WDT timeout.

image description

Parents
  • @Bjørn Spockeli No, it seems that the WDT doesn't occurs timeout. I do as follow: code snippet to nrf_dfu_init() after the if(enter_bootloader_mode != 0 || !nrf_dfu_app_is_valid()) statment

    			//Configure WDT.
        NRF_WDT->CONFIG         = (WDT_CONFIG_SLEEP_Run << WDT_CONFIG_SLEEP_Pos);       // Configure WDT to run when CPU is asleep
        NRF_WDT->CRV            = 1966079;                                              // Timeout set to 60 seconds, timeout[s] = (CRV+1)/32768
        NRF_WDT->RREN           = WDT_RREN_RR0_Enabled << WDT_RREN_RR0_Pos;             // Enable the RR[0] reload register
        NRF_WDT->TASKS_START    = 1;                                                    // Start the WDT            
    

    Then add the snippet below to the nrf_dfu_req_handler_on_req() function in dfu_req_handling.c

    // Reload the WDTs RR[0] reload register
    

    NRF_WDT->RR[0] = WDT_RR_RR_Reload;

    Is there any problem for the WDT?

Reply
  • @Bjørn Spockeli No, it seems that the WDT doesn't occurs timeout. I do as follow: code snippet to nrf_dfu_init() after the if(enter_bootloader_mode != 0 || !nrf_dfu_app_is_valid()) statment

    			//Configure WDT.
        NRF_WDT->CONFIG         = (WDT_CONFIG_SLEEP_Run << WDT_CONFIG_SLEEP_Pos);       // Configure WDT to run when CPU is asleep
        NRF_WDT->CRV            = 1966079;                                              // Timeout set to 60 seconds, timeout[s] = (CRV+1)/32768
        NRF_WDT->RREN           = WDT_RREN_RR0_Enabled << WDT_RREN_RR0_Pos;             // Enable the RR[0] reload register
        NRF_WDT->TASKS_START    = 1;                                                    // Start the WDT            
    

    Then add the snippet below to the nrf_dfu_req_handler_on_req() function in dfu_req_handling.c

    // Reload the WDTs RR[0] reload register
    

    NRF_WDT->RR[0] = WDT_RR_RR_Reload;

    Is there any problem for the WDT?

Children
No Data
Related