AnsweredAssumed Answered

How to detect USB plugin and unplug (stm32L152)

Question asked by liao.chengyi on Jan 1, 2016
Latest reply on Jun 13, 2016 by FTITI.Walid
Hi All,

How to detect USB plugin and unplug?

I used the stm32L152 and USB CDC class.
I want to show plugin information on OLED, need to know when the usb plugin and unplug, but I can't find the solution?

I used a flag to check event at HAL_PCD_ConnectCallback() and HAL_PCD_DisconnectCallback(), but not work.

Thank you for your answer!