Skip to main content
MR.AUGOK
Associate
June 29, 2022
Question

How can i make tunnel or bridge software for stm32f4 as Cube IDE ?

  • June 29, 2022
  • 5 replies
  • 2776 views

Hello. i am using Cube IDE for stm32f4 chip. My stm32f4 chip is connected on PCB from Uart1 to another chip that I want to update firmware.How can I update the firmware of this chip which using stm32f4 as bridge or tunnel?

I want stm32f4 to be bridge for firmware update only.

thanks for your helping.

This topic has been closed for replies.

5 replies

Andrew Neil
Super User
June 29, 2022

(how many times have you posted this??)

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
MR.AUGOK
MR.AUGOKAuthor
Associate
June 29, 2022

hello. i don't use two pieces stm32f4. Stm32f4 will be used to update firmware of another chip. Another chip is not STm. That chip can be updated firmware to be used interface because firmware hex file is bigger than 2mb. Stm32f4 is not enough own storage. i am not writing firmware Hex file to storage of stm32f4. Stm32f4 should be used tunnel or brage for another chip that update firmware. Thansk.

Andrew Neil
Super User
June 29, 2022

If it's simply a bridge, then can't you just do

UART1_transmit_byte( UART2_receive_byte() ); // re-transmit on UART1 whatever's received on UART2

You might want to add a ring-buffer between receive and transmit.

If the other MCU's update protocol requires bidirectional comms, you'd need to do the same in the opposite direction.

"firmware hex file is bigger than 2mb"

Hex files are inherently ~ twice the size of the binary they represent - so could you not send the binary instead?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
MR.AUGOK
MR.AUGOKAuthor
Associate
June 29, 2022

Thanks Andrew. i will try your advisions. i can send to Stm32f4 from firmware interface which another chip has. ı just want to connent directly another chip from firmware updater interface. ı have a BIN file to update firmware.. stm32f4 must shut down all functin. Except, firmware sending protocol on the STM32f4 . i hope you could help me.

MM..1
Chief III
June 29, 2022

As first create bridge code. As second F4 can boot more as one firmware , then you can have bridge as bootloader and if for example IWDG restart your bridge runs. Otherwise normal app run from bootloader stage.

MR.AUGOK
MR.AUGOKAuthor
Associate
June 30, 2022

@Andrew Neil​ 

3 times for other platforms.

MR.AUGOK
MR.AUGOKAuthor
Associate
June 30, 2022

@MM..1​  Hello. Can I connect directly from UART2 line to UART1 using DMA for data transfer without CPU for stm32f4? So the input will be connected to the output. STM32f4 will be bridge only. Data must be fluent to the DMA used. Because the data could be truncated while the CPU was running.

i think DMA is used term.

Andrew Neil
Super User
June 30, 2022

Does it need to go through the STM32 at all?

Can't you just connect the source straight through in hardware? Maybe have a switch that the STM32 controls?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.