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

How to add dfu (over uart) support to application?

Hello,

we have an application with BLE. We've prepared secure bootloader with Serial Transport for performing DFU. Now we need to add necessary changes in application to support bootloader: placement in flash, dfu triggers...What we need to do?

Our setup nrf52811, SDK17.

Parents
  • Hi Arsenii, 

    You don't need to do anything related to flash placement, as long as your application doesn't take all the space for the bootloader. Check the memory layout here

    Regarding triggering DFU mode, if you have a look at dfu_enter_check() function in nrf_bootloader.c file you can find the list of the way that the application can put the bootloader to DFU mode (after a reset). The most common way is to write to retention register GPREGRET. I discussed a little bit about it here. Basically what you need to do is to write 0xB1 to GPREGRET, and then trigger a softreset. 

Reply
  • Hi Arsenii, 

    You don't need to do anything related to flash placement, as long as your application doesn't take all the space for the bootloader. Check the memory layout here

    Regarding triggering DFU mode, if you have a look at dfu_enter_check() function in nrf_bootloader.c file you can find the list of the way that the application can put the bootloader to DFU mode (after a reset). The most common way is to write to retention register GPREGRET. I discussed a little bit about it here. Basically what you need to do is to write 0xB1 to GPREGRET, and then trigger a softreset. 

Children
Related