AnsweredAssumed Answered

STM32L1 - USB Connection / Disconnection not provided by API

Question asked by gilbert.cedric on Aug 27, 2015
Latest reply on Aug 31, 2015 by gilbert.cedric
Hello there,

Trying to handle USB connection / disconnection event I realize that in stm32l1 usb api, there are no call to HAL_PCD_ConnectCallback neither HAL_PCD_DisconnectCallback as there are in STM32F4 !

The session start/stop only works with HAL_PCD_ResumeCallback/HAL_PCD_SuspendCallback.

These callbacks are called from HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd) in stm32l1xx_hal_pcd.c which manage PCD IRQ.

At the moment, it seems there's no USB_ISTR register flag for detecting connection / disconnection.

Do someone find a clean solution for handling these events, especialy regarding power management and safety of use ?

Thx.


Outcomes