AnsweredAssumed Answered

STM32L4 DISCO USB DEVICE DOES NOT WORK

Question asked by gang on Apr 11, 2016
Latest reply on Apr 12, 2018 by Cyril FENARD
I used CUBEMX (Version 4.14.0) to generate a small usb test program for stm32l4 discovery board. The L4 Lib is Version 1.4.0.
When i only initialize USB as device (class CDC) it doesnt' work. All registers seem to be ok, but it doesn't enumerate, the DP pin remains low after USB_Start.
If i also initialize teh UART1, USB works. I even don't need to initialze UART1 completely, but have to enable the UART1 Clock, initialze the GPIO-Pins, and set UART1.CR1 TE and RE to 1. It is strange because the USB core shuldn't have anything to do with UART1. I used a 32khz on LSE and PLL. The CubeMX generator doesn't show any error or warning. The same behavoir shows also the Arduino board.
Can one explains why? or If someone have a working ioc file which only initialze the USB for STM32L4 Discovery board or Arduino board?

Outcomes