28.5.1 Control A

Name: CTRLA
Offset: 0x0
Reset: 0x00

Bit 76543210 
 ENABLE FIFOENSTFRNUMMAXEP[3:0] 
Access R/WR/WR/WR/WR/WR/WR/W 
Reset 0000000 

Bit 7 – ENABLE USB Enable

Writing a ‘1’ to this bit enables the USB peripheral.

Writing a ‘0’ to this bit disables the USB peripheral and immediately aborts ongoing transactions.

ValueDescription
1 The USB peripheral is enabled
0 The USB peripheral is disabled

Bit 5 – FIFOEN Transaction Complete FIFO Enable

ValueDescription
1 The USB Transaction Complete FIFO (FIFO) is enabled. The FIFO stores the offset to the endpoint configuration table address of each endpoint that generates a transaction complete interrupt.
0 The FIFO is disabled and the RAM allocated for it is freed

Bit 4 – STFRNUM Store Frame Number Enable

This bit controls whether storing the last SOF token frame number in the Frame Number (FRAMENUM) register is enabled.
ValueDescription
1 Storing the last SOF token frame number in FRAMENUM is enabled
0 Storing the last SOF token frame number in FRAMENUM is disabled

Bits 3:0 – MAXEP[3:0] Maximum Endpoint Address

This bit field selects the number of endpoint addresses used by the USB peripheral. Incoming packets with a higher endpoint number than this address will be discarded. Packets with an endpoint address lower than or equal to this address will cause the USB peripheral to look up the addressed endpoint in the endpoint configuration table. Example: If EP 0, 1 and 2 are used, set this field to 2.