28.7.8 Multipacket Byte Count
Name: | EPn.MCNT |
Offset: | 0x06 + n*0x08 [n=0..15] |
Reset: | - |
Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
MCNT[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 | |
MCNT[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 – 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.