English
Language : 

SAM4C_14 Datasheet, PDF (1108/1303 Pages) ATMEL Corporation – Atmel | SMART ARM-based Flash MCU
USBFS_HSTPIPCFGx.PEPNUM, USBFS_HSTPIPCFGx.INTFRQ) and its Data Toggle Sequence field
(USBFS_HSTPIPISRx.DTSEQ).
The pipe configuration remains active and the pipe is still enabled.
The pipe reset may be associated with a clear of the data toggle sequence. This can be achieved by setting the
Reset Data Toggle bit in the Pipe x Control register (USBFS_HSTPIPIMRx.RSTDT) (by writing a one to the Reset
Data Toggle Set bit in the Pipe x Control Set register (USBFS_HSTPIPIERx.RSTDTS)).
In the end, the user has to write a zero to the USBFS_HSTPIP.PRSTx bit to complete the reset operation and to
start using the FIFO.
45.5.3.6 Pipe Activation
The pipe is maintained inactive and reset (see Section 45.5.3.5 for more details) as long as it is disabled
(USBFS_HSTPIP.PENx = 0). The Data Toggle Sequence field (USBFS_HSTPIPISRx.DTSEQ) is also reset.
The algorithm represented on Figure 45-21 must be followed in order to activate a pipe.
Figure 45-21. Pipe Activation Algorithm
Pipe
Activation
USBFS_HSTPIP.PENx = 1
USBFS_HSTPIPPCFGx
.INTFRQ
.PEPNUM
.PTYPE
.PTOKEN
.PSIZE
.PBK
.ALLOC
Enable the pipe.
Configure the pipe:
- interrupt request frequency
- endpoint number
- type
- size
- number of banks
Allocate the configured DPRAM banks
USBFS_HSTPIPISRx.CFGOK == 1?
Yes
Pipe Activated
Test if the pipe configuration is
No
correct.
ERROR
As long as the pipe is not correctly configured (USBFS_HSTPIPISRx.CFGOK = 0), the controller cannot send
packets to the device through this pipe.
The USBFS_HSTPIPISRx.CFGOK bit is only set if the configured size and number of banks are correct as
compared to their maximal allowed values for the pipe (see Table 45-1 on page 1087) and to the maximal FIFO
size (i.e., the DPRAM size).
See Section 45.5.1.4 for more details about DPRAM management.
Once the pipe is correctly configured (USBFS_HSTPIPISRx.CFGOK = 1), only the
USBFS_HSTPIPCFGx.PTOKEN and USBFS_HSTPIPCFGx.INTFRQ fields can be written by software.
USBFS_HSTPIPCFGx.INTFRQ is meaningless for non-interrupt pipes.
When starting an enumeration, the user gets the device descriptor by sending 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.
1108
SAM4C Series [DATASHEET]
Atmel-11102E-ATARM-SAM4C32-SAM4C16-SAM4C8-Datasheet_06-Oct-14