Hi,
My application needs to enter DFU mode based on a command from another device connected via SPI.
I see that I could use the following two statements once the application receives the SPI command. This resets the device but the device doesn't enter in DFU mode.
NRF_POWER->GPREGRET = 0xB1;
NVIC_SystemReset();
I also learned that I need to modify the bootloader code to enter the DFU mode. Which file do I need to update? Is it \ncs\v1.4.0\bootloader\mcuboot\boot\zephyr\main.c?
On updating the application/MCUboot via SPI interface,
1. Do I need to enable the SPI in my application prj.conf file to use the SPI functions to read data from the SPI bus?
2. Is it correct that I need to use nrf_target_ functions to initialize and write new application/MCUboot to the flash area?
Thanks,
Ram