Does anyone know how I can detect if my USB device is connected to a Host or not?
Thx Steven
Hello Steven, you could frequently poll the status of the stack using USBH_GetDeviceStatus, depending on what you are trying to achieve: www.keil.com/.../group__usbh__core_functions.html
Matthias
Since I want to know when a USB Host is attached observing Vusb isn't a solution b/c it also rises when a charger is connected. But thx anyway.
I'm using a STM32F2 with ARM Middleware.
Could you provide any more information for example:
- which platform (microcontroller/board) you are using - which software you are using ARM(Keil) middleware or other
I don't know, can you measure/sense the voltage on the supply, or get interrupts from the USB controller indicating transactions on the data bus?
View all questions in Keil forum