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

Problem to upgrade bootloader by application

Need to upgrade bootloader by application code. I have finished to program bootloader image to FLASH. Content is verified correct, comparing to SRC. However, the bootloader seems to be empty after rebooting the device. nRF Go Studio cannot see it as well. I assume that I miss to update MBR. How can I do that? Any simple programming guide for reference?

Thanks.

Parents
  • First, my intention is to upgrade firmware: app + bootloader by DFU. Our platform is nRF52832, using SDK_12.3.0. We use DFU bootloader, developed by Nordic. We only upgrade APP by DFU. However, for next release, bootloader is modified. Therefore, we have to upgrade both APP and bootloader by DFU. It is single bank in our project. Best solution is by DFU, bootloader can be upgraded. But I guess not. So, I tried to do that by application. If DFU can do that in single bank, plz show me how to do that. As for my test procedure, I list pseudo code below:

    1. Enter main() of application.
    2. Check proprietary bootloader version. If not expected bootloader or empty, run below steps.
    3. Erase flash space of bootloader by nrf_nvmc_page_erase()
    4. write bootloader image to bootloader space by nrf_nvmc_write_words() // note: bootloader image is compiled as a array in a c file. Those are steps how I program bootloader image to flash (0x78000 ~ 0x8000)

    For nRF Go Studio, it shows SD, APP, and BOOTLOADER, if any of them exists. If I program all three blocks by GoStudio, it shows them all. When I program SD + APP by GoStudio, and program BL by APP, GoStuio only shows SD + APP. Just like no BL there.

Reply
  • First, my intention is to upgrade firmware: app + bootloader by DFU. Our platform is nRF52832, using SDK_12.3.0. We use DFU bootloader, developed by Nordic. We only upgrade APP by DFU. However, for next release, bootloader is modified. Therefore, we have to upgrade both APP and bootloader by DFU. It is single bank in our project. Best solution is by DFU, bootloader can be upgraded. But I guess not. So, I tried to do that by application. If DFU can do that in single bank, plz show me how to do that. As for my test procedure, I list pseudo code below:

    1. Enter main() of application.
    2. Check proprietary bootloader version. If not expected bootloader or empty, run below steps.
    3. Erase flash space of bootloader by nrf_nvmc_page_erase()
    4. write bootloader image to bootloader space by nrf_nvmc_write_words() // note: bootloader image is compiled as a array in a c file. Those are steps how I program bootloader image to flash (0x78000 ~ 0x8000)

    For nRF Go Studio, it shows SD, APP, and BOOTLOADER, if any of them exists. If I program all three blocks by GoStudio, it shows them all. When I program SD + APP by GoStudio, and program BL by APP, GoStuio only shows SD + APP. Just like no BL there.

Children
No Data
Related