cancel
Showing results for 
Search instead for 
Did you mean: 

How can I send data with USB FS at STM32F373?

DMårt
Lead

Hi!

I have STM32F373 and I want to send data with USB FS.

0693W00000Baq3SQAR.pngWhen I generate a project, I get this struct.

PCD_HandleTypeDef hpcd_USB_FS;

What should I do to send data with that struct?

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer
1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> By the way! This using USB CDC. I'm using USB PCD.

The PCD (peripheral control driver) is not specific to any particular device type. Since you were trying to send data, I assumed you wanted the USB CDC device. All devices, including CDC, are implemented via the PCD.

https://www.st.com/resource/en/user_manual/dm00108129-stm32cube-usb-device-library-stmicroelectronics.pdf

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

5 REPLIES 5
TDK
Guru

The best thing would be to follow a Cube example:

https://github.com/STMicroelectronics/STM32CubeF3/tree/86346f63f25b859f93f9603837dcd5be28e8e7bf/Projects/STM32373C_EVAL/Applications/USB_Device/CDC_Standalone

Be aware that USB is a lot more complex than something like UART.

If you feel a post has answered your question, please click "Accept as Solution".

Thank you. Yes I understand that. I just want to try it out and see if ST's USB is well made.

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer

By the way! This using USB CDC. I'm using USB PCD.

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer
TDK
Guru

> By the way! This using USB CDC. I'm using USB PCD.

The PCD (peripheral control driver) is not specific to any particular device type. Since you were trying to send data, I assumed you wanted the USB CDC device. All devices, including CDC, are implemented via the PCD.

https://www.st.com/resource/en/user_manual/dm00108129-stm32cube-usb-device-library-stmicroelectronics.pdf

If you feel a post has answered your question, please click "Accept as Solution".

Thank you once again!

I can see now that I need to use HAL_PCD_EP_... HAL-functions such as HAL_PCD_EP_Open, HAL_PCD_EP_Receive, HAL_PCD_EP_Transmit etc to talk to other USB devices such as my computer.

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer