PSoC CY8CTMG20x and CY8CTST200 TRM, Document No. 001-53603 Rev. *C
175
Full-Speed USB
20.3.8
EPx_CNT1 Register
The Endpoint Count Register 1 (EPx_CNT1) sets or reports
the number of bytes in a USB data transfer to the non-con-
trol endpoints.
Bit 7 to 0: Data Count.
These bits are the eight LSb of a
9-bit counter. The MSb is the Count MSb bit of the
EPx_CNT0 register. The 9-bit count indicates the number of
data bytes in a transaction. For IN transactions, firmware
loads the count with the number of data bytes to be transmit-
ted to the host. Valid values are 0 to 256. The 9-bit count
also sets the limit for the number of bytes that are received
for an OUT transaction. Before an OUT transaction is
received for an endpoint, this count value must be set to the
maximum number of data bytes to receive. If this count
value is set to a value greater than the number of bytes
(Data + CRC) received, both the data from the USB packet
and the two-byte CRC are written to the USB's dedicated
SRAM.
If the number of data bytes received is exactly the same as
the 9-bit count, then only the data is updated into the USB
SRAM and the CRC is discarded but the OUT transaction is
completed according to the Mode bits of the EPx Control
Register. If the number of data bytes received is more than
the 9-bit count, then the OUT transaction is ignored.
After the OUT transaction is complete, the full 9-bit count is
updated by the SIE to the actual number of data bytes
received by the SIE plus two for the packet's CRC. Valid val-
ues are 2 to 258.
To get the actual number of bytes received, firmware must
decrement the 9-bit count by two.
For additional information, refer to the
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,41h
EP1_CNT1
Data Count[7:0]
RW : 00
0,43h
EP2_CNT1
Data Count[7:0]
RW : 00
0,45h
EP3_CNT1
Data Count[7:0]
RW : 00
0,47h
EP4_CNT1
Data Count[7:0]
RW : 00
0,49h
EP5_CNT1
Data Count[7:0]
RW : 00
0,4Bh
EP6_CNT1
Data Count[7:0]
RW : 00
0,4Dh
EP7_CNT1
Data Count[7:0]
RW : 00
0,4Fh
EP8_CNT1
Data Count[7:0]
RW : 00
Содержание PSoC CY8CTMG20 Series
Страница 4: ...4 Contents Overview Feedback...
Страница 26: ...26 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Section B PSoC Core Feedback...
Страница 54: ...54 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Interrupt Controller Feedback...
Страница 62: ...62 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C General Purpose I O GPIO Feedback...
Страница 82: ...82 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Sleep and Watchdog Feedback...
Страница 134: ...134 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C I2C Slave Feedback...
Страница 142: ...142 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C System Resets Feedback...
Страница 160: ...160 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C SPI Feedback...
Страница 182: ...182 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Full Speed USB Feedback...
Страница 186: ...186 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Section E Registers Feedback...
Страница 302: ...302 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Glossary Feedback...