2024-10-28 03:33 AM - last edited on 2024-10-28 06:21 AM by Andrew Neil
Hi, i want the communication between stm32f411re board and raspberry pi 4. i tried to do with uart2 through USB cable it is working fine. but sometimes it is not able to communicate properly. there is a delay while communicating sometimes. will i2c or spi communication works with USB cable to communicate. which is better and i want the one efficient to work as i want both ways communication.
Solved! Go to Solution.
2024-11-05 04:33 AM
Okay sure, the problem is with the delay in the communication of stm32 Nucleo board and raspberry pi through UART. but later i have understood that the delay is not with the communication but with the motors drivers and working of that. Thank you for your time.
2024-10-28 03:40 AM - edited 2024-10-28 03:43 AM
@suhfi wrote:sometimes it is not able to communicate properly. there is a delay while communicating sometimes
There no inherent reason why that should happen with a UART connection.
You need to find out what's causing this delay - it must be something elsewhere in your system.
Changing to some other transport won't fix that.
Have you tried using the Raspberry Pi's hardware UART ?
PS:
@suhfi wrote:uart2 through USB cable
Please give more details of that.
I assume you mean a USB-to-UART cable/adaptor somewhere?
2024-10-28 03:50 AM
Hello,
Related to this thread: https://community.st.com/t5/stm32-mcus-products/communication-between-nucleo-f411re-and-raspberry-pi-using-st/td-p/721443
@suhfi wrote:
but sometimes it is not able to communicate properly. there is a delay while communicating sometimes.
Need to clarify this statement. From which side? STM32 delays the transmit or Raspberry-Pi?
2024-10-28 03:51 AM
We've been through this before:
So what's changed now?
2024-10-28 03:52 AM
No, i didn't do the communication by connecting the gpio pins, but from the usb cable. there is a delay for sure. i didn't mention any delay with that, then why am i facing delay with the comunication.
2024-10-28 03:54 AM - edited 2024-10-28 03:57 AM
@suhfi wrote:i didn't do the communication by connecting the gpio pins, but from the usb cable.
Again, you need to give more details.
How, exactly, are you making this USB connection?
Show a schematic.
Post photographs.
What, exactly, is the "stm32f411re board" you are using?
Is it still the same as this:
2024-10-28 03:59 AM
@suhfi wrote:i didn't mention any delay with that,
With what, exactly?
2024-10-28 04:33 AM
@suhfi wrote:
No, i didn't do the communication by connecting the gpio pins, but from the usb cable. there is a delay for sure. i didn't mention any delay with that, then why am i facing delay with the comunication.
Need also to post your code
+ Show how you did connect the Nucleo board with the Raspberry board.. Share photo(s).
2024-10-28 05:05 AM
Thank you for the replies, i did solve the problem.
2024-10-28 05:08 AM