AT85C51SND3Bx
–
–
Clear DFCRDY to freeze the DFC transfer,
If the CPU EPNUM has to be changed: EPNUMS cleared, EPNUM =
endpoint0
–
–
Read endpoint0 data (UEDATX)
Set DFCRDY. This resumes the DFC transfer.
Endpoint Activation
The endpoint is maintained under reset as long as the EPEN bit is not set.
The following flow must be respected in order to activate an endpoint:
Figure 60. Endpoint activation flow:
Endpoint
Activation
Select the endpoint
UENUM
EPNUM=x
Activate the endpoint
EPEN=1
Configure:
- the endpoint direction
- the endpoint type
UECFG0X
EPDIR
EPTYPE
...
- the Not Yet Disable feature
Configure:
- the endpoint size
- the bank parametrization
Allocation and reorganization of
the memory is made on-the-fly
UECFG1X
ALLOC
EPSIZE
EPBK
Test the correct endpoint
configuration
CFGOK=1
Yes
No
Endpoint activated
ERROR
As long as the endpoint is not correctly configured (CFGOK cleared), the hardware does
not acknowledge the packets sent by the host.
CFGOK is will not be sent if the Endpoint size parameter is bigger than the DPRAM
size.
A clear of EPEN acts as an endpoint reset (see Section “Endpoint Reset” for more
details). It also performs the next operation:
•
•
•
The configuration of the endpoint is kept (EPSIZE, EPBK, ALLOC kept)
It resets the data toggle field.
The DPRAM memory associated to the endpoint is still reserved.
See Section “Memory Management”, page 90 for more details about the memory
allocation/reorganization.
Address Setup
The USB device address is set up according to the USB protocol:
•
the USB device, after power-up, responds at address 0
103
7632A–MP3–03/06