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

How exactly the "recursive" calls to "app_sched_execute" are fixed in SDK14 Bootloader ?

This question has to do with the observed "recursivity" of the calls to "app_sched_execute" in SDK13 as described in the previously asked question below:

devzone.nordicsemi.com/.../

As it was stated in the previous post, SDK14 Bootloader implementation fixes the "recursivity" problem.

However, I am trying to understand how exactly the problem of "recursivity" was solved in the Bootloader's implementation in SDK14. I see that, for instance, in the source code file "nrf_dfu_settings.c" the call to "wait_for_queue()" from "nrf_dfu_settings_write()" function has been removed. (That call in SDK13 was one of the reasons why the "recursive" calls to the "app_sched_execute" could have happen).

However, it appears that without the above call to "wait_for_queue()", the calls to nrf_dfu_flash_erase() and nrf_dfu_flash_store() in SDK14 are performed without checking if there is an available room in the command queue "nrf_fstorage_sd_queue_t m_queue" in the "nrf_fstorage" module. Therefore, is is possible that the calls to nrf_dfu_flash_erase() and nrf_dfu_flash_store() might fail b/c of no room in that queue is available ? How is that prevented in SDK14 ?

Related