Hello
I have a firmware with Softdevice S132 for NRF52 consists of main application (0x1F000 len:0x56000 ) and Bootloader (0x75000 len:0x9000). What I'm trying to do is adding more space for the existing App using a page from the Bootloader, So I will do the following shift: main application (0x1F000 len:0x57000 ) and Bootloader (0x76000 len:0x8000).
When I flash the project using the wires (erasing and flashing firmware + softdevice) It works without any problem, but when I upgrade the bootloader using BLE with the shifted one the device becomes dead. I think this is mentioned clearly in this post Relocating Bootloader by DFU .
According to the explanation, this is because the wired programming erase every thing including the UICR registers (NRFFW[0] which has the start address of bootloader) and flash new firmware while the BLE DFU approach will not do that. However, I made a bridge bootloader that erase the UICR area and update the NRF_UICR->NRFFW[0] to the new Bootloader address after it finishes uploading the new bootloader, but I still get the same thing. I also tried to set the vector table using manually in that step sd_softdevice_vector_table_base_set(NRF_UICR->NRFFW[0]).
So am I miss something, for example the MBR in Softdevice uses the old bootloader address, or what? BTW from where the MBR knows the Address the Bootloader ? and is there any detailed documentation/code for MBR ?
Best