RM0444 Rev 5 1275/1390
RM0444 Universal serial bus full-speed host/device interface (USB)
1307
The memory buffer which is currently being used by the USB peripheral is defined by DTOG
buffer flag, while the buffer currently in use by application software is identified by SW_BUF
buffer flag. The relationship between the buffer flag value and the used packet buffer is the
same in both cases, and it is listed in the following table.
Table 217. Double-buffering buffer flag definition
Buffer flag ‘Transmission’ endpoint ‘Reception’ endpoint
DTOG DTOGTX (USB_CHEPnR bit 6) DTOGRX (USB_CHEPnR bit 14)
SW_BUF USB_CHEPnR bit 14 USB_CHEPnR bit 6
Table 218. Bulk double-buffering memory buffers usage (Device mode)
Endpoint
type
DTOG SW_BUF
Packet buffer used by
USB peripheral
Packet buffer used by
Application Software
Transmit
(IN)
01
USB_CHEP_TXRXBD_0
(ADDRn_TX_0 / COUNTn_TX_0)
Buffer description table locations.
USB_CHEP_RXTXBD_0
(ADDRn_TX_1 / COUNTn_TX_1)
Buffer description table locations
10
USB_CHEP_RXTXBD_0
(ADDRn_TX_0 / COUNTn_TX_0)
Buffer description table locations
USB_CHEP_TXRXBD_0
(ADDRn_TX_0 / COUNTn_TX_0)
Buffer description table locations.
0 0 None
(1)
1. Endpoint in NAK Status.
USB_CHEP_TXRXBD_0
(ADDRn_TX_0 / COUNTn_TX_0)
Buffer description table locations.
1 1 None
(1)
USB_CHEP_RXTXBD_0
(ADDRn_TX_0 / COUNTn_TX_0)
Buffer description table locations.
Receive
(OUT)
01
USB_CHEP_RXTXBD_0
(ADDRn_RX_0 /
COUNTn_RX_0)
Buffer description table locations.
USB_CHEP_TXRXBD_0
(ADDRn_RX_0 /
COUNTn_RX_0)
Buffer description table locations.
10
USB_CHEP_TXRXBD_0
(ADDRn_RX_0 /
COUNTn_RX_0)
Buffer description table locations
USB_CHEP_RXTXBD_0
(ADDRn_RX_0 /
COUNTn_RX_0)
Buffer description table locations.
0 0 None
(1)
USB_CHEP_RXTXBD_0
(ADDRn_RX_0 /
COUNTn_RX_0)
Buffer description table locations.
1 1 None
(1)
USB_CHEP_TXRXBD_0
(ADDRn_RX_0 /
COUNTn_RX_0)
Buffer description table locations.