541
11054A–ATARM–27-Jul-11
SAM9X25
541
11054A–ATARM–27-Jul-11
SAM9X25
33.6.6
DPRAM Management
Endpoints can only be allocated in ascending order, from the endpoint 0 to the last endpoint to
be allocated. The user shall therefore configure them in the same order.
The allocation of an endpoint x starts when the Number of Banks field in the UDPHS Endpoint
Configuration Register (UDPHS_EPTCFGx.BK_NUMBER) is different from zero. Then, the
hardware allocates a memory area in the DPRAM and inserts it between the x-1 and x+1 end-
points. The x+1 endpoint memory window slides up and its data is lost. Note that the following
endpoint memory windows (from x+2) do not slide.
Disabling an endpoint, by writing a one to the Endpoint Disable bit in the UDPHS Endpoint Con-
trol Disable Register (UDPHS_EPTCTLDISx.EPT_DISABL), does not reset its configuration:
• the Endpoint Banks (UDPHS_EPTCFGx.BK_NUMBER),
• the Endpoint Size (UDPHS_EPTCFGx.EPT_SIZE),
• the Endpoint Direction (UDPHS_EPTCFGx.EPT_DIR),
• and the Endpoint Type (UDPHS_EPTCFGx.EPT_TYPE).
To free its memory, the user shall write a zero to the UDPHS_EPTCFGx.BK_NUMBER field.
The x+1 endpoint memory window then slides down and its data is lost. Note that the following
endpoint memory windows (from x+2) do not slide.
illustrates the allocation and reorganization of the DPRAM in a typical
example.
Figure 33-6.
Allocation and Reorganization of the DPRAM
1.
The endpoints 0 to 5 are enabled, configured and allocated in ascending order. Each
endpoint then owns a memory area in the DPRAM.
2.
The endpoint 3 is disabled, but its memory is kept allocated by the controller.
3.
In order to free its memory, its UDPHS_EPTCFGx.BK_NUMBER field is written to zero.
The endpoint 4 memory window slides down, but the endpoint 5 does not move.
4.
If the user chooses to reconfigure the endpoint 3 with a larger size, the controller allo-
cates a memory area after the endpoint 2 memory area and automatically slides up the
Free Memory
EPT0
EPT1
EPT2
EPT3
EPT4
EPT5
Free Memory
EPT0
EPT1
EPT2
EPT4
EPT5
Free Memory
EPT0
EPT1
EPT2
EPT4
EPT5
Endpoint 3
Disabled
Endpoint 3
Memory Freed
Free Memory
EPT0
EPT1
EPT2
EPT3 (larger size)
EPT5
Endpoint 3
Activated
EPT4 Lost Memory
EPT4
Conflict
EPT3
(always allocated)
Endpoints 0..5
Activated
Device:
UDPH
S
_EPTCTLENBx.EPT_ENABL = 1
Device:
Device:
Device:
UDPH
S
_EPTCTLDI
S3
.EPT_DI
S
ABL = 1 UDPH
S
_EPTCFG
3
.BK_NUMBER
=
0
UDPH
S
_EPTCTLENB
3
.EPT_ENABL = 1
UDPH
S
_EPTCFGx.BK_NUMBER
<>
0
UDPH
S
_EPTCFG
3
.BK_NUMBER
<>
0
Содержание SAM9X25
Страница 26: ...26 11054A ATARM 27 Jul 11 SAM9X25...
Страница 138: ...138 11054A ATARM 27 Jul 11 SAM9X25 138 11054A ATARM 27 Jul 11 SAM9X25...
Страница 162: ...162 11054A ATARM 27 Jul 11 SAM9X25 162 11054A ATARM 27 Jul 11 SAM9X25...
Страница 216: ...216 11054A ATARM 27 Jul 11 SAM9X25 216 11054A ATARM 27 Jul 11 SAM9X25...
Страница 266: ...266 11054A ATARM 27 Jul 11 SAM9X25 266 11054A ATARM 27 Jul 11 SAM9X25...
Страница 330: ...330 11054A ATARM 27 Jul 11 SAM9X25 330 11054A ATARM 27 Jul 11 SAM9X25...
Страница 374: ...374 11054A ATARM 27 Jul 11 SAM9X25...
Страница 468: ...468 11054A ATARM 27 Jul 11 SAM9X25 468 11054A ATARM 27 Jul 11 SAM9X25...
Страница 532: ...532 11054A ATARM 27 Jul 11 SAM9X25 532 11054A ATARM 27 Jul 11 SAM9X25...
Страница 692: ...692 11054A ATARM 27 Jul 11 SAM9X25 692 11054A ATARM 27 Jul 11 SAM9X25...
Страница 777: ...777 11054A ATARM 27 Jul 11 SAM9X25 777 11054A ATARM 27 Jul 11 SAM9X25...
Страница 886: ...886 11054A ATARM 27 Jul 11 SAM9X25 886 11054A ATARM 27 Jul 11 SAM9X25...
Страница 962: ...962 11054A ATARM 27 Jul 11 SAM9X25 962 11054A ATARM 27 Jul 11 SAM9X25...
Страница 1036: ...1036 11054A ATARM 27 Jul 11 SAM9X25 1036 11054A ATARM 27 Jul 11 SAM9X25...
Страница 1067: ...1067 11054A ATARM 27 Jul 11 SAM9X25 1067 11054A ATARM 27 Jul 11 SAM9X25 PTZ Pause Time Zero Enable pause time zero interrupt...
Страница 1069: ...1069 11054A ATARM 27 Jul 11 SAM9X25 1069 11054A ATARM 27 Jul 11 SAM9X25 PTZ Pause Time Zero Disable pause time zero interrupt...
Страница 1071: ...1071 11054A ATARM 27 Jul 11 SAM9X25 1071 11054A ATARM 27 Jul 11 SAM9X25 PTZ Pause Time Zero Pause time zero interrupt masked...
Страница 1128: ...1128 11054A ATARM 27 Jul 11 SAM9X25 1128 11054A ATARM 27 Jul 11 SAM9X25...
Страница 1130: ...1130 11054A ATARM 27 Jul 11 SAM9X25...
Страница 1131: ...1131 11054A ATARM 27 Jul 11 SAM9X25 Revision History Doc Rev 11054A Comments Change Request Ref 1st issue...
Страница 1132: ...1132 11054A ATARM 27 Jul 11 SAM9X25...
Страница 1144: ...xii 11054A ATARM 27 Jul 11 SAM9X25...