AT89C5132
15. Universal Serial Bus
The AT89C5132 implement a USB device controller supporting Full-speed data transfer. In addi-
tion to the default control endpoint 0, it provides 3 other endpoints, which can be configured in
Control, Bulk, Interrupt or Isochronous types.
This allows to develop firmware conforming to most USB device classes, for example the
AT89C5132 support:
•
USB Mass Storage Class Control/Bulk/Interrupt (CBI) Transport, Revision 1.0 – December
14, 1998
•
•
USB Mass Storage Class Bulk-Only Transport, Revision 1.0 – September 31, 1999
USB Device Firmware Upgrade Class, Revision 1.0 – May 13, 1999
15.0.1
USB Mass Storage Class CBI Transport
Within the CBI framework, the Control endpoint is used to transport command blocks as well as
to transport standard USB requests. One Bulk Out endpoint is used to transport data from the
host to the device. One Bulk In endpoint is used to transport data from the device to the host.
And one interrupt endpoint may also be used to signal command completion (protocol 0) but it is
optional and may not be used (protocol 1).
The following AT89C5132 configuration adheres to that requirements:
•
•
•
•
Endpoint 0: 32 Bytes, Control In-Out
Endpoint 1: 64 Bytes, Bulk Out
Endpoint 2: 64 Bytes, Bulk In
Endpoint 3: 8 Bytes, Interrupt In
15.0.2
USB Mass Storage Class Bulk-Only Transport
Within the Bulk-only framework, the Control endpoint is only used to transport class-specific and
standard USB requests for device set-up and configuration. One Bulk-out endpoint is used to
transport commands and data from the host to the device. One Bulk in endpoint is used to trans-
port status and data from the device to the host. No interrupt endpoint is needed.
The following AT89C5132 configuration adheres to that requirements:
•
•
•
•
Endpoint 0: 32 Bytes, Control In-Out
Endpoint 1: 64 Bytes, Bulk Out
Endpoint 2: 64 Bytes, Bulk In
Endpoint 3: not used
15.0.3
USB Device Firmware Upgrade (DFU)
The USB Device Firmware Update (DFU) protocol can be used to upgrade the on-chip Flash
memory of the AT89C5132. This allows installing product enhancements and patches to devices
that are already in the field. Two different configurations and descriptor sets are used to support
DFU functions. The Run-Time configuration co-exist with the usual functions of the device,
which shall be USB Mass Storage for AT89C5132. It is used to initiate DFU from the normal
operating mode. The DFU configuration is used to perform the firmware update after device re-
configuration and USB reset. It excludes any other function. Only the default control pipe (end-
point 0) is used to support DFU services in both configurations.
The only possible value for the MaxPacketSize in the DFU configuration is 32 Bytes, which is the
size of the FIFO implemented for endpoint 0.
67
4173E–USB–09/07