Hi,
few years back I've developed an application and a simple SPI bootloader for nRF51.
Later I've implemented the same on SDK 14 for nRF52832. Softdevice is SD132.
Bootloader is very simple and uses application to transfer data to external SPI data flash, it does not use Sofdevice, so this is Sofdevice-less bootloader.
It works like this:
1.) Nrf application transfers data to nRF52832 which writes the data via SPI to external data flash
2.) Nrf application writes flags that update is available and restarts the device
3.) Bootloader starts, reads the flags and flashes the device. After flashing it clears the flags and restarts the device
4.) Device boots to bootloader, flags are cleared so it starts the nrf application
I've already updated and created the application for SDK 16 and it works well.
I've also created the bootloader but I'm missing some defines:
SOFTDEVICE_REGION_START
CODE_REGION_1_START
BOOTLOADER_START_ADDR
Questions:
1.) Where can I find those defines now? If I'm not mistaken they were in nrf_dfu_types.h (SDK 14). Where can I find differences in addresses and SD size from SDK 14 to 16? Currently I don't know where to flash the bootloader/application. In address space SD starts from address 0, MBR is from 0 to 0x1000 so this is flashed once and it never gets erased. But how to know SD size in SDK 16 so I know where to flash the bootloader?
2.) Since SDK 16 has some new DFU bootloaders, would it be possible to implement something like this using some of the provided examples? Do bear in mind that update process must be seamless and automatic. That's why we are using application to transfer data to SPI flash - as data is transfered application is doing it's regular tasks. Only when transfer is complete bootloader is active and flashes the device. This way users don't have to connect/reconnect from bootloader to application.
Thanks!