Skip to main content
ZGomo
Associate
August 21, 2018
Question

CubeMX F3 USB code generation bug

  • August 21, 2018
  • 5 replies
  • 1171 views

Hi,

I'm trying to use the current CubeMX to generate USB CDC code for SMT32F303RE. The generated code doesn't connect to my Windows 10 machine. The device not even appear.

I did almost the same on STM32F411RE and STM32F407VG, both works perfectly.

Looking into the code I realized that the GPIO initialization code is not generated, I added it, but still no success.

I'm using the following components:

CubeMX v4.26.1

STM32F3 Series driver package v1.10.0

STM32F4 Serias driver package v1.21.0

Atollic TrueStudio v9.0.1

Thanks

Zoltan

This topic has been closed for replies.

5 replies

Technical Moderator
August 31, 2018

Hello @ZGomo​ ,

Try to increase the heap and stack sizes.

Please, follow this FAQ "USB device not recognized", this may helps you:

https://st-microelectronics.jiveon.com/docs/DOC-1821-faq-usb-device-not-recognized

With Regards,

Imen

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
Bench
Associate III
August 31, 2018

Hi,

i have the same problem and observed the same thing that the GPIOs are not initialized for the usb cdc. Tried the same and it doesnt work. Also tried increasing the heap size but for me it didn't change anything.

I hope we can resolve this!

Best regards

ZGomo
ZGomoAuthor
Associate
September 2, 2018

Hello @Imen DAHMEN​ ,

Unfortunately it doesn't help here.

The problem is not the "USB device not recognized", but the device doesn't show up. It is same like I didn't connect anything to my computer.

Actually I don't have enough time to dig deeper now as it started to work with F407VG, and I'm at early stage of the design, it has a few additional features what can be handy, so I simply switched to F407VG.

Maybe later I can work on a bit. This post mainly want to be a bug report, to enhance the code of the CubeMX, maybe someone can test it, and find out, if there is a problem or not.

Regards,

Zoltan

Tesla DeLorean
Guru
September 2, 2018

Try validating the hardware using the HAL examples.

Try also known working hardware like the F3-DISCO

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Bench
Associate III
September 3, 2018

Hi Clive,

I checked the hardware with the avail​able HID example for the stm32f303ze board. This worked. So I don't think it is a hardware problem. I would guess that it is a software /configuration problem in cubeMX. Is that possible? I also think that the GPIO configuration is missing in the generated code.

​thank you!