28.5.8 Multi-packet Byte Count

Name: MCNT
Offset: 0x06 + n*0x08 [n=0..1]
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]  Multi-packet 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, limiting the number of bytes that can be written to RAM. It will not be changed by hardware.

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

When the multi-packet transfer is not used, this RAM location is free to use for other application data.