AnsweredAssumed Answered

STM32L4 USB Connect/Disconnect Detection

Question asked by kenney.jacob on Oct 18, 2016
Latest reply on Oct 19, 2016 by kenney.jacob
I'm working on USB on an STM32L4 chip and cannot seem to reliably trigger when a USB Device is both Connected and Disconnected. I trigger the interrupt overall and handle it, but I need changes to happen as soon as a device is connected and then handle some special case for when a USB is disconnected. USBD_LL_DevConnected() will trigger off reset for the very first connection of USB, but never again after when I unplug and re-plug in the USB and USBD_LL_DevDisconnected() never seems to trigger. Has anyone else found a way around this? Overall, my OTG_FS_IRQHandler() does get called and connects to the device correctly. Does anyone know if there is a setting I am missing that would enable the detection of both of these states?

Thank you.