English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (288/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
11.5.4
BUFFER DESCRIPTOR
CONFIGURATION
The UOWN, DTSEN and BSTALL bits in each BDT
entry control the data transfer for the associated buffer
and endpoint.
Setting the DTSEN bit enables the USB module to per-
form data toggle synchronization. When DTS is
enabled: if a packet arrives with an incorrect DTS, it will
be ignored, the buffer remains unchanged, and the
packet will be NAK’d (Negatively Acknowledged).
Setting the BSTALL bit causes the USB to issue a
STALL handshake if a token is received by the SIE that
would use the BD in this location – the corresponding
EPSTALL bit is set and a STALLIF interrupt is gener-
ated. When the BSTALL bit is set, the BD is not con-
sumed by the USB module (the UOWN bit remains set
and the rest of the BD values are unchanged). If a
SETUP token is sent to the stalled endpoint, the mod-
ule automatically clears the corresponding BSTALL bit.
The byte count represents the total number of bytes
that are transmitted or received. Valid byte counts
range from 0 to 1023. For all endpoint transfers, the
byte count is updated by the USB module, with the
actual number of bytes transmitted or received, after
the transfer is completed. If the number of bytes
received exceeds the corresponding byte count value
written by the firmware, the overflow bit is set and the
data is truncated to fit the size of the buffer (as given in
the BTD).
11.6 Hardware Interface
11.6.1 POWER SUPPLY REQUIREMENTS
Power supply requirements for USB implementation
vary with the type of application, and are outlined
below.
• Device:
Operation as a device requires a power supply
for the PIC32MX and the USB transceiver, see
Figure 11-6 for an overview of USB implementa-
tion as a device.
• Embedded Host:
Operation as a host requires a power supply for
the PIC32MX, the USB transceiver, and a 5V
nominal supply for the USB VBUS. The power
supply must be able to deliver 100 mA, or up to
500 mA, depending on the requirements of the
devices in the TPL. The application dictates
whether the VBUS power supply can be disabled
or disconnected from the bus by the PIC32MX
application. Figure 11-7 presents an overview of
USB implementation as a host.
• OTG Dual Role:
Operation as an OTG dual role requires a power
supply for the PIC32MX, the USB transceiver,
and a switchable 5V nominal supply for the USB
VBUS. An overview of USB implementation as
OTG is presented in Figure 11-8.
When acting as an A-device, power must be
supplied to VBUS. The power supply must be
able to deliver 8 mA, 100 mA, or up to 500 mA,
depending on the requirements of the devices in
the TPL.
When acting as a B-device, power must not be
supplied to VBUS. VBUS pulsing can be per-
formed by the USB module or by a capable
power supply.
11.6.2 VBUS REGULATOR INTERFACE
The VBUSON output can be used to control an off-chip
5V VBUS regulator. The VBUSON pin is controlled by
the VBUSON bit (U1OTGCON<3>). VBUSON appears
in Figure 11-7 and Figure 11-8.
DS61143E-page 286
Preliminary
© 2008 Microchip Technology Inc.