ST7SCR
46/102
USB INTERFACE (Cont’d)
12.3.4 Register Description
INTERRUPT ST ATUS REGISTER (USBIST R)
Read/Write
Reset Value: 0000 0000 (00h)
These bits cannot be set by software. When an in-
terrupt occurs t hes e bits are set by hardwar e. Soft-
ware must read them to determine the interrupt
type and clear them after servicing.
Note: T he CT R bit (whi ch is an OR of a ll the e nd-
point CTR flags) cannot be cleared directly, only
by clearing the CTR flags in the Endpoint regis-
ters.
Bi t 7 = CTR
Correct Transf er
.
This bit is set by hardware when a correct t ransfer
operation is performed. This bit is an OR of all
CTR flags (CTR0 in the EP0R register and
CTR_RX and CTR_TX in the EPnRXR and EP-
nTXR registers). By looking in the USBSR regis-
ter, the type of transfer can be determined from the
PID[1:0] bits for Endpoint 0. For the other End-
points, the Endpoint number on which the transfer
was made is identified by the EP[1:0] bits and the
type of t ransfe r by the IN/OUT bit.
0: No Correct Transf er detected
1: Correct Transf er det ected
Note: A transfer where the device sent a NAK or
STALL handshake is considered not correct (the
host only sends ACK handshakes). A transfer is
considered correct if there are no errors in the PID
and CRC fields, if the DATA0/DATA1 PID is sent
as expected, if there were no data overruns, bit
stuffing or framing errors.
Bit 6 = Reserved, forced by hardware t o 0.
Bi t 5 = SOVR Setup Overrun.
This bit is set by hardware when a correct Setup
transfer operation is performed whil e the s oftw are
is servicing an interrupt which occured on the
same Endpoint (CTR0 bit in the EP0R register is
still set when SET UP correct transfer occurs).
0: No SETUP overrun detected
1: SETUP overrun detected
When this event occ urs, the USBS R regi st er is not
updated because the only source of the SOVR
event is the SETUP token reception on the Control
Endpoi nt (EP0).
Bit 4 = ERR
Error
.
This bit is set by hardware whenever one of the er-
rors listed below has occurred:
0: No error detected
1: Timeout, CRC, bit st uffing, nonstandard
frami ng or buffer overrun error detected
Note: Refer to the ERR[2:0] bits in the USBSR
register to determine the error ty pe.
Bit 3 = SUSP
Suspend mo de request
.
This bit is set by hardware when a constant idle
state is present on the bus li ne f or more than 3 ms,
indicating a suspend mode request from the USB.
The suspend request check is active imm ediately
after each USB reset event and is disabled by
hardware when suspend mode is forced (FSUSP
bit in the USBCTLR register) until the end of
resume sequence.
Bit 2 = ESUSP
End Suspend mode
.
This bit is se t by hardware when, during suspend
mode, a ctivity is detected that wakes t he USB in-
terface up from suspend mo de.
This interrupt is serviced by a specific vector, in or-
der to wake up the S T7 from HALT mode.
0: No End Suspend detected
1: End Suspend detec ted
Bit 1 = RESET
USB rese t.
This bit is set by hardware when the USB reset se-
quence is detected on the bus.
0: No USB reset signal detected
1: USB reset signal detected
Note: The DADDR, EP0R, EP1RXR, EP1TXR,
EP2RXR and EP2TXR registers are reset by a
USB rese t.
Bit 0 = SOF
Start of frame.
This bit is set by hardware when a SOF t oken is re-
ceived on the USB.
0: No SOF received
1: SOF received
Note: To avoid spurious clearing of some bits, it is
recomme nded to clear th em u sing a load instruc-
tion where all bits which must not be altered are
set, and all bits to be cleared are reset. Avoid read-
modify-write instructions like AND, XOR...
70
CTR 0 SOVR ERROR SUSP ESUSP RESET SOF
1