Updating firmware of external MCU via nrf52833 and nrf52833 can also update the firmware for itself through OTA.

We've a custom board which has NRF52833 and TM52F1376-MTP-C3. They are connected over UART.

What I want is transfer binary data between Phone and nRF52 over BLE. 

and then after NRF52833 receives the firmware sent by the mobile phone, it can try to determine whether the firmware is updated for itself or for an external MCU(TM52F1376-MTP-C3).

as far as i know,the bootloader by default will receive the image from the phone and replace the old image with the new image.I don't know how to distinguish whether the firmware received from the phone is for the external MCU or its own, if it is for the external MCU, I don't know how to send the firmware to the external MCU through the UART.

Is there any application example?

can you give me some help?Thx a lot.

Parents
  • Hello,

    Are you working with the nRF5 SDK or the nRF connect SDK? For the nRF5 SDK with had the option to "mark" the application image as an external image to allow customers to implement a mechanism to relay the image to an external target.

    From the nrfutil pkg generate help text :

    Best regards,

    Vidar

  • thanks for your reply.

    i am working with the nRF5 SDK.

    Update packages of external applications are generated with the --external-app option,when this option is set, the receiving device stores the update but will not activate it,right?

    But at this time the firmware is in the bootloader, how does nRF52833 send the received firmware to the external MCU through the UART?

    Does it jump directly to the application after receiving the external firmware, and then execute app_fifo_put to send the firmware? Is there any introduction or any application example related to this, I am a little confused about this.

Reply
  • thanks for your reply.

    i am working with the nRF5 SDK.

    Update packages of external applications are generated with the --external-app option,when this option is set, the receiving device stores the update but will not activate it,right?

    But at this time the firmware is in the bootloader, how does nRF52833 send the received firmware to the external MCU through the UART?

    Does it jump directly to the application after receiving the external firmware, and then execute app_fifo_put to send the firmware? Is there any introduction or any application example related to this, I am a little confused about this.

Children
  • OK, thanks for confirming. Unforunately, we do not have any examples to demo this feature. The reason for this is that the relaying mechanism will in most cases have to a custom implementation to support the DFU protocol expected by the receiving device.

    To support external apps you have to enable this setting in your bootloader:

    So you have to implement a routine which can copy the image from bank 1 and forward it to your external device. A good place to do this may be from nrf_bootloader_init() before nrf_bootloader_fw_activate().

  • So sorry for the late reply。

    According to what you mean, that is to enable NRF_DFU_SUPPORTS_EXTERNAL_APP, and forward the received firmware to the external MCU according to the custom DFU protocol before nrf_bootloader_fw_activate(), right?

    Update packages of external applications (e.g. updates for third-party applications) are generated with the
    --external-app option,right? but i add --help to nRF Util command to display help about the command, for example: nrfutil pkg generate --help

    i can not find the cammand of --external-app,Is it related to nRF Util version? my version is 4.0

  • Yes, you need to upgrade nrfutil to get support for this feature.

Related