ADSP-2192 Peripheral Device Control Registers
B-90 ADSP-219x/2192 DSP Hardware Reference
USB SETUP Counter Register
Provides information as to the total size of the SETUP transaction data
stage. This register is read/write by the MCU only.
The counter hardware is a modulo 4 bit down counter used for tallying
data bytes in both the IN and OUT data stages of SETUP transactions. As
such, the count value stored has different meanings.
Figure B-15. USB SETUP Counter Register
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
X
X
X
X
X
X
X
X
X
X
X
X
C3
C2
C1
C0
C[3:0]
Counter bits.
IN Transfers:
The MCU loads the counter with the number of bytes to transfer (must be 8
or less since the USB Setup Token Data Register file is 8 bytes maximum).
The USB interface then decrements the count value after each byte is trans-
ferred to the host.
OUT Transfers:
Starting from a cleared value of 0, the counter is decremented with each byte
received from the host, including the two CRC bytes. For example, if 8 bytes
are received, the count value progresses from 15, 14, 13, etc. to a value of 6
(inclusive is the 2 CRC bytes). The MCU reads the value and subtracts it
from 14 to determine the actual number of data bytes in the USB Setup
Token Register file (14 - 6 = 8 bytes).