2021-11-10 03:27 AM
Hello,
I'm having a STM32F407 and when I'm using the UART connectivity, connected at another device unplugged and with an unknown state, this unknown state cause, sometimes, an abnormal starting of my STM32F407.
My other device is a Raspberry Pi, which starts with an unknown state cause of the long delay to set their gpio to a UART communication.
Edit: My Problem is especially cause of the Tx of my STM32 connected at my Raspberry.
If I plug my Tx (STM32 Part) after that my raspberry is started, everything works.
Do you have any idea to setting-up this state during this starts delay?
2021-11-10 04:18 AM
is that TTL connected ?
use a 1k in series on Rx and Tx lines to save the IO pins from surges on startup.
Receive all the rubbish and dump it. wait for a handshake data train, like 0xA5,0x5A, or something like that to sync the two machine states,
2021-11-10 05:46 AM
Consider using a separate pin with a pulldown that the RPi initializes to default low and sets high to signal that it is ready to communicate.
2021-11-10 06:00 AM
It's directy by connected, the UART of the STM32 and The serial port of my Raspberry, not by using TTL into USB converter.
Thanks for your answer, I have already connected one, 1k resistance in series on Rx lines and Tx lines, but no improvement appear, so I now leave them resistance, even if this didn't resolve my problem.
2021-11-10 06:51 AM
Yes, it's can be tried but, it's in an electronic card that i can't already use another gpio in my STM32. And I will edit my topic cause It's my Tx (STM32 part) which cause a problem, when I unplug it at the start, and sometimes after, I plug it into the Rx of my Raspberry, everything works.