28.7.8 Multipacket Byte Count

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

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

Bits 15:0 – MCNT[15:0]  Multipacket Byte Count

For IN endpoints, MCNT holds the number of bytes that have been transferred by the USB so far. Write it to zero when setting up a new transfer. It is updated when a packet transfer is completed.

MCNT holds the maximum number of received bytes for OUT endpoints. At most MCNT number of bytes is written to RAM. It will not be changed by hardware.

This bit field is only used if Multipacket Transfer Enable (MULTIPKT) in the Endpoint Control (EPn.CTRL) register is enabled. MCNT must only be changed by software while the endpoint is deactivated, i.e., GNACK or NACK is set.

When the multipacket transfer is not used this RAM location is free to use for other application data.