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

SDK15 Secure bootloader timeout limit

Hi, 

I am using the secure bootloader as a template and I want to use the inactivity timeout to shutdown after 10 minutes. 

I saw that the limit should be 60000000 ms (according to the notation in the code) however i can only use it up to approx 6 minute (360000ms). 

When i try to use 600000ms the bootloader doesn't load correctly and crashes.

please assist,

Danny 

Parents
  • The reason it fails is due to this assertion:

    ASSERT(timeout_ticks <= MAX_TIMEOUT_TICKS);

    It fires from main()-->nrf_bootloader_init(..)-->nrf_bootloader_dfu_inactivity_timer_restart(..)-->timer_start(..)-->timer_activate(..).

    MAX_TIMEOUT_TICKS is defined as 16777215 ticks, which corresponds to ((16777215*1000)/32768) = 511 999 ms (8.53 minutes). The following is commented about this definition:

    "The longest fire timeout allowed. Longer timeouts are handled by multiple firings."

    Thus, this can be resolved by adding mechanisms to the callback function fed into nrf_bootloader_dfu_inactivity_timer_restart(..). For example, you can set the timeout to 5 minutes, and restart only when the timeout callback function has fired twice.

    Best regards, Simon

Reply
  • The reason it fails is due to this assertion:

    ASSERT(timeout_ticks <= MAX_TIMEOUT_TICKS);

    It fires from main()-->nrf_bootloader_init(..)-->nrf_bootloader_dfu_inactivity_timer_restart(..)-->timer_start(..)-->timer_activate(..).

    MAX_TIMEOUT_TICKS is defined as 16777215 ticks, which corresponds to ((16777215*1000)/32768) = 511 999 ms (8.53 minutes). The following is commented about this definition:

    "The longest fire timeout allowed. Longer timeouts are handled by multiple firings."

    Thus, this can be resolved by adding mechanisms to the callback function fed into nrf_bootloader_dfu_inactivity_timer_restart(..). For example, you can set the timeout to 5 minutes, and restart only when the timeout callback function has fired twice.

    Best regards, Simon

Children
No Data
Related