Atmel Xplained Evaluation Board AT32UC3A3-XPLD AT32UC3A3-XPLD 数据表

产品代码
AT32UC3A3-XPLD
下载
页码 1021
654
32072H–AVR32–10/2012
AT32UC3A3
27.7.3.6
Pipe activation
The pipe is maintained inactive and reset (see 
 for more details) as long as it is
disabled (PENn is zero). The Data Toggle Sequence field (DTSEQ) is also reset.
The algorithm represented on 
 must be followed in order to activate a
pipe.
Figure 27-23. Pipe Activation Algorithm
As long as the pipe is not correctly configured (UPSTAn.CFGOK is zero), the controller can not
send packets to the device through this pipe.
The UPSTAn.CFGOK bit is set only if the configured size and number of banks are correct com-
pared to their maximal allowed values for the pipe (see 
) and to the
maximal FIFO size (i.e. the DPRAM size).
 for more details about DPRAM management.
Once the pipe is correctly configured (UPSTAn.CFGOK is zero), only the PTOKEN and INTFRQ
fields can be written by software. INTFRQ is meaningless for non-interrupt pipes.
Whe n starting  a n enu me ration,  th e user ge ts the de vice  d escripto r by send in g a
GET_DESCRIPTOR USB request. This descriptor contains the maximal packet size of the
device default control endpoint (bMaxPacketSize0) and the user re-configures the size of the
default control pipe with this size parameter.
27.7.3.7
Address setup
Once the device has answered the first host requests with the default device address 0, the host
assigns a new address to the device. The host controller has to send an USB reset to the device
and to send a SET_ADDRESS(addr) SETUP request with the new address to be used by the
device. Once this SETUP transaction is over, the user writes the new address into the USB Host
Address for Pipe n field in the USB Host Device Address register (UHADDR.UHADDRPn). All
following requests, on all pipes, will be performed using this new address.
Pipe
Activation
CFGOK ==
1?
ERROR
Yes
Pipe Activated
Enable the pipe.
PENn = 1
Test if the pipe configuration is 
correct.
UPCFGn
INTFRQ
PEPNUM
PTYPE
PTOKEN
PSIZE
PBK
ALLOC
Configure the pipe:
   - interrupt request frequency
   - endpoint number
   - type
   - size
   - number of banks
Allocate the configured DPRAM banks.
No