How to check the USB connect/disconnect run time?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-04-08 6:58 AM
Hi,
We are using STMCubeMX to generate the code for USB-Device Mass Storage class for STM32L4R5 controller.
We have to check the usb connect/disconnect status run time.
Try to use HAL_PCD_ConnectCallback/HAL_PCD_DisconnectCallback function but never get call back here.
Please suggest how to use these call back function or any other method to check the USB status?
Thank you.
Labels:
- Labels:
-
STM32Cube MCU Packages
-
STM32L4 series
-
USB
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-04-08 7:20 AM
Evaluate (hUsbDevicexx.dev_state==USBD_STATE_CONFIGURED) if zero or not zero
hUsbDevicexx is the USBD_HandleTypeDef handle of the device.
