NRF52833 UART Secure DFU - Not booting after app start

I'm working on developing a UART Secure DFU platform on the NRF52833 with SDK 17.1 and soft-device s140 v7.2.0.

As there are no direct examples for this application, I followed the steps outlined in this blog post as a starting point. I then updated my application to leave enough space for the larger SD and implemented the steps to get the uECC crypto working in place of the hardware crypto on the 52840. 

I have things working to the stage that I can successfully dfu both the soft-device and my application, but when the bootloader attempts to start my application (via the SD) at address 0x1000, the system never boots.

After both DFU's are complete, I see the following debug messages:

00> <debug> app: App is valid
00> <warning> nrf_dfu_settings: No additional data erased
00> <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
00> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
00> <debug> app: Running nrf_bootloader_app_start with address: 0x00001000
00> <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0

And nothing afterwards. Seems like it thinks my app is valid but somewhere in the handoff to the SD to App the system gets lost.

Some notes:

- I created copies of my dfu/application project with logging enabled in the bootloader to get the above prints, but overall behavior seems the same in both projects.

- Both the bootloader and application projects work fine if I program them in on their own from SES. 

- I do an erase all and program only the bootloader and the MBR into the device (no SD nor app hard-programmed) and then do 2 separate DFU operations for the SD then the application. This mimics my end-customers usage flow and (I think) avoids the need to do any bootloader settings merge operations for initial programming.

- Logging seems to indicate the uECC package verification is working as intended.

- Logging seems to indicate the bootloader is working (eg dfu is all good, no errors, tries to hand off to app but then fails)

- My application starts (FLASH_START) at 0x27000, which matches the required size indicated by the s140 v7.2.0 SD release notes.

- My bootloader project addresses (in my non-debug project) are:

- My application project addresses (in my non-debug project) are:

Any ideas on what I am missing here? I don't even know how to debug this because once it jumps to 0x1000 I can't debug or log anymore so it is a bit of a black box. I'm not sure how to try to determine what is happening after this jump. Unsure if its making to the beginning of my app and crashing due to an application problem (eg reinitializing some hardware already done by the bootloader), or if it is getting lost in the soft-device before it makes it to my application.

I've attached a full debug log of the sd DFU + app DFU sequence. I think it may be dropping some debug prints but gives an idea of what is going on. 

rtt_bootload_sequence.log

  • Hi  

    My IDE / gcc info is below, let me know if you need any other details:

    Incidentally, this current effort started as a migration from a prior project on a nRF52840 that was originally on SDK 15.3 and s140 6.1.1 SD. I first updated this 52840 project to the same SDK17.1 / SD 7.2.0, which worked great with minimal/expected changes. AKA I wasn't able to reproduce these same issues on the nRF52840 with the same SDK/SD. 

    It wasn't until I worked on migrating to the nRF52833 where I started running into problems, it is unfortunate there was no working dfu example to start from for this platform. 

    I will note that I think I updated from SES version 4.22 (IDE used when I did the original 52840 project) to SES 6.32b right around the time when I started trying to port to the 52833 because debugging kept crashing on 4.22 on the 52833. It seemed like updating to 6.32b fixed this issue.

  • Hi Dan, 
    It's recommended to use the exact SES version that we mentioned in the release note of SDK v17.1 , which is v5.42a. 

     
    Please see here.

Related