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

Issue in Background DFU with RBP(Read Back Protection)

We have problem in background DFU while updating Application with RBP,

Config:
MCU : nRF52840
SDK : SDK16
Softdevice : s140_nrf52_7.0.1_softdevice (SDK16)

Case1:Programs all three files Softdevice, Bottloader merge and Application using nrf connect and application run successfully
           Now perform firmware upgrade by Background DFU.
           Write new App in bank1 and then reset device.
           Bootloder copy image from bank1 to bank0.
           and jump to application and work fine.

Case2:Program all three files Softdevice, Bottloader Merge and Application using our prodcution tool (we use nordic exe in this tool) with Read Back Protection(RBP) then our code run successful.
           Now perform firmware upgrade by background DFU.
           New application write successfully in bank1.
           Image CRC matched.
           Now reset device for copy image from bank1 to bank0.
           Stuck some where in bootloader
           Not jump back to application and stay in bootloader.

So, I want to know that what will be the wrong with this when enable "Read Back Protection(RBP)".

We do same as Case2 but change is only disable RBP(No RBP apply) then this will work fine.

How to solve this issue even RBP is enable.


Thanks,
Sandip Divani

  • Hi Sandip, 

    Could you give more information on the Read Back Protection mechanism you used ? We don't really have a module called "RBP" on nRF52840. Did you mean APPROTECT or ACL (Access Control List) ? 

    Could you clarify what you meant by "nordic exe" ? 

  • Hi Hung Bui,

    Could you give more information on the Read Back Protection mechanism you used ?

    Ans: We use following command

    nrfjprog.exe --recover -f NRF52
    nrfjprog.exe --family NRF52 --chiperase --program nrf52832_SD.hex
    nrfjprog.exe --family NRF52 --program nrf52832_BLDR.hex
    nrfjprog.exe --family NRF52 --program nrf52832_APP.hex
    nrfjprog.exe --family NRF52 --rbp ALL
    nrfjprog.exe --reset

    We don't really have a module called "RBP" on nRF52840.

    Q. then what will happen if we use this command "nrfjprog.exe --family NRF52 --rbp ALL"

    Could you clarify what you meant by "nordic exe" ? 

    Ans: nordic exe means nrfjprog.exe

    Thanks,
    Sandip Divani

  • Hi Sandip, 

    Thanks for the information.

    The -rbp feature in nrfjprog should only enable APPROTECT feature in the chip. And this shouldn't affect the internal activity on the chip in this case the background DFU and the bootloader activity. APPROTECT only disable the debug access port. 

    Could you try to test by instead of calling nrfjprog.exe --family NRF52 --rbp ALL you simply do a write into address 0x10001208 (it's the address of the APPROTECT register in UICR) to enable APPROTECT manualy, like this:


    nrfjprog --memwr 0x10001208 --val 0x00

    After that the chip should locked the same as RBP. Please try to test DFU after that. 

    If you don't do background DFU but normal DFU would the RBP affect the process ?  

    Could you describe the modification you made to the bootloader / application to do background DFU ? 

Related