cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE Code generation for Nucleo-L552ZE-Q with USB FS Device (no IRQ by default)

CSeil.1
Associate

Hi there,

(I'm posting this mainly not as a question, because I know the answer, but as an answer for other people to find, because I spent quite a long time trying to figure this out.)

I've recently started with a project that uses the Nucleo-L552ZE-Q board. I've done some things with microcontrollers previously, but nothing with the STM32 until now.

I downloaded STM32CubeIDE, created a new project for that board, said yes when it asked to add all of the default peripherals for that board, and added the USB FS device middleware (which specific device class didn't actually matter here). This didn't work out of the box, the newly created project didn't actually enumerate properly with the host.

I spent a couple of hours debugging this issue, until I figured out that the interrupt handler wasn't actually called, which is why the device didn't react to USB.

I found a checkbox in the Pinout&Configuration tab, under Connectivity -> USB -> NVIC Settings, which is called "USB FS global interrupt / USB FS wake-up interrupt through EXTI line 34". That box was unset by default, and adding the checkbox by default caused the enumeration to work -- and I could then add code that actually used the interface.

It would be great if this could either be on by default (at least when enabling USB support), or there could at least be a warning that if the USB middleware is enabled the user gets an indication of what needs to be enabled for that to actually work. Especially since it'd be great for USB to work out of the box with STM32cubeIDE's code generation.

Thanks!

1 REPLY 1
Mike_ST
ST Employee

Thank you.

Ticket entered.