Clear status, Device state – Rainbow Electronics AT89C5132 User Manual
Page 14

14
AT89C5132
4256A–USB–06/03
Clear Status
Any time the device detects an error and reports an error indication status to the host in
the response to a DFU_GETSTATUS request, it enters the dfuERROR state. The
device cannot transition from the dfuERROR state, after reporting any error status, until
after it has received a DFU_CLRSTATUS request. Upon receipt of DFU_CLRSTATUS,
the device sets a status of OK and transitions to the dfuIDLE state. Only then it is able to
transition to other states.
Device State
This request solicits a report about the state of the device. The state reported is the cur-
rent state of the device with no change in state upon transmission of the response. The
values specified in the bState field are identical to those reported in DFU_GETSTATUS.
errPOR
0x0D
Device detected unexpected power on reset
errUNKNOWN
0x0E
Something went wrong, but the device does not know what it was
errSTALLEDPK
0x0F
Device stalled an unexpected request
Table 10. bStatus Values (Continued)
Status
Value
Description
Table 11. bState Values
State
Value
Description
appIDLE
0
Device is running its normal application
appDETACH
1
Device is running its normal application, has received the DFU_DETACH request, and is waiting for a
USB reset
dfuIDLE
2
Device is operating in the DFU mode and is waiting for requests
dfuDNLOAD-SYNC
3
Device has received a block and is waiting for the Host to solicit the status via DFU_GETSTATUS
dfuDNBUSY
4
Device is programming a control-write block into its non-volatile memories
dfuDNLOAD-IDLE
5
Device is processing a download operation. Expecting DFU_DNLOAD requests
dfuMANIFEST-SYNC
6
Device has received the final block of firmware from the Host and is waiting for receipt of
DFU_GETSTATUS to begin the Manifestation phase
or
device has completed the Manifestation phase and is waiting for receipt of DFU_GETSTATUS.
dfuMANIFEST
7
Device is in the Manifestation phase.
dfuMANIFEST-WAIT-RESET
8
Device has programmed its memories and is waiting for a USB reset or a power on reset.
dfuUPLOAD-IDLE
9
The device is processing an upload operation. Expecting DFU_UPLOAD requests.
dfuERROR
10
An error has occurred. Awaiting the DFU_CLRSTATUS request.
bmRequestType
bRequest
wValue
wIndex
wLength
Data
0010 0001b
DFU_CLRSTATUS (4)
Zero
Interface (4)
0
None
bmRequestType
bRequest
wValue
wIndex
wLength
Data
1010 0001b
DFU_GETSTATE (5)
Zero
Interface (4)
1
State