This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Updating firmware of external MCU via nrf51422.

Hi!

I looked through the forum and didn't find the answer.

Our team is developing product with STM32F411 MCU and nrf51422 module. We need to provide firmware OTA update of STM processor from iOS/Android application.

Now we see update process like this: user initiates fw update from the phone which sends command to the Nordic module. After that ble-module activates UART bootloader on the external MCU using special pins. Then nrf51422 starts data transfer via UART interface to the STM32 which writes received data into its ROM.

Is method described above the best/optimal or there is another way to do this?

Parents
  • Hi Dmitry,

    It doesn't sound like an unreasonable approach. I can't tell you if there is a more optimal method as that is pretty subjective. I can tell you how I implemented a bootloader for an external PIC24 OTA through a nRF51822:

    1. The command to enter bootload mode is sent from the central device and passed to the PIC. The PIC enters its bootloader mode.

    2. The new image is sent OTA and the nRF51822 passes it in 20 byte packets to the PIC. The PIC stores the image in an external flash since I don't have enough program space to dual bank the image in program space.

    3. Once the image transfer is complete, it is CRCed and that CRC is compared to what the central device expects. If the CRC fails the bootload is abandoned, if it passes we proceed.

    4. If we proceed, the old application FW is erased and the new image is copied in. The PIC is then reset to enter the new application.

    The main advantage is that the old application is not erased in case of a failure in the new application transfer failure. The failure could be a disconnect, CRC failure etc.

  • Hi John,

    Thanks a lot for your prompt and helpful answer! I agree that storing image to the external memory first is reasonable.

    Regards, Dmitry.

Reply Children
No Data
Related