Hello Francesco,
A USB device has six types of states:
- Attached — A device is attached to the USB. It is not powered by the USB
- Powered — A device is attached to the USB and powered by the USB. This device has not been reset
- Default — A device is attached to the USB and powered and has been reset. It has not been
assigned a unique address, the device responds at the default address and is in default state
- HelloAddress — If a device is in default state and a unique device address has been assigned, and the device is not configured, then the device is transitioned to address state.
- Configured — If a device is already in address state and configured, and is not suspended, then the device enters configured state in which the host can use the functions provided by the device.
- Suspended — If a device is in powered, default, address, configured, and has no bus activity for
3 ms, it enters suspend state. The host may not use the function of a suspended device.
It is up to your application in which state to turn on the led.
Best Regards
Fiona Kuang
TIC - Technical Information Center
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Mark Correct button. Thank you!
-----------------------------------------------------------------------------------------------------------------------