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

Internal DFU

Hi, 

I am working on a bootloader that can do DFU for my nrf52840 DK. Currently, when the bootloader goes into DFU mode, it obtains the init packet via UART. Then, after executing the init packet the bootloader will start writing the firmware image to external memory. Once the whole firmware image is stored in external, it is then validated before it is copied to internal memory and revalidated and executed. My code is working somewhat as expected, however, I wanted to ask if it is possible for the DFU to occur internally? By this I mean, if some external source were to write either both the init packet and firmware packet into external memory before entering dfu mode. After the packages are received, the GPREGRET register would be cleared forcing the app to go into DFU mode. Rather than using uart/ble, the bootloader will go to external memory, validate the packets, copy them to internal and execute them there. Is this possible? If doing this for both the init packet and the firmware packet is not possible, what if I just had the firmware image preloaded into the external memory? 

Related