2019-12-06 11:54 AM
Hi All,
I have a strange problem. I made a custom board with a stm32l151VETx and i cannot get the VPC to work. No device shows up in the device manager nor on linux under dmesg. However if I change the boot pins so that the internal bootloader starts the DFU mode works without a problem. I can even upload new firmware files.
That leads me to believe that the hardware side of things is working correctly.
That means that the problem must a software problem, I however cannot find it. I made several other custom boards and the USB always just worked after configuring it with Cube MX.
I created a blank CubeMx project for the stm32l151VETx and changed the following things:
System Core > RCC > HSE > Crystal / Ceramic Resonator
Connectivity > USB > Device(FS)
Middleware > Class For FS IP > Communication Device Class (Virtual Port Com)
Clock config to:
Then I generated the code and used STM Workbench to compile and upload the code. If I use the debugger I can also step through the code and it seems to run normally. But no usb devices shows up.
What I already tried.
> Using RTOS / NO RTOS
> Adding a delay befor the MX_USB_DEVICE_Init()
> Increasing the HSE startup time
> Chaning the time base to HAL timer
> Playing around with the clock config
But now I'm out of ideas? Am I correct in assuming that the hardware should be ok? What other things could I try?
2019-12-06 12:17 PM
Check the CubeL1 repository for VCP Device examples
Check HSE_VALUE define, check clocks/plls as reported by RCC register decomposition.