English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (299/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
Software must set RESUME for 1-15 ms if a USB
device, or >20 ms if a USB host, then clear it to enable
remote wake-up. For more information on RESUME
signaling, see Section 7.1.7.7, 11.9 and 11.4.4 in the
USB 2.0 specification.
Writing RESUME will automatically clear the special
hardware suspend (low-power) state.
If the part is acting as a USB host, software should, at
minimum, set the SOFEN (U1CON<0>) after driving its
resume signaling. Otherwise, the USB link would return
right back to the suspend state. Also, software must not
initiate any downstream traffic for 10 ms following the
end of resume signaling.
11.13.1.4 Receiving Resume Signaling
When the USB logic detects resume signaling on the
USB bus for 2.5 μs, hardware will set the RESUMEIF
(U1IR<5>) interrupt.
A device receiving resume signaling must prepare itself
to receive normal USB activity. A host receiving resume
signaling must immediately start driving resume signal-
ing of its own. The special hardware suspend (low-
power) state is automatically cleared upon receiving
any activity on the USB link.
Reception of any activity on the USB link (this may be
due to resume signaling or a link disconnect) while the
PIC32MX is in Sleep mode will cause the ACTVIF
(U1OTGIR<4>) interrupt to be set. This will cause
wake-up from Sleep.
11.13.1.5 SRP Support
SRP support is not required by non-OTG applications.
SRP may only be initiated at full speed. Refer to the
On-The-Go Supplement specification for more infor-
mation regarding SRP.
An OTG A-device or embedded host may decide to
power-down the VBUS supply when it is not using the
USB link. Software may do this by clearing VBUSON
(U1OTGCON<3>). When the VBUS supply is powered
down, the A-device is said to have ended a USB ses-
sion.
Note:
When the A-device powers down the VBUS
supply, the B-device must disconnect its
pull-up resistor unless signalling a desire
to become host during HNP negotiation.
Refer to Section 11.13.1.6 “HNP”.
An OTG A-device or embedded host may repower the
VBUS supply at any time to initiate a new session. An
OTG B-device may also request that the OTG A-device
repower the VBUS supply to initiate a new session. This
is the purpose of the SRP.
Prior to requesting a new session, the B-device must
first check that the previous session has definitely
ended. To do this, the B-device must check that:
PIC32MX3XX/4XX
1. VBUS supply is below the session end voltage.
2. Both D+ and D- have been low for at least 2 ms.
The B-device will be notified of condition 1 by the SES-
ENDIF (U1OTGIR<2>) interrupt.
Software can use the LSTATEIF (U1OTGIR<5>) bit
and the 1 ms timer to identify condition 2.
The B-device may aid in achieving condition 1 by dis-
charging the VBUS supply through a resistor. Software
may do this by setting VBUSDIS (U1OTGCON<0>).
The B-device then proceeds by pulsing the D+ data
line. Software should do this by setting DPPULUP
(U1OTGCON<7>). The data line should be held high
for 5-10 ms.
After these initial conditions are met, the B-device may
begin requesting the new session. It begins by pulsing
the VBUS supply. Software should do this by setting
VBUSCHG (U1OTGCON<1>).
When an A-device detects SRP signaling (either via the
ATTACHIF (U1IR<6>) interrupt or via the SESVDIF
(U1OTGIR<3>) interrupt), the A-device must restore
the VBUS supply by setting VBUSON
(U1OTGCON<3>).
The B-device should not monitor the state of the VBUS
supply while performing VBUS supply pulsing. After-
wards, if the B-device does detect that the VBUS supply
has been restored (via the SESVDIF (U1OTGIR<3>)
interrupt), it must reconnect to the USB link by pulling
up D+. The A-device must complete the SRP by
enabling VBUS and driving reset signalling.
11.13.1.6 HNP
An OTG application with a micro-AB receptacle must
support HNP. HNP allows an OTG B-device to tempo-
rarily become the USB host. The A-device must first
enable HNP in the B-device. HNP may only be initiated
at full-speed. Refer to the On-The-Go supplement for
more information regarding HNP.
After being enabled for HNP by the A-device, the B-device
can request to become the host any time that the USB link is
in suspend state by simply indicating a disconnect. Software
may accomplish this by clearing the DPPULUP bit
(U1OTGCON<7>).
When the A-device detects the disconnect condition
(via the URSTIF (U1IR<0>) interrupt), the A-device
may allow the B-device to take over as host. The A-
device does this by signaling connect as a full-speed
device. Software may accomplish this by disabling host
operation, HOSTEN = 0 (U1CON<3>), and connecting
as a device (DPPULUP = 1). If the A-device instead
responds with resume signaling, the A-device will
remain as host.
When the B-device detects the connect condition (via
ATTACHIF (U1IR<6>), the B-device becomes host.
The B-device drives Reset signaling prior to using the
bus.
© 2008 Microchip Technology Inc.
Preliminary
DS61143E-page 297