Hi,
I'm working on an application where the system should enter System OFF mode after some button activity and wake up (restart) on a button press or USB connection.
When I flash the application using Segger Embedded Studio, it works as expected. However, when I flash the combined HEX file (containing the bootloader, application, and SoftDevice) generated using the post-build commands, it only wakes up from the button press. If I connect the USB while in System OFF mode, it enters an unknown state where nothing functions.
I compared the HEX files — one read back from the device (flashed via IDE) and the other generated through the post-build commands — and found differences.
Here are the post-build commands I'm using:
call nrfutil settings generate --family NRF52840 --application CenSyn_EEG.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 bootloader_settings.hex
call mergehex --merge bootloader_settings.hex secure_bootloader.hex --output Combined_bootloader.hex
call mergehex --merge s140_nrf52_7.2.0_softdevice.hex Combined_bootloader.hex --output SD_FBL.hex
call mergehex --merge CenSyn_EEG.hex SD_FBL.hex --output Final_Hex.hex
call nrfutil pkg generate --hw-version 52 --application-version 2 --application CenSyn_EEG.hex --sd-req 0x100 --key-file private.key CenSyn_EEG_DFU.zip
How can I resolve this issue? Any insights would be greatly appreciated.
Regards,
Theja.