2024-09-18 02:38 AM - last edited on 2024-09-18 05:21 AM by Andrew Neil
Hello, i am using STM32F411RE with raspberry pi 4. i want to communicate rasp with stm32 through usb cable from pi to CN1 of stm32. i want the communication both ways. could you please tell me how to do it?
Thank you in advance.
Solved! Go to Solution.
2024-09-18 06:08 AM
@suhfi wrote:okay, we enable the usart connectivity, how do we connect them
The UART connection is carried over the USB link.
@suhfi wrote:but i can say the stm32 nucleo board and raspberry pi 4 has voltage differences
That's all taken care of by the USB link
@suhfi wrote:i dont want jumper pins to be connected.
The default configuration of the Nucleo board is that USART2 of the stm32f411re microcontroller chip is connected to the ST-Link's VCP - you shouldn't need to modify any links.
2024-09-18 02:51 AM - edited 2024-09-18 02:52 AM
You need to give more details:
@suhfi wrote:CN1 of stm32.
STM32 is just the microcontroller chip - it has no CN1
Are you talking about a Nucleo-F411RE board ?
https://www.st.com/en/evaluation-tools/nucleo-f411re.html
In which case CN1 is the ST-Link connector.
So you're wanting to use the ST-Link's VCP (Virtual COM Port) for UART communication with your RPi?
Does the ST-Link's VCP show up on the RPi when you plug it in?
2024-09-18 02:53 AM
Hello @suhfi ,
The title needs to provide a summury of your request. Putting "Communication" as a title doesn't give a clear information about your request. The title needs also to be concise. I'm updating your title then ..
I invite you to read these tips on how to post in this community.
Thank you for your understanding.
2024-09-18 02:56 AM - edited 2024-09-18 02:59 AM
On using a direct UART connection:
Or use a USB-to-UART converter ?
2024-09-18 03:08 AM
yes, i want to know how to do the communication between stm32f411re and raspberry pi 4 using usb cable connected to raspberry pi 4 and CN1 of stm32f411re. how can i do that.
i have seen many blogs but none of them are clear how to do thatt.
i want two way communication between them.
2024-09-18 04:32 AM - edited 2024-09-18 04:35 AM
You need that Raspberry detects your STLINK as VCP (Virtual Comport).
So it's a Linux stuff not related to the STM32:
So to me the subject is more: "How to detect and use Serial Ports under Linux"
See these links:
https://www.cyberciti.biz/faq/find-out-linux-serial-ports-with-setserial/
https://thelinuxforum.com/articles/752-how-to-list-serial-ports-on-linux
...
I think you need to get something like: ttyUSB
2024-09-18 04:49 AM - edited 2024-11-20 12:59 AM
@suhfi wrote:CN1 of stm32f411re. .
Again, stm32f411re is just the MCU chip - it has no CN1.
https://www.st.com/en/microcontrollers-microprocessors/stm32f411re.html
These are chips:
So are you talking about a Nucleo-F411RE board ?
https://www.st.com/en/evaluation-tools/nucleo-f411re.html
To clarify, the chip is highlighted in red; the board in blue:
PS:
Another example:
#BoardVsChip #ChipVsBoard
2024-09-18 04:54 AM
@SofLit wrote:You need that Raspberry detects your STLINK as VCP (Virtual Comport).
Exactly.
Do you know if an ST-Link's VCP should "just work" on Linux (and on RPi Linux, in particular)?
2024-09-18 04:57 AM
so i have enabled communication device class, and wrote the code for transmitting. but when i connect in Teraterm, i am not able to see the transmitted message. the stm32f411re isn't sending the message. i tried debugging the code and i can see the data that is sent is blank, that means stm32 isn't sending the data.
2024-09-18 05:03 AM
@Andrew Neil wrote:
Do you know if an ST-Link's VCP should "just work" on Linux (and on RPi Linux, in particular)?
I think it could.. It's detected on windows as VCP I don't see any reason why it won't be detected on Linux.