635
32072H–AVR32–10/2012
AT32UC3A3
To free its memory, the user shall write a zero to the UECFGn.ALLOC bit. The n+ 1 pipe/end-
point memory window then slides down and its data is lost. Note that the following pipe/endpoint
memory windows (from n+2) does not slide.
example.
Figure 27-7. Allocation and Reorganization of the DPRAM
1.
The pipes/endpoints 0 to 5 are enabled, configured and allocated in ascending order.
Each pipe/endpoint then owns a memory area in the DPRAM.
2.
The pipe/endpoint 3 is disabled, but its memory is kept allocated by the controller.
3.
In order to free its memory, its ALLOC bit is written to zero. The pipe/endpoint 4 mem-
ory window slides down, but the pipe/endpoint 5 does not move.
4.
If the user chooses to reconfigure the pipe/endpoint 3 with a larger size, the controller
allocates a memory area after the pipe/endpoint 2 memory area and automatically
slides up the pipe/endpoint 4 memory window. The pipe/endpoint 5 does not move and
a memory conflict appears as the memory windows of the pipes/endpoints 4 and 5
overlap. The data of these pipes/endpoints is potentially lost.
Note that:
There is no way the data of the pipe/endpoint 0 can be lost (except if it is de-allocated) as
memory allocation and de-allocation may affect only higher pipes/endpoints.
Deactivating then reactivating a same pipe/endpoint with the same configuration only
modifies temporarily the controller DPRAM pointer and size for this pipe/endpoint, but
nothing changes in the DPRAM, so higher endpoints seem to not have been moved and their
data is preserved as far as nothing has been written or received into them while changing the
allocation state of the first pipe/endpoint.
When the user write a one to the ALLOC bit, the Configuration OK Status bit in the Endpoint
n Status register (UESTAn.CFGOK) is set only if the configured size and number of banks
are correct compared to their maximal allowed values for the endpoint and to the maximal
Free Memory
PEP0
PEP1
PEP2
PEP3
PEP4
PEP5
U(P/E)RST.(E)PENn = 1
U(P/E)CFGn.ALLOC = 1
Free Memory
PEP0
PEP1
PEP2
PEP4
PEP5
Free Memory
PEP0
PEP1
PEP2
PEP4
PEP5
Pipe/Endpoint 3
Disabled
Pipe/Endpoint 3
Memory Freed
Free Memory
PEP0
PEP1
PEP2
PEP3 (larger size)
PEP5
Pipe/Endpoint 3
Activated
PEP4 Lost Memory
PEP4
Conflict
U(P/E)RST.(E)PEN3 = 0
PEP3
(ALLOC stays at 1)
U(P/E)CFG3.ALLOC = 0
U(P/E)RST.(E)PEN3 = 1
U(P/E)CFG3.ALLOC = 1
Pipes/Endpoints 0..5
Activated