AnsweredAssumed Answered

STML152 EXTI9_5 and USB

Question asked by will.j on Feb 26, 2013
Latest reply on Feb 26, 2013 by will.j
While trying to get an interrupt working that monitors the USB VCC voltage to detect USB cable connection/disconnection, I found a very strange problem. Whenever USB is enabled (as it should since that's what I'm monitoring), the EXTI9_5 interrupt will not fire. This is despite my attempts to ensure that EXTI9_5 interrupt has higher (lower value) priority.

If I disable USB by not allowing the USB connection to start, the interrupt triggers as expected, so the initialization code is correct in that sense.

After looking at the reference code for the STM32L152D-EVAL, I noticed that in the Mass Storage section, the Joystick interrupts are disabled before the USB is enabled:

/* Disable the JoyStick interrupts */

They joystick uses the same EXTI9_5 interrupt.

This is in mass storage start. So, I am suspecting that there's something  that prevents EXT (I'm using EXTI6 ) from working with USB. Is this the case? Why is the joystick disabled beforehand? Are the USB interrupts interfereing with EXTI9_5?

I'd appreciate any insight into this.