This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

not able to enter DFU Mode with secure bootloader example

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

Parents Reply
  • Hi,

    1. The debug bootloader projects support logging via RTT, so there is no conflict with UART. RTT logging requires you to use a J-Link debugger, such as the on-board debugger on the DK. The logs are automatically on when you use the debug bootloader, so you just need to start and connect the J-Link RTT Viewer application.

    2. The nRF52840 does not enable the USB automatically. It is like any other peripheral (such as UART) in the way that it has to be configured and enabled. It is always disabled by default. If you want to use it for DFU you need a USB bootloader that does this, for instance <SDK15.3>\\examples\dfu\secure_bootloader\pca10056_usb_debug\.

Children
No Data
Related