Skip to main content
Visitor II
September 18, 2024
Solved

Communication between Nucleo-F411RE and Raspberry Pi using ST-Link VCP

  • September 18, 2024
  • 4 replies
  • 8557 views

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.

    This topic has been closed for replies.
    Best answer by Andrew Neil

    @suhfi wrote:

    okay, we enable the usart connectivity, how do we connect them


    The UART connection is carried over the USB link.

    • Whatever is sent from the UART on the STM32 will be received on the host via its Virtual COM Port; eg, COM13 on your PC or /dev/ttyACM0 on my Raspberry Pi
    • Whatever is sent to the Virtual COM Port on the host (eg,COM13 or /dev/ttyACM0) will be received at the UART on the STM32.

    @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.

    4 replies

    Super User
    September 18, 2024

    You need to give more details:

    https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

     


    @suhfi wrote:

    CN1 of stm32.


    STM32 is just the microcontroller chip - it has no CN1

    Are you talking about a Nucleo-F411RE board ?

     

    AndrewNeil_1-1726652761299.png

    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?

    https://www.st.com/resource/en/user_manual/um1724-stm32-nucleo64-boards-mb1136-stmicroelectronics.pdf#page=25

    Does the ST-Link's VCP show up on the RPi when you plug it in?

     

    Technical Moderator
    September 18, 2024

    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.

    Super User
    September 18, 2024
    suhfiAuthor
    Visitor II
    September 18, 2024

    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.

    Technical Moderator
    September 18, 2024

    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

     

    Super User
    September 18, 2024

    @mƎALLEm 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)?