nRF5 SDK System power off MODE wake up issue.

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.

  • Hello Theja,

    If I connect the USB while in System OFF mode, it enters an unknown state where nothing functions.

    Please run 'nrfjprog --readregs' when the chip is in this state to see if the register readout may reveal what state the device is in.

    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.

    Does the application region in flash contain different data when you check the flash contents after using these two different methods?

    nrfjprog --memrd 0x0 --n 0x1000000 > memory_content.txt

    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

    Is there a flash command that comes after this?

    Thanks,

    Vidar

Related