This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-OMAPL138: OHCI Host Controller does not send ACK for first Data Packet Received after Remote Wakeup - omapl138evm

Part Number: PROCESSOR-SDK-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, The first IN transaction is not completed. i.e. Host sends the IN token. Device sends the data in response (USB Analyzer shows that there is turn-arond/timeout error). Host does not send an ACK. Then Host sends the IN token again. This time same previous data is received and Host acknowledges the device. After the first transaction (in which ACK is missing), all IN transactions works correctly.

Is it default/known behavior of OHCI (No ACK from Host for First IN Data Packet)? Any other reason, why first transaction is not completed. 

Regards 

  • Hello,

    Could you please confirm you are following the guidance in the TRM regarding USB remote-wakeup:

    Regards,
    Sahin

  • Hi, 

    Yes, We are following the same sequence. ACK is missing by HOST only in case of FIRST IN Transactions. After that, All IN transactions works perfect. See the sequence 

    /* There is no need to set Resume State. It is automatically set during Remote Wakeup. Wait 20ms as per USB Specs until USB Host Bus is Resumed. */
    wait_ms(20);

    READ32(base_address + HC_CONTROL, hcControl);
    hcControl &= ~CTL_HCFS_MASK;
    hcControl |= CTL_HCFS_OP;
    WRITE32(base_address + HC_CONTROL, hcControl);

    /* According to the USB 2.0 specification section 7.1.7.7, The USB System Software must provide a 10 ms resume recovery time (TRSMRCY) during which it will not attempt to access any device connected to the affected (just-activated) bus segment. */
    wait_ms(10);

    /* Restore End Points Lists State. */
    READ32(ohci, (base_address + HC_CONTROL, hcControl);
    hcControl |= CTL_PLE | CTL_IE | CTL_CLE | CTL_BLE;
    WRITE32(base_address + HC_CONTROL, hcControl);

    READ32(base_address + HC_RH_PORT_STATUS + OHCI_GET_PORTSTS_REG_OFFSET(0), rh_status);
    while (rh_status & 4);
    while ((rh_status & 0x40000));

    READ32(base_address + HC_RH_PORT_STATUS + OHCI_GET_PORTSTS_REG_OFFSET(1), rh_status);
    while (rh_status & 4);
    while ((rh_status & 0x40000));

    Please note that ErrorCount filed and ConditionCode fields are zero when ACK is missed. 

    Regards