Datasheet
Detailed Controller Description
9
SLLS519H—January 2010 TUSB3410, TUSB3410I
3 Detailed Controller Description
3.1 Operating Modes
The TUSB3410 controls its USB interface in response to USB commands, and this action is independent of
the serial port mode selected. On the other hand, the serial port can be configured in three different modes.
As with any interface device, data movement is the main function of the TUSB3410, but typically the initial
configuration and error handling consume most of the support code. The following sections describe the
various modes the device can be used in and the means of configuring the device.
3.2 USB Interface Configuration
The TUSB3410 contains onboard ROM microcode, which enables the MCU to enumerate the device as a USB
peripheral. The ROM microcode can also load application code into internal RAM from either external memory
via the I
2
C bus or from the host via the USB.
3.2.1 External Memory Case
After reset, the TUSB3410 is disconnected from the USB. Bit 7 (CONT) in the USBCTL register (see
Section 5.4) is cleared. The TUSB3410 checks the I
2
C port for the existence of valid code; if it finds valid code,
then it uploads the code from the external memory device into the RAM program space. Once loaded, the
TUSB3410 connects to the USB by setting the CONT bit and enumeration and configuration are performed.
This is the most likely use of the device.
3.2.2 Host Download Case
If the valid code is not found at the I
2
C port, then the TUSB3410 connects to the USB by setting bit 7 (CONT)
in the USBCTL register (see Section 5.4), and then an enumeration and default configuration are performed.
The host can download additional microcode into RAM to tailor the application. Then, the MCU causes a
disconnect and reconnect by clearing and setting the CONT bit, which causes the TUSB3410 to be
re-enumerated with a new configuration.
3.3 USB Data Movement
From the USB perspective, the TUSB3410 looks like a USB peripheral device. It uses endpoint 0 as its control
endpoint, as do all USB peripherals. It also configures up to three input and three output endpoints, although
most applications use one bulk input endpoint for data in, one bulk output endpoint for data out, and one
interrupt endpoint for status updates. The USB configuration likely remains the same regardless of the serial
port configuration.
Most data is moved from the USB side to the UART side and from the UART side to the USB side using on-chip
DMA transfers. Some special cases may use programmed I/O under control of the MCU.
3.4 Serial Port Setup
The serial port requires a few control registers to be written to configure its operation. This configuration likely
remains the same regardless of the data mode used. These registers include the line control register that
controls the serial word format and the divisor registers that control the baud rate.
These registers are usually controlled by the host application.
3.5 Serial Port Data Modes
The serial port can be configured in three different, although similar, data modes: the RS-232 data mode, the
RS-485 data mode, and the IrDA data mode. Similar to the USB mode, once configured for a specific
application, it is unlikely that the mode would be changed. The different modes affect the timing of the serial
input and output or the use of the control signals. However, the basic serial-to-parallel conversion of the
receiver and parallel-to-serial conversion of the transmitter remain the same in all modes. Some features are
available in all modes, but are only applicable in certain modes. For instance, software flow control via Xoff/Xon
characters can be used in all modes, but would usually only be used in RS-232 or IrDA mode because the
RS-485 mode is half-duplex communication. Similarly, hardware flow control via RTS
/CTS (or DTR/DSR)
handshaking is available in RS-232 or IrDA mode. However, this would probably be used only in RS-232 mode,
since in IrDA mode only the SIN and SOUT paths are optically coupled.