Other Parts Discussed in Thread: OMAPL138
Hi,
We are working on USB Host Suspend, Resume and Remote Wakeup feature on OHCI controller (omapl138evm).
When USB Bus is resumed via software control, it is resumed and works correctly but when USB Bus is resumed via Remote Wakeup, first IN transaction is not completed. i.e. Host sends the IN token. Device sends the data in response but Host does not send an ACK. USB Analyzer shows that there is turn-arond/timeout error. Then Host sends the IN token again. This time same previous data (first transaction data) is received and Host acknowledges the device. After the first transaction (in which ACK is missing), all IN transactions works correctly.
It is observed that OHCI controller is not getting Data interrupt along with Remote Wakeup Interrupt. When device is resumed via remote wakeup, only the remote wake up interrupt is received by OHCI hardware. Write Done Head interrupt is not generated which is essential for data transfer. Since No interrupt is generated so Host controller does not take any action. At the same time, it should be noted that Data is NOT lost. Device sends the same data again and Host sends the ACK after successfully receives the data.
It seems, when both Remote Wakeup and Data Interrupts comes together, then Host hardware IGNORES data interrupt and only processes the Remote Wakeup interrupt. This seems logical because Host is suspended at that time and can’t process data packet.
Observations
- If during Remote Wakeup, Device only sends the remote wake up event (interrupt) but don’t send data then timeout/turn-around is NOT appeared on USB Analyzer. It is verified using HID class (Standard Mouse Device).
- If during Remote Wakeup, Device sends the remote wake up event and after some duration, sends the data, then timeout/turn-around is NOT appeared on USB Analyzer. It is verified using HID class (Standard Mouse Device).
- If during Remote Wakeup, Device sends the remote wake up event and data packet together (very close to each other OR simultaneously) then timeout/turn-around is appeared on USB Analyzer. It is verified using CDC class (Standard Cable Modem Device) and HID Keyboard device.
- Though timeout transaction is visible on USB Bus but no interrupt is received by Host against this packet.
- OHCI Controller has no record of this transaction. No interrupt is received by Host Controller against this packet. Since this is not a transaction so no Error is observed in OHCI Controller state machine and in its Transfer Descriptor. Second transaction (on USB Analyzer but first for Controller) works correctly and OHCI Controller completes the transaction without any error reporting. Please note that Error Count (EC) is zero in General Transfer Descriptor of OHCI and hence HOST Controller does not report an error condition code in General Transfer Descriptor.
- Upon failure of ACK against first IN Packet, Host immediately (within ~13 Micro Seconds) sends an IN Token (second). Device sends the previous data packet again. Finally, HOST sends the ACK to Device.
Any reason, why Host does not ACK first transaction?
Regards