cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling USB interrupt pin

nps
Associate II
Posted on July 27, 2015 at 04:55

Hi all,

In STM32 USB device, there is an internally connected EXTI_Line18 for USB interrupt. When USB is connected to HOST, an interrupt is generated on this line. Is there a way of sampling the status of this line? I would like to monitor this as gpio input and see if it is in high or low state. Can this be done? If yes, which port is this i/o connected to? Thank you.

2 REPLIES 2
Posted on July 27, 2015 at 13:18

But it's NOT a GPIO Pin. Perhaps you can look at the EXTI peripheral, does it flag in the pending register even if you don't have it enabled to actually generate an interrupt?

Failing that just have an interrupt that sets or clears a flag via the EXTI.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
nps
Associate II
Posted on July 28, 2015 at 09:30

Hi clive1,

Thanks for the reply. The idea is to detect when a HOST is plugged-in and plugged-out. I am using a flag but a better and positive method would be to sample the pin. I will look into the EXTI registers.

Partha