28.7.6 Endpoint Byte Counter
Name: | EPn.CNT |
Offset: | 0x02 + n*0x08 [n=0..15] |
Reset: | - |
Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
CNT[15:8] | |||||||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | R/W | R/W | |
Reset | x | x | x | x | x | x | x | x |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
CNT[7:0] | |||||||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | R/W | R/W | |
Reset | x | x | x | x | x | x | x | x |
Bits 15:0 – CNT[15:0] Endpoint Data Byte Count
SETUP/OUT: The 16-bit value CNT holds the number of bytes received in the last OUT/SETUP transfer. For a multipacket transfer in progress it keeps the number of bytes received so far. It is updated by the hardware at the end of a packet.
IN: Holds the total number of bytes to send to the host in the next IN transfer. It is not changed by the hardware during MULTIPKT transfers.
CNT must only be written by software while the endpoint is deactivated, i.e., GNACK or NACK is set.