How to use USB CDC driver for STM32L053?
I've purchased an STM32L0358-disco board and I'm trying to get USB CDC to work.
Here's the steps I took:
- Create a new project for the STM32L0538 mcu in STM32CubeIDE
- Enable the USB peripheral
- Enable the USB Middleware and set the class to Communication Device Class (VCP)
- Using the Clock Configuration tab, set the USB peripheral to use the 48 MHz RC oscillator
- Generate code
- Run
From what I'm reading online and in the generated code, this should be sufficient to get Windows to recognize the device as a USB CDC device. However, I'm getting the error "USB Device not recognized". Looking in the device manager, Windows reports "Windows has stopped this device because it has reported problems. (Code 43)". As far as I understand it, code 43 means that Windows sees the 1.5k pullup on the D+ line, but the device is not responding.
Am I correct in assuming that running this code, the device should show up as a virtual COM port? If yes, what could be going wrong here?
I'm running Windows 10 20H2 (10.0.19042.928), STM32CubeIDE 1.5.0 and I'm using the latest cube package STM32Cube FW_L0 V1.12.0.
Kind regards,
Jim
