2021-06-03 08:45 PM
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.
2021-06-03 10:36 PM
Which 'L4?
JW
2021-06-04 06:25 AM
L443. This should apply to any L4x2 and L4x3.
2021-06-05 12:53 AM
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
2021-06-06 05:51 PM
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?
2021-06-06 08:46 PM
No, sorry.
Try to have a look at CubeL4.
JW