English
Language : 

Z8E520 Datasheet, PDF (26/43 Pages) Zilog, Inc. – 1.5 MBPS USB Device Controller
Z8E520/C520
1.5 MBPS USB Device Controller
Zilog
COMMUNICATION REGISTER DEFINITIONS (USB MODE) (Continued)
ceives a valid setup token (via FORCE NAK). Setting IN
PACKET READY clears IN NAK SENT. Read/Set.
FORCE NAK: Setting this bit clears IN PACKET READY if
no IN transaction are in progress, and clears OUT SER-
VICED and ACK STATUS OUT if no OUT transactions are
in progress. This bit is cleared by a setup token or by firm-
ware. Read/Write.
IN DATA TOGGLE: Indicates what type of PID to use in
the data phase of the next IN transaction. SIE may never
write to this bit. Read/Write.
OUT SERVICED: When cleared, OUT transactions are
NAK’d. It is cleared when the SIE sets OUT PACKET
READY or receives a valid setup token (via FORCE NAK).
This bit cannot be cleared by firmware. To clear it, firm-
ware should be set FORCE NAK. When set, OUT COUNT
and OUT buffer are volatile. Setting OUT SERVICED
clears OUT N AK SENT. Read/Set.
OUT DATA TOGGLE: Indicates what type of PID was re-
ceived in the data phase of the most recent successful
OUT transaction. Read only.
SETUP BUFFER VOLATILE: Indicates that the SIE has
entered the data stage of a control transfer. The successful
receipt of a setup token sets and locks this bit. The bit re-
mains locked as set until the data phase is complete and
error free. If the data phase has an error, this bit will re-
mained locked, but a setup interrupt will still occur to inform
the firmware that a new transfer was attempted. After the
data phase is received without errors, firmware may clear
this bit. Read/Clear (if unlocked).
ACK STATUS OUT: This bit serves to filter the response
to an OUT transaction. Setting this bit also sets OUT SER-
VICED. This bit cannot be cleared by firmware. To clear it,
firmware should be set FORCE NAK. Read/Set.
While ACK STATUS OUT is set:
s If IN NAK SENT is clear, the SIE will ACK an empty OUT
DATA 1 transaction.
s If IN NAK SENT is set, the SIE will NAK an empty OUT
DATA 1 transaction.
s Any other kind of OUT transaction will be stalled and set
the STALL SENT interrupt. It is possible to have both
STALL SENT and OUT PACKET READY set on a
single, incorrect OUT transaction.
s Any out transaction will cause the SIE to set FORCE
NAK and OUT PACKET READY. As a result, ACK
STATUS OUT is cleared. ACK STATUS OUT has “one-
shot” behavior. It only handles one OUT transaction.
s The successful receipt of a setup token sets FORCE
NAK, which clears this bit.
EP0 COUNT: Contains counts of bytes in the endpoint
buffers.
EP1/2 COUNT: Contains counts of bytes in the endpoint
buffers. Definition of this register depends on the EP Mode
as illustrated in Table 12:
EP MODE
Description
000 EP1 OFF, EP2 OFF
001 EP1 IN EP2 OFF
010 EP1 OUT, EP2 OFF
011 EP1 CONTROL
100 EP1 OUT, EP2 OUT
101 EP1 IN, EP1 OUT
110 EP1 OUT, EP1 IN
111 EP1 IN EP2 IN
Table 12. EP 1/2 Counts
EP1/2 COUNT
GP R
GPR
GPR
EP1 OUT COUNT 3:0
EP2 OUT COUNT 3:0
EP1 OUT COUNT 3:0
EP1 IN COUNT 3:0
EP2 IN COUNT 3:0
EP1 IN COUNT 3:0
EP1 OUT COUNT 3:0
EP1 IN COUNT 3:0
EP1 OUT COUNT 3:0
EP1 IN COUNT 3:0
EP1 OUT COUNT 3:0
EP1 IN COUNT 3:0
EP OUT COUNT: Set by the SIE to indicate the number of
bytes received in the most recent OUT transaction. Invalid
while OUT SERVICED is set.
EP IN COUNT: Set by firmware to indicate the number of
bytes to transfer in the next IN transaction. Invalid while IN
PACKET READY is set.
26
PRELIMINARY
DS97KEY2005