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

Over-the-air DFU requires two uploads (SDK12.0.0 + S132 3.0.0)

We made a version of bootloader_secure for our own purposes. The problem is now that application must be uploaded twice into the device (nRF52) before it really gets updated. I guess it is because of dual banking and for some reason, the bank is not changed when application is uploaded.

So I am asking if somebody knows where in the bootloader_secure is the code fragment that makes the bank changing, and what possibly goes wrong there? On the other hand, I don't find mentions of dual banking from the code (quickly peeking), so could there be some other reason for that behavior?

Parents
  • I have now tried to set s_dfu_settings.bank_layout = NRF_DFU_BANK_LAYOUT_SINGLE after nrf_dfu_settings_init() but this did not help. Debug prints look like following. After first upload, it says "Current bank is bank 0" but then it stays always at bank 1.

    :INFO:Doing postvalidate
    :INFO:Current bank is bank 1
    :INFO:Successfully run the postvalidation check!
    :INFO:Erasing old settings at: 0x0007f000
    :INFO:Could not queue writing of DFU Settings
    :INFO:Erasing old settings at: 0x0007f000
    :INFO:Could not queue writing of DFU Settings
    :INFO:Erasing old settings at: 0x0007f000
    :INFO:Erasing: 0x0007f000, num: 1
    :INFO:Writing 0x00000057 words
    :INFO:Writing settings...
    :INFO:Sending Response: [0x4, 0x1]
    :INFO:Resetting device. 
    :INFO:In nrf_dfu_transports_close
    :INFO:num transports: 1
    
Reply
  • I have now tried to set s_dfu_settings.bank_layout = NRF_DFU_BANK_LAYOUT_SINGLE after nrf_dfu_settings_init() but this did not help. Debug prints look like following. After first upload, it says "Current bank is bank 0" but then it stays always at bank 1.

    :INFO:Doing postvalidate
    :INFO:Current bank is bank 1
    :INFO:Successfully run the postvalidation check!
    :INFO:Erasing old settings at: 0x0007f000
    :INFO:Could not queue writing of DFU Settings
    :INFO:Erasing old settings at: 0x0007f000
    :INFO:Could not queue writing of DFU Settings
    :INFO:Erasing old settings at: 0x0007f000
    :INFO:Erasing: 0x0007f000, num: 1
    :INFO:Writing 0x00000057 words
    :INFO:Writing settings...
    :INFO:Sending Response: [0x4, 0x1]
    :INFO:Resetting device. 
    :INFO:In nrf_dfu_transports_close
    :INFO:num transports: 1
    
Children
No Data
Related