cancel
Showing results for 
Search instead for 
Did you mean: 

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

MR.AUGOK
Associate II

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.

14 REPLIES 14
Andrew Neil
Evangelist III

(how many times have you posted this??)

MR.AUGOK
Associate II

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.

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?

MR.AUGOK
Associate II

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.

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
Associate II

@Andrew Neil​ 

3 times for other platforms.

MR.AUGOK
Associate II

@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.

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?

Directly NO

DMA your idea NO