English
Language : 

SAM4C_14 Datasheet, PDF (1098/1303 Pages) ATMEL Corporation – Atmel | SMART ARM-based Flash MCU
USBFS_DEVEPTCFGx.EPSIZE, USBFS_DEVEPTCFGx.EPDIR, USBFS_DEVEPTCFGx.EPTYPE) and
the Data Toggle Sequence (USBFS_DEVEPTISRx.DTSEQ) field
Note: The interrupt sources located in the USBFS_DEVEPTISRx 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 writing a one to the Reset Data Toggle Set bit in the
Device Endpoint Enable Register (USBFS_DEVEPTIERx.RSTDTS) (this sets the Reset Data Toggle
(USBFS_DEVEPTIMRx.RSTDT) bit).
In the end, the user has to write a zero to the USBFS_DEVEPT.EPRSTx bit to complete the reset operation and to
start using the FIFO.
45.5.2.5 Endpoint Activation
The endpoint is maintained inactive and reset (see Section 45.5.2.4 for more details) as long as it is disabled
(USBFS_DEVEPT.EPENx = 0). USBFS_DEVEPTISRx.DTSEQ is also reset.
The algorithm represented on Figure 45-11 must be followed in order to activate an endpoint.
Figure 45-11. Endpoint Activation Algorithm
Endpoint
Activation
USBFS_DEVEPT.EPENx = 1
USBFS_DEVEPTCFGx
.EPTYPE
.EPDIR
.EPSIZE
.EPBK
.ALLOC
USBFS_HSTPIPISRx.CFCFGOK== 1?
No
Yes
Endpoint
Activated
ERROR
Enable the endpoint.
Configure the endpoint:
- type
- direction
- size
- number of banks
Allocate the configured DPRAM banks.
Test if the endpoint configuration is correct.
As long as the endpoint is not correctly configured (USBFS_HSTPIPISRx.CFGOK = 0), the controller does not
acknowledge the packets sent by the host to this endpoint.
The USBFS_HSTPIPISRx.CFGOK bit is set provided that the configured size and number of banks are correct as
compared to the endpoint maximal allowed values (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.
45.5.2.6 Address Setup
The USB device address is set up according to the USB protocol.
 After all kinds of resets, the USB device address is 0.
 The host starts a SETUP transaction with a SET_ADDRESS (addr) request.
 The user writes this address to the USB Address (USBFS_DEVCTRL.UADD) field, and writes a zero to the
Address Enable (USBFS_DEVCTRL.ADDEN) bit, so the actual address is still 0.
 The user sends a zero-length IN packet from the control endpoint.
1098
SAM4C Series [DATASHEET]
Atmel-11102E-ATARM-SAM4C32-SAM4C16-SAM4C8-Datasheet_06-Oct-14