17.3.2 Endpoint Configuration
To start communication in Host or device mode, the endpoint registers must first be configured. In Host mode,
this configuration establishes a connection between an endpoint register and an endpoint on a device. In device
mode, an endpoint must be configured before enumerating to the Host controller.
In both cases, the endpoint 0 configuration is limited because it is a fixed-function, fixed-FIFO-size endpoint.
In device and Host modes, the endpoint requires little setup but does require a software-based state machine
to progress through the setup, data, and status phases of a standard control transaction. In device mode, the
configuration of the remaining endpoints is done once before enumerating and then only changed if an alternate
configuration is selected by the Host controller. In Host mode, the endpoints must be configured to operate as
control, bulk, or interrupt mode. Once the type of endpoint is configured, a FIFO area must be assigned to each
endpoint. In the case of bulk, control and interrupt endpoints, each has a maximum of 64 bytes per transaction.
The maximum packet size for the given endpoint must be set prior to sending or receiving data.
Configuring each endpoint’s FIFO involves reserving a portion of the overall USB FIFO RAM to each endpoint.
The total FIFO RAM available is 4 Kbytes with the first 64 bytes reserved for endpoint 0. The endpoint’s FIFO
must be at least as large as the maximum packet size. The FIFO can also be configured as a double-buffered
FIFO so that interrupts occur at the end of each packet and allow filling the other half of the FIFO.
If operating as a device, the USB device controller's soft connect must be enabled when the device is ready to
start communications, indicating to the host controller that the device is ready to start the enumeration process. If
operating as a Host controller, the device soft connect must be disabled and power must be provided to V
BUS
via
the USB0EPEN signal.
17.4 USB Global Interrupts
Global interrupt enable, flag, and clear registers have been added to ensure that no interrupt is missed. The
USB interrupt can be enabled or blocked using the INTEN bit. The INTFLG bit indicates whether an interrupt has
occured or not. Finally the INTFLGCLR bit will clear the INTFLG when the value '1' is written to the field.
17.5 USB Registers
lists the registers. All addresses given are relative to the USB base address of 0x4000. Note that the
USB controller clock must be enabled before the registers can be programmed (see
).
Table 17-3. Universal Serial Bus (USB) Controller Register Map
Offset
Name
Type
Reset
Description
Section
0x000
USBFADDR
R/W
0x00
USB Device Functional Address
0x001
R/W
0x20
USB Power
0x002
USBTXIS
RO
0x0000
USB Transmit Interrupt Status
0x004
USBRXIS
RO
0x0000
USB Receive Interrupt Status
0x006
USBTXIE
R/W
0xFFFF
USB Transmit Interrupt Enable
0x008
USBRXIE
R/W
0xFFFE
USB Receive Interrupt Enable
0x00A
RO
0x00
USB General Interrupt Status
0x00B
R/W
0x06
USB Interrupt Enable
0x00C
USBFRAME
RO
0x0000
USB Frame Value
0x00E
USBEPIDX
R/W
0x00
USB Endpoint Index
0x00F
USBTEST
R/W
0x00
USB Test Mode
0x020
USBFIFO0
R/W
0x0000.0000
USB FIFO Endpoint 0
0x024
USBFIFO1
R/W
0x0000.0000
USB FIFO Endpoint 1
0x028
USBFIFO2
R/W
0x0000.0000
USB FIFO Endpoint 2
0x02C
USBFIFO3
R/W
0x0000.0000
USB FIFO Endpoint 3
0x060
R/W
0x80
USB Device Control
0x062
USBTXFIFOSZ
R/W
0x00
USB Transmit Dynamic FIFO Sizing
0x063
R/W
0x00
USB Receive Dynamic FIFO Sizing
Universal Serial Bus (USB) Controller
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
TMS320x2806x Microcontrollers
1069
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......