So I've been having a number of issues with getting OTA dfu and the ble secure bootloader working with the 132 softdevice, sdk 14.2 and nrf52832.
So a little context to where I am currently at and what I have tried, I'm currently running everything on a DK just to try get a grasp with everything before moving it to our custom board. So I began with trying the ble secure bootloader example following the instructions on the nordic site. I successfully built the bootloader files, created my own public and private keys, replaced the existing public key with my new one and using the blinky example I made a bootloader settings hex with nrfutil and merged that with the bootloader hex and flashed that to the device which worked fine. I continued to make the dfu package with the blinky example and my private key and transferred it to my phone which brings me to my first issue:
After being stuck on this for a while I decided to just move on, which I realise sounds like i'm jumping the gun a little, and try to implement the buttonless dfu in a simple application that basically just advertises and connects, along with my own bootloader (which is just a copy of the secure ble bootloader without the button stuff), which brings me to my final couple of issues:
I would very much appreciate any help,
Thank you for your reply, so after testing with the RTT logs and debug bootloader I can confirm that the DFU completes fine on the nrf side. I've tested it with both my own application and the blinky example, both run fine when flashed without the bootloader, but fail to actually boot when transferred across with OTA DFU.
Regarding the UICR register I will have a more in depth dig into it now that I have a better idea of what may be causing it.
The RTT log shows that the bootloader starts the application (at least it branches to where the application is supposed to be located). How do you know that the application is not running? Could it be that there is some error in the application that prevents it from working as you would expect? Have you done any debugging in the application? (It could be easier to test the application first without a bootloader so that you know it works properly before you flash the bootloader.)
So all my application does at present is advertise and connect with a different name. I have tested this without the bootloader and it works as expected so I know its not working as when the dfu transfer finishes the device does not advertise. I have also tried a fresh OTA DFU setup with the blinky example, which also works without the bootloader, but does exactly the same thing as my application when I try using OTA DFU with the bootloader. Additionally I have tried this on multiple nrf52 DK boards, all of which show the same behaviour.
I see. Can you verify that the application start address is indeed 0x23000? And just in case, can you also verify the SoftDevice is present in the flash?
Apologies for the late reply, I got pulled away from this issue. However after revisiting it I have managed to sort my DFU woes.
The application skipping the bootloader and the bootloader not being recognised as a bootloader, was solved by editing the linker script to not build with the softdevice as when I built it using visual gdb it merged the file with the softdevice causing it to only be recognised as an application. By splitting the two then merging them using the mergehex command it created a hex file that worked correctly.
The issue regarding the application not being passed to through the bootloader was solved by altering the bank valid app in bootloader_settings.c as mentioned in this thread.
Many thanks for your time and help