Skip to main content
Associate II
January 4, 2024
Solved

receive and send file in stm32f429zi

  • January 4, 2024
  • 5 replies
  • 3340 views

I want to send a file from terminal tool to stm32f429zi via RS485(USB to RS485 and transceiver) and store the received file in stm32F429zi board and again send it back to terminal tool and i want to know ,is it possible or not? and its not possible, what's the other ways to do these task.

Best answer by TDK

You can send data between PC and USB. UART has no concept of what a file is. You would need to encode that information (file name, length, etc.) and interpret it on either side.

5 replies

TDK
TDKBest answer
Super User
January 4, 2024

You can send data between PC and USB. UART has no concept of what a file is. You would need to encode that information (file name, length, etc.) and interpret it on either side.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Tesla DeLorean
Guru
January 4, 2024

You control the SW and HW, should be able to code something that works for you.

Something like X-MODEM might work, or you can come up with a different  protocol.

Or stream data as lines from a .HEX file, provided you can absorb the data at full-rate, half-duplex.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Pavel A.
Super User
January 4, 2024

X-modem should be good. Many terminal programs support it and ST provides it in examples. It allows to send filenames with the data automatically.

 

Associate II
January 5, 2024

can you please share some example links....

Karl Yamashita
Lead III
January 5, 2024

Sending the file contents to the STM32 is easy. The real question is what is you definition of "store"? Do you want to store the file contents into ram, program flash or external memory? Did you want to be able to power cycle the board and still have the file retrievable? Is the file small enough to fit into ram or flash? 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
Associate II
January 5, 2024

its a 1KB file....is it possible to store it in RAM or FLASH....

Pavel A.
Super User
January 5, 2024