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.

Can not get USB0 disconnect interrupt

Hi

We test RNDIS on L138 EVM(1013527 rev4)  USB2.0 controller with DaVinci-PSP-SDK 03.20.00.12, we found when disconnect the USB cable, there is not disconnect interrupt happen, but when we use DaVinci-PSP-SDK 03.20.00.05, it is ok.  we checked the code and found the value of USB0OTGMODE bit in CFGCHIP2 have changed from 00h(DaVinci-PSP-SDK 03.20.00.05) to 05h(DaVinci-PSP-SDK 03.20.00.12), if we change it to 00h on DaVinci-PSP-SDK 03.20.00.12, it also works, so we want to know why TI change the value of the bit and why we change the bit value, interrupt can generate.

  • USB0OTGMODE is of two bit only so I think it's actually 0x1 and not 0x5 right?

     

    14-13 USB0OTGMODE USB2.0 OTG subsystem mode.
    0 No override. PHY drive signals to controller based on its comparators for VBUS and ID pins.
    1h Override phy values to force USB host operation.
    2h Override phy values to force USB device operation.
    3h Override phy values to force USB host operation with VBUS low.

    In device mode the correct value should be either 0x0 or 0x2. If you see this value to be 0x1 in RNDIS then thats wrong.

    Regards,
    Ajay

  • but when the value is 0x2, can not generate disconnect interrupt, only 0x0 is OK, so we are confused, can you reproduce the issue and tell us why?

  • As per document it should work even with 0x2. how are you determining that there is no disconnect interrupt ? Please enable the debug log before disconnecting using below command #echo D8 > /proc/driver/musb_hdrc . It will print if disconnect interrupt came or not.

    Regards,

    Ajay