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

How to update another chip firmware using nRF52840?

Hi team, there is nRF52840 and STM32 connected via UART. I need to update ST firmware over nRF. I managed to send stm32 .hex (FW intended for ST) over nRF DFU service and check the flag .bank_1.bank_code it is definitely changed to NRF_DFU_BANK_VALID_EXT_APP, but anyway it is not obvious for me how to transfer ST firmware to the ST chip? Where the ST FW located from physical point of view? Is there any example how to do this in a proper way?

Can serial transport solve the problem?

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Flib_dfu_transport_serial.html

I've read this article https://devzone.nordicsemi.com/f/nordic-q-a/29028/download-firmware-over-ble-for-another-mcu and realize that there are no files and (obviously function) that are mentioned in the article. I've downloaded sdk 11 and found out that sdk 11 contains files mentioned in the article. Why the latest sdk doesn't contain them? What functions would be helpful to solve the issue?

Parents
  • Hi Vasa, 

    once the external application has been transferred to the nRF52840, the bootloader will call nrf_dfu_validation_post_external_app_execute(). 

    The external application will be located in BANK 1. You can find the bank 1 start address by calling nrf_dfu_bank1_start_addr() and the size of the application will be passed to nrf_dfu_validation_post_external_app_execute with the dfu_init_command_t struct. 

    So once you have the Bank 1 start address and the size of the external application you should be able to use the UART peripheral to transmit the firmware over to the STM32. You can use the UARTE HAL or driver directly or use the SLIP library or the Libuarte - advanced UARTE driver

    Best regards

    Bjørn 

Reply
  • Hi Vasa, 

    once the external application has been transferred to the nRF52840, the bootloader will call nrf_dfu_validation_post_external_app_execute(). 

    The external application will be located in BANK 1. You can find the bank 1 start address by calling nrf_dfu_bank1_start_addr() and the size of the application will be passed to nrf_dfu_validation_post_external_app_execute with the dfu_init_command_t struct. 

    So once you have the Bank 1 start address and the size of the external application you should be able to use the UART peripheral to transmit the firmware over to the STM32. You can use the UARTE HAL or driver directly or use the SLIP library or the Libuarte - advanced UARTE driver

    Best regards

    Bjørn 

Children
No Data
Related