Hi everyone,
I'm working on a project using K65F180M device with KDS 3.2 and KSDK 2.0.
The device use USB stack and acts as a USB device.
My question is: when is the best moment to turn on a led to signal that the device is correctly recognized? The set configuration event, the set interface event, the attach event or some other event?
I suppose that the best moment to turn off the led could be the bus reset event: there is a better moment to do this?
Many thanks
Biafra
Hello Francesco,
A USB device has six types of states:
assigned a unique address, the device responds at the default address and is in default state
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!
-----------------------------------------------------------------------------------------------------------------------
Hi Fiona,
Many thanks for your answer.
I know the state list: my doubt is which command is to change the device state.
Many thanks
Biafra
The device enters the 'Ready' state on reception of the first 'In' token after the address has been set in the 'Setup' state.
Turning the LED off with 'Reset' would work. There are always multiple bus resets. On Windows there will be at least two, with four to six being typical.