Skip to main content
Visitor II
October 5, 2022
Solved

USB-C communication (X-NUCLEO_USBPDM1 and STM32G474) with a PC

  • October 5, 2022
  • 1 reply
  • 1624 views

Hi all,

I purchased the nucleo-stm32g474 board and the z-nucleo-USBPDM1. I would like to use the USB port to communicate with the computer at speed (HIGH SPEED). 

I am unable to find an example of how to do this and how to communicate with the microcontroller.

I will only add that I have run an example that works: 

github x-cube-tcpp/

I would be very grateful for your help.

Regards

    This topic has been closed for replies.
    Best answer by HFISTM

    Hello @Pokry​ ,

    You need to search for "USB" example. USB type C is just the connector. If you want to communicate to a computer via USB, then you should look at the following example, which would need to be adapted to your nucleo: https://github.com/STMicroelectronics/STM32CubeG4/tree/master/Projects/STM32G474E-EVAL/Applications/USB_Device/CDC_Standalone

    One specific thing with USB-C, is that you will need to activate UCPD and USBPD in CubeMX in order to have either full power delivery (see wiki tuto) or just to activate "Type C only" in the stack configuration if you don't need power delivery. USB is for data, USBPD is for the power part of USB type C to summarize.

    As you have the SNK1M1 shield, you could start with the corresponding example in x-cube-tcpp, then in the CubeMX view, add the USB peripheral and play with the USB configuration.

    Regards

    1 reply

    HFISTMAnswer
    ST Employee
    October 14, 2022

    Hello @Pokry​ ,

    You need to search for "USB" example. USB type C is just the connector. If you want to communicate to a computer via USB, then you should look at the following example, which would need to be adapted to your nucleo: https://github.com/STMicroelectronics/STM32CubeG4/tree/master/Projects/STM32G474E-EVAL/Applications/USB_Device/CDC_Standalone

    One specific thing with USB-C, is that you will need to activate UCPD and USBPD in CubeMX in order to have either full power delivery (see wiki tuto) or just to activate "Type C only" in the stack configuration if you don't need power delivery. USB is for data, USBPD is for the power part of USB type C to summarize.

    As you have the SNK1M1 shield, you could start with the corresponding example in x-cube-tcpp, then in the CubeMX view, add the USB peripheral and play with the USB configuration.

    Regards