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

Updating bootloader + SD from SDK13 to SDK14

I have SD 4.0.2 + 13.0.0 secure debug bootloader, and I am trying to update it to SD 5.0.0 + 14.0.0 secure debug bootloader. It transfers the data, goes to 100%, but after that it fails and is not bootable (bricked) until I flash it with segger. The bootloader debug logs show:

....
:DEBUG:Waiting for other flash operation to finish.                                                                                                                                                     
[118/62355]
:DEBUG:Waiting for other flash operation to finish.
:DEBUG:Erasing: 0x0007e000, num: 1                             
:DEBUG:Writing 0x00000057 words    
:DEBUG:Writing settings...                       
:DEBUG:Sending Response: [0x4, 0x1]
:INFO:Inside main                                              
:DEBUG:In nrf_bootloader_init      
:DEBUG:In real nrf_dfu_init                      
:DEBUG:running nrf_dfu_settings_init                               
:DEBUG:Enter nrf_dfu_continue     
:DEBUG:Valid SD + BL              
:DEBUG:Enter nrf_dfu_sd_bl_continue
:DEBUG:Enter nrf_bootloader_dfu_sd_continue
:DEBUG:Updating SD. Old SD ver: 40, New ver: 50
:DEBUG:Copying [0x00030000-0x00039000] to [0x00001000-0x0000a000]: Len: 0x00009000
:DEBUG:Finished copying [0x00030000-0x00039000] to [0x00001000-0x0000a000]: Len: 0x00009000
:DEBUG:Validated 0x00030000-0x00039000 to 0x00001000-0x0000a000: Size: 0x00009000
:DEBUG:Finished with the SD update.                     
:DEBUG:Erasing old settings at: 0x0007e000              
:DEBUG:Erasing: 0x0007e000, num: 1                      
:DEBUG:Writing 0x00000057 words                         
:DEBUG:Writing settings...                                                
:DEBUG:Copying [0x00039000-0x00042000] to [0x0000a000-0x00013000]: Len: 0x00009000
:DEBUG:Finished copying [0x00039000-0x00042000] to [0x0000a000-0x00013000]: Len: 0x00009000
:DEBUG:Validated 0x00039000-0x00042000 to 0x0000a000-0x00013000: Size: 0x00009000
:DEBUG:Finished with the SD update.                      
:DEBUG:Erasing old settings at: 0x0007e000              
:DEBUG:Erasing: 0x0007e000, num: 1
:DEBUG:Writing 0x00000057 words                                           
:DEBUG:Writing settings...                                   
:DEBUG:Copying [0x00042000-0x0004b000] to [0x00013000-0x0001c000]: Len: 0x00009000
:DEBUG:Finished copying [0x00042000-0x0004b000] to [0x00013000-0x0001c000]: Len: 0x00009000
:DEBUG:Validated 0x00042000-0x0004b000 to 0x00013000-0x0001c000: Size: 0x00009000
:DEBUG:Finished with the SD update.                                        
:DEBUG:Erasing old settings at: 0x0007e000                                 
:DEBUG:Erasing: 0x0007e000, num: 1                                         
:DEBUG:Writing 0x00000057 words                                            
:DEBUG:Writing settings...                                                 
:DEBUG:Copying [0x0004b000-0x00052000] to [0x0001c000-0x00023000]: Len: 0x00007000
:DEBUG:Finished copying [0x0004b000-0x00052000] to [0x0001c000-0x00023000]: Len: 0x00007000
:DEBUG:Validated 0x0004b000-0x00052000 to 0x0001c000-0x00023000: Size: 0x00007000
:DEBUG:Finished with the SD update.                                        
:DEBUG:Erasing old settings at: 0x0007e000                                 
:DEBUG:Erasing: 0x0007e000, num: 1                                         
:DEBUG:Writing 0x00000057 words                                            
:DEBUG:Writing settings...                                                 
:DEBUG:Verifying BL: Addr: 0x00023000, Src: 0x000514a8, Len: 0x000055e0    
:DEBUG:Bootloader not verified, copying: Src: 0x000514a8, Len: 0x000055e0  

Edit:

I think my problem is that the SDK13 bootloader was at 0x74000 with a length of 0x9000, and the SDK14 bootloader is at 0x72000 with a length of 0xB000. It seems like it is not possible to DFU update a bootloader where the UICR BOOTADDR has to change?

Related