Datasheet

TUSB3410 Bootcode Flow
64
SLLS519H—January 2010TUSB3410, TUSB3410I
If the descriptor block contains binary firmware, then the bootcode sets the header pointer to the
beginning of the binary firmware in the I
2
C EEPROM.
If the descriptor block is end of header, then the bootcode stops searching.
Enable global and USB interrupts and set the connection bit to 1.
Enable global interrupts by setting bit 7 (EA) within the SIE register (see Section 9.1.1) to 1.
Enable all internal peripheral interrupts by setting the EX0 bit within the SIE register to 1.
Connect to the USB by setting bit 7 (CONT) within the USBCNTL register (see Section 5.4) to 1.
Wait for any interrupt events until Get DEVICE DESCIPTOR setup packet arrives.
Suspend interrupt
The idle bit in the MCU PCON register is set and suspend mode is entered. USB reset wakes up the
microcontroller.
Resume interrupt
Bootcode wakes up and waits for new USB requests.
Reset interrupt
Call UsbReset() routine.
Setup interrupt
Bootcode processes the request.
USB reboot request
Disconnect from the USB by clearing bit 7 (CONT) in the USBCTL register and restart at address
0x0000.
Download firmware from I
2
C EEPROM
Disable global interrupts by clearing bit 7 (EA) within the SIE register
Load firmware to XDATA space if available.
Download firmware from the USB.
If no firmware is found in an I
2
C EEPROM, the USB host downloads firmware via output endpoint 1.
In the first data packet to output endpoint 1, the USB host driver adds 3 bytes before the application
firmware in binary format. These three bytes are the LSB and MSB indicating the firmware size and
followed by the arithmetic checksum of the binary firmware.
Release control to the application firmware.
Update the USB configuration and interface number.
Release control to application firmware.
Application firmware
Either disconnect from the USB or continue responding to USB requests.
11.3 Default Bootcode Settings
The bootcode has its own predefined device, configuration, and string descriptors. These default descriptors
should be used in evaluation only. They must not be used in the end-user product.
11.3.1 Device Descriptor
The device descriptor provides the USB version that the device supports, device class, protocol, vendor and
product identifications, strings, and number of possible configurations. The operation system (Windows,
MAC, or Linux) reads this descriptor to decide which device driver should be used to communicate with this
device.