XaviPacheco wrote: ↑
Fri May 11, 2018 1:51 pm
I want to communicate a Pi with STM32 within a distance between 7 and 10 feet. Is it suggested to connect directly pins RX and TX without problems and use UART communication?
Unless you are in a particularly electrically noisy environment, this should work fine over these distances.
Or should I use line drivers like SP232e (if I use RS232)?
This would be more robust than just using the TTL signals, but probably isn't necessary over short distance for a non-critical "hobby project".
Can I use USB ports of the raspberry to communicate with the STM32?
Yes, if your STM32 has USB support hardware and software then you can go USB to USB. This would normally be my preference over using the serial ports as it supports differential signaling and very high data rates.
I would appreciate any guidance regarding the best way to interface both microcontrollers taking into account possible external noises which could affect communication.
What STM32 product and development environment are you using?