28.7.6 Endpoint Byte Counter

Name: EPn.CNT
Offset: 0x02 + n*0x08 [n=0..15]
Reset: -

Bit 15141312111098 
 CNT[15:8] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset xxxxxxxx 
Bit 76543210 
 CNT[7:0] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset xxxxxxxx 

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.