SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download two short videos (registration required) highlighting:

System Workbench for STM32

USB and L4 discovery board

Want to add USB serial commuication to my L469 discovery board. Started with the USB device HAL sample ‘CDC-standalone’ from L469_eval board. Same cpu so how hard could it be?

Changed the LED related code (L429 has only 2leds) and switched the clock to use
USB_USE_LSE_MSI_CLOCK since there is no external clock available with L429 discovery.
Changed to include stm32l476g_discovery.h (instead of stm32l476g_eval.h)

Finally modified the different pinout for the usb (usbd_conf.c), so I adapted to PC11 and PC12 for VBUS + FS_ID in HAL_PCD_MspInit(). PA11/PA12 are used for DP/DM signal line.

Code builds, runs fine and idles in the main loop.Now when I plug in a USB cable I should see some action. But nothing is happening. The green LED6 turns on.
But I do not see any enumeration going. I do not even see a single USB interrupt in OTG_FS_IRQHandler().

Thought I ticked all the boxes, but something is missing!
Shouldn’t the code from the L469-eval board work very similiar on the L469-discovery?

Any pointers are appreciated!


I have use variuos usb devcie (cdc/hid/msc) with various stm32f4 but always via CubeMX and always worked almost of the box
So it”s worth ginving iy a try.

iti s quite easy to miss one init and break everything by copy pastign only part of exmaple it is wize to use the exampel as start point
What about clok ? Are your sure about your 48MHz? if that clcok is wrong usb will not work.
Do you have usb ip clk enable ?
do you have the all the PCD and USB LL file right ?
Not that “fs id” is needed only if you want to suport “otg”, the minimal requirement for devcie only (self pwoered) is DP/DM all other are optional.

if the base usb is ok at least you should get a first Irq (on cable plug ) after that much more need to happen to compelte the enumeration .

Yes usb code from L4689 eval shalll work on dsicovery (same mcu)
note that debuging usb emueration and transsfer comonly lead to enumeration or xfer failure due to short time out on the host side but its still help udedrtanding how things going on device.

Thanks for the feedback ‘Diabolo38’. I followed your advice and build a CDC usb project using STMCube.
Was actually straight forward, less complicated than I thought. Some minor Macro error in the stmCube build code but easy to solve and everything builds. Thats the good part.

Runtime is actually still no success. I do not get any USB interrupts when plugging it into a host.
One thing I noticed os that the USB led in active without having it hooked up to the host.

I have the feeling it might be something hardware related. Anybody ever done sucessfully USB on a L469 discovery board?

Unfortunately the pins for USB are not available on the outside connector. Maybe a trace could shed some more light on the issue.


Just did the same exercise with a F072 discovery board. and ‘Voila’ that’s what I was looking for. It enumerates the first time I plug it in.
Not sure how that works with Win7, Does it need a special driver?
No problem though on Linux. I have now a new /dev/TTYACM0 device.

That broings uo the question: what is wrong with the L469 discovery board?


got my hand on a L0 discovert board. Created the USB cdc code with STM Cube. buolds and works like a charm. Enumerates once you plug it in.

Still raises the question what’s wrong with the L4 discovery?

I checked the DP and DM line seems to be hooked up fine from the connector to the CPU pins. Ran a LA trace. Onc ethe connecytor is plugged in. I dont see any edges on the DP and DM lines. the lines stay low all the times.


Were you able to solve the USB issue with the STM32L4 discovery board? I am facing the same problem now. I added a 8mhz crystal just to make sure there were no clock issues involved in the USB connection. I cannot get the USB device to work, DP and DM stay low. I also noticed that the Vbus stays low too unless the onboard regulator is turned on.


Sorry I did not find a solution yet. Unfortunately nobody from ST chimed in. I always planned to use it with another IDE to see if that cure the issue. Though I do not have access to one at this moment.

When using an external crystal did you make sure that the USB is driven @ 48MHz?

Maybe there is a reason why ST does not offer a working example for this discovery board. Who knows ;-)


I made sure the USB clock was 48Mhz in the stm32cube settings. I had my suspicions when I did not find a USB example for this board, I have to agree with your conclusion that something is wrong for the time being.
Thanks for replying Mat. I will post an update in case I get it working.


Have you had any luck getting the USB working on the L469-discovery? I am having the same problem!

Paul J


Last week I had the same problem with 32L476GDISCOVERY. I resolved it following the instructions from UM1879 document:

In order to connect the OTG_FS_VBUS and OTG_FS_ID signals from the connector CN7 to the OTG FS hardware IP of STM32L476VGT6, please remove the LCD from its socket U5, and close SB24 and SB25.

Then, I built a project with STMCubeMX configuring USB_OTG_FS as device_only with activate_vbus and resolving clock issues automatically.

I hope this can help you.

Best regards,

I’ve followed UM1879 but I’m still having an issue when using the USB in *host* mode.
However I note you are saying that you select ‘device only’ mode.
Does this let the USB run on OTG mode (which I might be able to use at a pinch)?

Hi Susan,

Nowadays I don’t have much time but I have tested a very simple project (using STMCubeMX ) with HID and MSC classes in HOST mode.
The discovery was able to detect and enumerate a mouse and a USB memory stick.