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

How to do OTA DFU of another MCU using nRF52832?

Hello Everyone, 

Consider i have 2 MCU's on board connected via UART interface, one is any (Target) MCU (MSP32, STM32, etc) and the other is Nordic's nRF52832 (Host). With the Host MCU, i am able to do OTA update of the host application/Bootloader without any issues. But what i would like to know is how can i update the firmware of Target MCU using host's DFU service. 

Basically stating 3 things: 

1. Create a zip like package for the Target MCU's application and then perform DFU 

2. Store the image received in the host and not update its own firmware. 

3.  Use the UART interface to transfer the image received to Target MCU

How can this be done? Any suggestions on this would be useful as i am not sure where to start with. 

Thank you.

Best, 

-SK

  • Hello,

    I think you will find this thread relevant: https://devzone.nordicsemi.com/f/nordic-q-a/53787/nrf52840-and-stm32-firmware-update.  Note that this approach assumes you have enough available flash in bank 1 to store the entire target image. You can probably perform the update in several rounds if that is not the case.

    Best regards,

    Vidar

  • Hi Vidar,

    Thank you for your reply. I went through the link you shared. In that, yes one concern is what you mentioned: Available flash in bank 1. 

    3 things i want to ask here: 

    1. How will i know how much available flash is left in bank 1? Consider, the DFU zip that i create for the host is 200 kB in size, would that mean i have around 118 kB left for bank 1?  Since application area including free space is 318 kB for S132 v7.0.x? Am i right in this assumption? 

    2. If (1) is correct, then how would the next DFU happen? Since the next zip that is created is also 200 kB in size. 

    3. Is it possible to direct the incoming DFU packet to external EEPROM for storage?

    Best, 

    -SK 

  • Hi,

    1. Bank 1 starts above the existing application on the first page aligned address. In other words, the division of banks is dynamic, so the amount of free space for your next update is going to depend on the size of the app in bank 0.

    2. The previous image would need to be erased to make room for the new one. But the image should already have been transferred to the target at that point.

    3. It is possible, but it's not something we added support for in the current bootloader implementation.

    Best regards,

    Vidar

Related