2018-08-19 07:37 PM
On STM32L476 Discovery and TrueSTUDIO 9.0.1, USB CDC fails on Windows 10, if code is generated by STM32Cube MCU package of STM32L4 version 1.12.0. Back to version 1.11.0, it works fine. Furthermore, at 48 MHz USB clock, if SYSCLK = 48 MHz, the USB code is OK. But if SYSCLK = 16 MHz, the USB code fail. Why ?
2018-09-13 06:45 AM
I observe the same problem with 1.12, I was on 1.8.1 and it was working fine, but after update I could not make it work. I will try 1.11 to see if it also solve my problems.
For the USB, make sure the clock is precise to 48 MHz for the USB part. If this clock is not precise enough the USB will not work. You can give a look at the clock documentation to see if this is supported.
2018-09-13 07:11 AM
Here is my setting with a SysClock of 16 MHz that work for USB if that might help:
2018-09-13 07:14 AM
Sorry, seem like the image did not follow
2018-09-13 09:16 AM
Can confirm 1.11.0 is working fine on my side, but 1.12.0 is breaking everything.
2018-09-21 11:33 AM
I am trying 1.13.0 and it says that the file isn't available (while downloading from the site) and if I do it from local it says Problem During Unzip of file... Any clues on how to make this work?
2018-09-22 09:22 AM
If you have enabled battery charger detection, that is certainly broken in 1.12.0 (see my post reporting the defect for the work-around). Otherwise, I have USB CDC working on 1.12.0 just fine. I don't recall having to make any other changes to my project when upgrading from 1.8.1, but I could certainly be forgetting something. Nothing in the diff stood out (lots of noise in the diff though).
If you are compiling at high optimization with GCC, note that I had to back of from -O3 to -O2 with 1.12.0. Modern GCC will just ignore code that attempts to invoke UB.
2018-10-05 09:05 AM
Humm, 1.12.0 doesn't even have a descriptor working on my side after the upgrade at -O0
STM32L476 here too. I have a composite with CDC and HID, but even the descriptor is destroyed by the update, so the device cannot even connect to the host properly when plug-in.
I did try the 1.13.0, it does make the same problems as the 1.12.0, less noisy update since the callback to replace the __weak were reverted. I don't see anything wrong of the bat, but a lot of changes did occurred regarding the USB STALL state.
2018-10-07 07:43 PM
I have USB CDC working on a '433 part with 1.12.0 HAL. There could be a problem in the OTG support that I am just not hitting.