Hi,
I am working on a product based around an nRF52832 (SDK 15.3, S112 v6.1).
I am using the Secure Bootloader and I have a script that is used to merge hex files and handle bootloader settings :
:: Generate bootloader settings nrfutil settings generate --family NRF52 --application firmware.hex --application-version 0x43 --bootloader-version 0 --bl-settings-version 2 "bootloader_setting.hex" :: Merge bootloader and SD mergehex.exe --merge bootloader.hex softdevice.hex --output bootloader_sd.hex :: Merge bootloader, settings and SD mergehex.exe --merge "bootloader_setting.hex" "bootloader_sd.hex" --output "bootloader_sd_settings.hex" :: Merge all + firmware mergehex.exe --merge "bootloader_sd_settings.hex" "firmware.hex" --output "firmware_with_bootloader.hex" :: Sign firmware into zip file nrfutil.exe pkg generate --key-file private_key.pem --hw-version 52 --sd-req 0xB8 --application firmware.hex --application-version 0x43 "firmware_signed.zip"
Currently if I flash the firmware_with_bootloader.hex with J-flash lite I get everything working on the device. I can enter Bootloader mode, flash a new firmware with the zip file : all good.
For development, I use Segger Embedded Studio.
If I flash a new version of the firmware using Segger Embedded Studio, then the Bootloader becomes unavailable : when I try entering bootloader mode, the firmware just restarts without entering Bootloader mode.
Is it possible that Segger Embedded Studio erases some flash section on the nRF52 that is needed to get into bootloader mode and stay there ?
EDIT: After investigation, it seems that the bootloader address, stored at 0xFF8 is erased to 0xFFFFFFFF when I flash with Segger Embedded Studio. Probably something to dig into.
Regards.