cancel
Showing results for 
Search instead for 
Did you mean: 

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

Pokry
Associate

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

1 ACCEPTED SOLUTION

Accepted Solutions
HFISTM
ST Employee

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

View solution in original post

1 REPLY 1
HFISTM
ST Employee

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