6.8
Paired OUT Endpoint Status
OUTnBSY=1 indicates that both endpoint buffers are empty, and no data is available to
the 8051. When OUTnBSY=0, either one or both of the buffers holds USB OUT data.
The 8051 can keep an internal count that increments on EPnOUT interrupts and decre-
ments on byte count loads to determine whether one or two buffers contain data. Or, the
8051 can simply check for OUTnBSY=0 after unloading a buffer (and loading its byte
count register to re-arm the endpoint) to determine if the other buffer contains data.
6.9
Using Bulk Buffer Memory
Table 6-3. EZ-USB Endpoint 0-7 Buffer Addresses
Endpoint Buffer
IN0BUF
Address
Mirrored
7F00-7F3F
7EC0-7EFF
7E80-7EBF
7E40-7E7F
7E00-7E3F
7DC0-7DFF
7D80-7DBF
7D40-7D7F
7D00-7D3F
7CC0-7CFF
7C80-7CBF
7C40-7C7F
7C00-7C3F
7BC0-7BFF
7B80-7BBF
7B40-7B7F
1F00-1F3F
1EC0-1EFF
1E80-1EBF
1E40-1E7F
1E00-1E3F
1DC0-1DFF
1D80-1DBF
1D40-1D7F
1D00-1D3F
1CC0-1CFF
1C80-1CBF
1C40-1C7F
1C00-1C3F
1BC0-1BFF
1B80-1BBF
1B40-1B7F
OUT0BUF
IN1BUF
OUT1BUF
IN2BUF
OUT2BUF
IN3BUF
OUT3BUF
IN4BUF
OUT4BUF
IN5BUF
OUT5BUF
IN6BUF
OUT6BUF
IN7BUF
OUT7BUF
Table 6-3 shows the RAM locations for the sixteen 64-byte buffers for endpoints 0-7 IN
and OUT. These buffers are positioned at the bottom of the EZ-USB register space so that
any buffers not used for endpoints can be reclaimed as general purpose data RAM. The
top of memory for the 8-KB EZ-USB part is at 0x1B3F. However, if the endpoints are
allocated in ascending order starting with the lowest numbered endpoints, the higher num-
bered unused endpoints can effectively move the top of memory to utilize the unused end-
point buffer RAM as data memory. For example, an application that uses endpoint 1-IN,
Page 6-10
Chapter 6. EZ-USB CPU
EZ-USB TRM v1.9