cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F303 USB CDC tutorial

Manoj Hiwarkar
Associate III

Hello,

I am trying the USB Communication stm32f303 with android phone usins CDC USB TERMINAL app . I am able transmit all the string. But while reception I am receiving only the first character.

13 REPLIES 13
Imen.D
ST Employee

Hello @Bench​ ,

You are right, I confirm that using STM32CubeMx (version 4.27.0), the MspInit functions are empty and there is no GPIO Configuration for STM32F303 and STM32F302.

This issue is raised internally to CubeMx team for fix.

Thank you for bringing this issue to our attention.

Kind Regards,

Imen.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

hi Manoj

i'm also facing same kind of issue inSTM32L452RE controller ,can u explain how u solved that issue

SFrin
Associate II

I have no Android device with USB host, but I use Linux computers daily. I tried the CDC code from Cube HAL a few days ago and it worked out of the box. So you may retry with the current Cube HAL release.

I also developed an independent driver that you may try: https://translate.google.com/translate?hl=en&sl=de&tl=en&u=http%3A%2F%2Fstefanfrings.de%2Fstm32%2Fstm32f3.html%23vcpnohal&sandbox=1

The code is very compact and straight forward, only two files (usb.c and usb.h).

The driver contains the company name "Nuvoton" because it was originally published by a member of that company. If you like to contact him, leave a message in https://www.embdev.net

It's impossible to find any f303ze USB resources. Struggling to even get it to receive setup packets. Initializing it with the HAL and it seems to only trigger the resume interrupt when plugged in. Then nothing. Wish there was actual documentation about how to use this thing