AT90USB82/162
Table 19-1. Allocation and reorganization USB memory flow
Free memory
4
Free memory
4
Free memory
Free memory
4
4
Conflict
3
Lost memory
3
3
2
3
EPEN=0
(ALLOC=1)
2 (bigger size)
1
0
1
0
1
0
1
0
EPEN=1
ALLOC=1
Endpoints
activation
Free its memory
(ALLOC=0)
Endpoint
Activatation
Endpoint Disable
• First, Endpoint 0 to Endpoint 4 are configured, in the growing order. The memory of each is
reserved in the DPRAM.
• Then, the Endpoint 2is disabled (EPEN=0), but its memory reservation is internally kept by
the controller.
• Its ALLOC bit is cleared: the Endpoint 3 “slides” down, but the Endpoint 4 does not “slide”.
• Finally, the firmware chooses to reconfigure the Endpoint 2, but with a bigger size. The
controller reserved the memory after the endpoint 1 memory and automatically “slide” the
Endpoint 3. The Endpoint 4 does not move and a memory conflict appear, in that both
Endpoint 3 and 4 use a common area. The data of those endpoints are potentially lost.
Note that :
• the data of Endpoint 0 are never lost whatever the activation or deactivation of the higher
Endpoint. Its data is lost if it is deactivated.
• Deactivate and reactivate the same Endpoint with the same parameters does not lead to a
“slide” of the higher endpoints. For those endpoints, the data are preserved.
• CFGOK is set by hardware even in the case that there is a “conflict” in the memory allocation.
19.7 PAD suspend
The next figures illustrates the pad behaviour:
• In the “idle” mode, the pad is put in low power consumption mode.
• In the “active” mode, the pad is working.
191
7707D–AVR–07/08