SDK version: SDK_2.6.2_EVKB_IMXRT1061
My application is used as a USB device to transmit audio. There is a function that needs to monitor the USB connection status.
Open the macro definition (USB_DEVICE_CONFIG_DETACH_ENABLE )in the SDK
/*! @brief Whether the device detached feature is enabled or not. */
#define USB_DEVICE_CONFIG_DETACH_ENABLE (1U)
But can't detect the USB plug and unplug?
After modifying the ehci driver, it can be detected that the device is plugged in, but the device cannot be unplugged.

Is there a way to monitor the plugging and unplugging from host?