cancel
Showing results for 
Search instead for 
Did you mean: 

Use stm32cubeprogrammer via RS485

BKime.1
Associate

We have the following situation, such that the UART is translated by the FPGA from a half duplex RS485.0693W000008xWLgQAM.png 

Can the stm32cubeprogrammer be used in such a way? what is required from the FPGA? or the MOXA driver operates in such a way that it is transparent to the software?

2 REPLIES 2
Houda GHABRI
ST Employee

Hi BKime.1 ,

We assume you are using an USB to RS485 adapter. If the adapter is exposing a COM port to the PC and the FPGA is doing needed translation it should work but never tested by STM32CubeProgrammer team.

Hope this helps you.

Houda

Somehow I suspect you'll need to do some buffering or management on the FPGA side with an understanding of the STM32's boot protocol.

The ROM firmware doesn't expect half-duplex, and while I don't think it deals with signals concurrently it does make the assumption that it turns-around immediately. ie you send a command byte, and it sends back a response. The ability to hold a handful of bytes, or use different baud rates on the various legs might allow you to mitigate this. The STM32 doesn't really care what baud rate is used, it expects an 8E1 frame setting, but auto-bauds on the 0x7F bit pattern.

You might also consider other protocols to the STM32, say where the RS485 converts to an I2C connection via a state-machine.

You're also not bound to using STM32 Cube Programmer, the protocols for the loader are documented and can be implemented independently, on a platform of one's own chosing.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..