cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 USB polling: Which interrupt line?

DOCon.1
Senior

Hi. I'm having trouble managing a USB slave on STM32L4 using interrupt. I'm able to make it work using polling, and on a previous F3 project, had polling working.

From RM, NVIC section, F3 has 3 USB lines: Wakeup, LP, and HP (HP and LP are shared with CAN). You handle USB requests using the LP line (maybe HP as well; didn't try). On L4, how do I do this, given it doesn't have these lines? Than you.

edit: It looks like G4 uses the same scheme as F3, with line 19 and 20 as the USB LP and HP lines. I tried this on L4 (despite it not being documented), but no luck.

edit: Figured out my code problem: I had to modify the interrupt table, and made some errors there. I'm still curious why we don't have the LP and HP interrupts on L4.

5 REPLIES 5

Which 'L4?

JW

DOCon.1
Senior

L443. This should apply to any L4x2 and L4x3.

According to UM0394, USB interrupt goes through EXTI17, so you need to set EXTI properly to trigger interrupt on that line, probably on rising edge.

JW

DOCon.1
Senior

Thank you. I've done that; no progress. Note that that line lets you unmask, in EXTI_IMR, but has no RTSR or FTSR fields. (Reserved on L4, although other MCUs have it)

Any idea what's going on with only having a wakeup interrupt?

No, sorry.

Try to have a look at CubeL4.

JW