User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 321
www.energymicro.com
Figure 15.31. Periodic IN Core Internal Flow for Periodic Transfer Interrupt Feature
If (USB_DIEPx_CTL.CNAK = 0b1) &&
(USB_DIEPxCTL.EPENA = 0b1) &&
(USB_DCTL.IGNRFRMNUM = 0b1)
NOTE
1. Core will fet ch data only from DWORD Aligned addresses
2. Core w ill not t ag Periodic IN Packets t o a specific (micro) fram e number
3. In case core is not able to send out data for t he current (micro) fram e the
data will not be flushed and will be sent out in t he next (micro) frame
4. The DATA PID of the packet which w as not sent in the previous
( m icro) fram e will remain the sam e
5. Short Packets are not allow ed in betw een t ransfers. Only the last packet
can have a Short Packe t
START
IN Token From Host Check Dat a AvailableYES
WAIT
YES
NO
· ISOC IN Transm it Zero Length Packet (ZLP)
· Interrupt IN Xm it NAK Packet
· MultCnt = MultCnt
· PktCnt = PktCnt
· XferSize = XferSize
// M ultCnt, PktCnt and XferSize values w ill
not change
· Transmit Data Packet
· MultCnt = MultCnt -1
· PktCnt = PktCnt - 1
· XferSize = XferSize - MaxPktSize
If
M ultCnt = 0
If PktCnt = = 0 &&
XferSize = = 0
MultCnt = USB_DIEPx_TSIZ.MC
USB_DIEPx_INT.XFERCOMPL = 1
YES
NO
return
15.4.5 OTG Revision 1.3 Programming Model
This section describes the OTG programming model when the core is configured to support OTG
Revision 1.3 of the specification.
The core is an OTG device supporting HNP and SRP. When the core is connected to an “A” plug, it is
referred to as an A-device. When the core is connected to a “B” plug it is referred to as a B-device. In
Host mode, the core turns off Vbus to conserve power. SRP is a method by which the B-device signals
the A-device to turn on Vbus power. A device must perform both data-line pulsing and Vbus pulsing,
but a host can detect either data-line pulsing or Vbus pulsing for SRP. HNP is a method by which the
B-device negotiates and switches to host role. In Negotiated mode after HNP, the B-device suspends
the bus and reverts to the device role.
15.4.5.1 A-Device Session Request Protocol
The application must set the SRP-Capable bit in the Core USB Configuration register. This enables the
core to detect SRP as an A-device.
1. To save power, the application suspends and turns off port power when the bus is idle by writing the
Port Suspend and Port Power bits in the Host Port Control and Status register.
2. PHY indicates port power off by detecting that VBUS voltage level is no longer valid.
3. The device must detect SE0 for at least 2 ms to start SRP when Vbus power is off.
4. To initiate SRP, the device turns on its data line pull-up resistor for 5 to 10 ms. The core detects
data-line pulsing.
5. The device drives Vbus above the A-device session valid (2.0 V minimum) for Vbus pulsing.
The core interrupts the application on detecting SRP. The Session Request Detected bit is set in
Global Interrupt Status register (USB_GINTSTS.SESSREQINT).