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

Updating bootloader on nrf9160DK_52840 through nrf9160DK_9160

Hey I'm currently trying to update the nrf9160DK_52840s bootloader through the nrf9160DK_9160 by which i mean:

-Send bootable image_52 over LTE or USB to 91

-Have a check on the 91 if its an image_52 or image_91

-if its an image_52 pass it over UART to the 52

-Update the 52 with mcu boot

Currently I have been able to update the 52 over bluetooth and establish a UART communication between the two chips (sending and receiving strings), but I don't know how to precede on the image check. Do you have any samples that could point me in the right direction?

Parents
  • Hi!

    Thanks for reaching out. For the image check a coworker suggested that you could employ a custom "magic number" for the nRF9160 and nRF52840 images, then you can just drop this custom magic number before putting the image in secondary flash. You can have a look at how this check can be done in the DFU Target library, where the magic number is used to differ between modem images and mcuboot images. As for the actual implementation of the DFU procedure there are some suggestions below:

    • On the nR52, you need to implement MCUBoot and the application with SMP support.
    • On the nRF9160, you need to implement the mcumgr library and transfer the image to the nRF52 over SMP 
    • The SMP instance on the nRF52 will then receive the firmware and save it in flash. The MCUBoot will then execute it
    • (Take a look at the Device Management section in the Zephyr Documentation as well.)

    I hope this helps you on your way!

    Best regards,
    Carl Richard

  • Hello Carl!

    I have been successful in setting up an smp server with bootloader on both the nrf91 and nrf52. Uploading, testing, confirming and erasing images works fine for both, with a slightly edited version of the smp_svr sample to work on the nrf9060dk board.

    However when i try to upload an image built for the nrf52 onto the nrf91 (which is later to be sent over Uart) it does not work. I'm assuming there is some sort of upload test for board matching, like the one for identical hashes, but i don't know how remove it. Any advice?

    Also the

    Header file: include/dfu/dfu_target.h
    Source files: subsys/dfu/dfu_target/src/
    files given in the DFU documentation seem to have been moved
  • Hello again!

    Apologies for the delayed answer. Good to hear that you are progressing! I will take a closer look at this on Monday, but could you check the validity of the images as described in the Image Management documentation. In addition you can try to add the CONFIG_IMG_MGMT_VERBOSE_ERR=y to your prj.conf for more logging output. That can help us identify the problem properly!

    erlendwit said:

    Also the

    Header file: include/dfu/dfu_target.h
    Source files: subsys/dfu/dfu_target/src/
    files given in the DFU documentation seem to have been moved

    Interesting. I can still find the files in those locations (in NCS v1.5.0). Which documentation exactly?

    Best regards,
    Carl Richard

Reply
  • Hello again!

    Apologies for the delayed answer. Good to hear that you are progressing! I will take a closer look at this on Monday, but could you check the validity of the images as described in the Image Management documentation. In addition you can try to add the CONFIG_IMG_MGMT_VERBOSE_ERR=y to your prj.conf for more logging output. That can help us identify the problem properly!

    erlendwit said:

    Also the

    Header file: include/dfu/dfu_target.h
    Source files: subsys/dfu/dfu_target/src/
    files given in the DFU documentation seem to have been moved

    Interesting. I can still find the files in those locations (in NCS v1.5.0). Which documentation exactly?

    Best regards,
    Carl Richard

Children
No Data
Related