I am not able to enter DFU Mode with secure bootloader example.
I use IAR and NRF Connect with Programmer to flash
Following are the steps I followed
1. Build Secure bootloader for serial UART ( enabled NRF_DFU_DEBUG_VERSION to remove link error)
2. Build blinky with MBR
3. Create settings file for blinky with MBR using the following command:
nrfutil settings generate --family NRF52840 --application blinky_pca10056_mbr.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 settings.hex
Note: Generating a DFU settings page with backup page included.
This is only required for bootloaders from nRF5 SDK 15.1 and newer.
If you want to skip backup page generation, use --no-backup option.
Generated Bootloader DFU settings .hex file and stored it in: settings.hex
Bootloader DFU Settings:
* File: settings.hex
* Family: NRF52840
* Start Address: 0x000FF000
* CRC: 0x5BBAFFAB
* Settings Version: 0x00000001 (1)
* App Version: 0x00000001 (1)
* Bootloader Version: 0x00000001 (1)
* Bank Layout: 0x00000000
* Current Bank: 0x00000000
* Application Size: 0x00000608 (1544 bytes)
* Application CRC: 0xA6B0AE53
* Bank0 Bank Code: 0x00000001
* Softdevice Size: 0x00000000 (0 bytes)
* Boot Validation CRC: 0x00000000
* SD Boot Validation Type: 0x00000000 (0)
* App Boot Validation Type: 0x00000000 (0)
4. I then used the NRF Connect to program 4 files: settings, blinky_mbr, secure bootloader and mbr(mbr taken from test image folder)
Observation:
1. The blinky app runs normally
2. If I hold down button 4 and power-cycle, LEDs 1 and 3 are lit.After sometime, normal mode where app runs is entered and the app runs
I guess there is a hardfault and DFU mode is not entered. Instead after some time, maybe due to watchdog reset, normal app runs. I am unable to understand what I am missing here
Queries:
1. How to enter DFU mode?
2. Is it OK to use nrf Connect programmer to program all at once
3. How to enable RTT / UART logs on IAR? In the sdk_config file, I only see NRF_LOG_ENABLED. No macros related to UART / RTT
Note that I just want to check getting into bootloader mode as a first step and it is not working. Hence not getting into creating my own private -public key-pair