2021-04-24 11:53 AM
I've purchased an STM32L0358-disco board and I'm trying to get USB CDC to work.
Here's the steps I took:
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
Solved! Go to Solution.
2021-05-13 04:49 AM
After plugging the device into another PC, it is recognized immediately. So the problems was with my laptop. So to answer my own question; yes, if you enable the VCP middleware in CubeMX, the device will be detected as a virtual COM port without requiring any further modifications to the code.
2021-04-24 01:40 PM
<deleted>
2021-04-24 02:00 PM
The USB Device not functioning properly typically isn't a driver side issue.
Perhaps look at porting this example to your board
STM32Cube_FW_L0_V1.11.0\Projects\STM32L073Z-EVAL\Applications\USB_Device\CDC_Standalone
2021-04-25 12:50 AM
Thanks for the quick reply! I'm using the STM32L0538-disco board, so the hardware should not be the issue. I'm going to take a look at the example.
2021-05-03 03:06 AM
I've compared the CDC_standalone example code with the generated code and I cannot spot any difference. Can someone confirm my statement that the device should at least show up as a virtual COM port when adding the CDC middleware, even if my code doesn't do anything with the virtual COM port? (all interrupt handlers seem to be generated correctly and added to the interrupt table)
2021-05-13 04:49 AM
After plugging the device into another PC, it is recognized immediately. So the problems was with my laptop. So to answer my own question; yes, if you enable the VCP middleware in CubeMX, the device will be detected as a virtual COM port without requiring any further modifications to the code.