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

Changed from S112 to S113 and now DFU only partially works

Hi!

We recently developed some firmware using S112 on a nRF52810 but realised that we needed data length extension, so changed to using S113.

Previously everything worked great (including DFU) with S112, and after changing softdevice to S113 (and the relevant linker/Makefile parts) the main application is now going great.

However DFU updates are now behaving very strangely. The bootloader starts and can be connected to just fine. However when you try to upload a firmware file, it updates just a tiny amount and then disconnects. It seems as if the device itself locks up, but it seems it isn't locking up on a hardfault or application error (at least according to GDB).

nRF Connect's log shows that 'Data Object 1/12' was sent and executed, but after 'Data Object 2/15' and 'Uploading firmware...' are sent, the device just disconnects.

Any ideas what might be the matter, or how to debug this further? Thanks!

Parents
  • After an hour of trying to build the bootloader with some logging, I finally succeeded in getting it outputting something (albeit without printf):

    Writing settings...                                                            
    Erasing old settings at: 0x%08x                                                
    nrf_fstorage_erase(addr=0x%p, len=%d pages), queue usage: %d                   
    nrf_fstorage_write(addr=%p, src=%p, len=%d bytes), queue usage: %d             
    Backing up settings page to address 0x%x.                                      
    Writing settings...                                                            
    Erasing old settings at: 0x%08x                                                
    nrf_fstorage_erase(addr=0x%p, len=%d pages), queue usage: %d                   
    nrf_fstorage_write(addr=%p, src=%p, len=%d bytes), queue usage: %d             
    Writing valid init command to flash.                                           
    Request handling complete. Result: 0x%x                                        
    Set receipt notif                                                              
    Handle NRF_DFU_OP_RECEIPT_NOTIF_SET                                            
    Request handling compl...

    So shortly after 'Request handling complete' it would appear to spontaneously restart...

Reply
  • After an hour of trying to build the bootloader with some logging, I finally succeeded in getting it outputting something (albeit without printf):

    Writing settings...                                                            
    Erasing old settings at: 0x%08x                                                
    nrf_fstorage_erase(addr=0x%p, len=%d pages), queue usage: %d                   
    nrf_fstorage_write(addr=%p, src=%p, len=%d bytes), queue usage: %d             
    Backing up settings page to address 0x%x.                                      
    Writing settings...                                                            
    Erasing old settings at: 0x%08x                                                
    nrf_fstorage_erase(addr=0x%p, len=%d pages), queue usage: %d                   
    nrf_fstorage_write(addr=%p, src=%p, len=%d bytes), queue usage: %d             
    Writing valid init command to flash.                                           
    Request handling complete. Result: 0x%x                                        
    Set receipt notif                                                              
    Handle NRF_DFU_OP_RECEIPT_NOTIF_SET                                            
    Request handling compl...

    So shortly after 'Request handling complete' it would appear to spontaneously restart...

Children
No Data
Related