Техническая Спецификация для Atmel Evaluation Kit for AT32uC3A0512, 32-Bit AVR Microcontroller Atmel ATEVK1105 ATEVK1105

Модели
ATEVK1105
Скачать
Страница из 826
512
AT32UC3A
30.7.2.4
Endpoint Reset
An endpoint can be reset at any time by setting its EPRSTX bit in the UERST register. This is
recommended before using an endpoint upon hardware reset or when a USB bus reset has
been received. This resets:
•the internal state machine of this endpoint;
•the receive and transmit bank FIFO counters;
•all  the  registers  of  this  endpoint  (UECFGX,  UESTAX,  UECONX),  except  its  configuration
(ALLOC, EPBK, EPSIZE, EPDIR, EPTYPE) and its Data Toggle Sequence bit-field (DTSEQ).
Note that the interrupt sources located in the UESTAX register are not cleared when a USB bus
reset has been received.
The endpoint configuration remains active and the endpoint is still enabled.
The endpoint reset may be associated with a clear of the data toggle sequence as an answer to
the CLEAR_FEATURE USB request. This can be achieved by setting the RSTDT bit (by setting
the RSTDTS bit).
In the end, the firmware has to clear the EPRSTX bit to complete the reset operation and to start
using the FIFO.
30.7.2.5
Endpoint Activation
The endpoint is maintained inactive and reset (see 
for more
details) as long as it is disabled (EPENX = 0). The Data Toggle Sequence bit-field (DTSEQ) is
also reset.
The algorithm represented on 
must be followed in order to activate an endpoint.
Figure 30-14.
Endpoint Activation Algorithm
As long as the endpoint is not correctly configured (CFGOK = 0), the controller does not
acknowledge the packets sent by the host to this endpoint.
The CFGOK bit is set by hardware only if the configured size and number of banks are correct
compared to their maximal allowed values for the endpoint (see 
and to
the maximal FIFO size (i.e. the DPRAM size).
Endpoint
Activation
CFGOK ==
1?
ERROR
Yes
Endpoint
Activated
Enable the endpoint.
EPENX = 1
Test if the endpoint configuration
is correct.
UECFGX
EPTYPE
EPDIR
EPSIZE
EPBK
ALLOC
Configure the endpoint:
- type; 
- direction; 
- size; 
- number of banks.
Allocate the configured DPRAM
banks.
No
32058K
AVR32-01/12