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.

How to disable Vbus of USB in Tiva controller

Other Parts Discussed in Thread: TPD4E001-Q1, TPD3E001

Hi all,

       I am using TM4c1237h controller, I have interface Keyboard and Pendrive to TIVA.I am using FSUSB11MTX for multiplexing them.Using a GPIO pin .Because of noise the controller of IBM controller gets hang (it is not showing Unknown device, It gets hang in while loop of USBHCDGetDeviceDescriptor() function ), now i want to reset this(IBM keyboard ) controller by disabling Vbus signal.How should i do this? How to remove power on VBus?

         I am using tiva's TivaWare_C_Series-2.1.0 library i noticed that in function USBHCDGetDeviceDescriptor() (in USBHCDMain() fun -case USBConnect ) is compaired with 0 for unknown device check. But on error this function is returning 0xffffffff not zero. So unknown device connect this condition will never execute.

Regards,
Sagar

  • Hello Dhanush

    Do you have a schematic showing the connection of how VBUS is being driven to the keyboard and pendrive? I believe TM4C is the host?

    Regards

    Amit

  • Hi Amit,

          I am using TPS 2051 IC for giving VBUS supply as shown in fig. For switching D+ and D- i am using FSUSB11MTX IC.Yes TM4C is the host.

  • Hello Dhanush

    The USBEPC register controls the USBEPE that in turn controls the device. You can use the manual control of EPEN in this register to disable and enable VBUS.

    Regards

    Amit

  • hi Amit,

          In my project i am doing spark testing on keyboard . In this after some time in USBHCDEvent()  function it shows an USB_DISCONNECT event only. I removed keyboard manually and connected again still it is showning only USB_DISCONNECT event only. Other than USB everything is working fine.

    Regards,

    Dhanush

  • Hello Dhanush,

    Did you try the EPEN control to power down the VBUS?

    Regards

    Amit

  • hi Amit,

    Yes i had used EPEN ,but still it is showing an USB_DISCONNECT event only.

    Regards,

    Dhanush

  • Hello Dhanush,

    Does the VBUS go down when EPEN is changed? Also how do you restart the USBOTG Controller to start the Bus Enumeration Process?

    Regards

    Amit

  • Hi Amit,

    The VBUS goes down when EPEN is changed. To restart the enumeration I am calling USBHCDDeviceDisconnect(0,0) and the USBHCBInit() function respectively.

    Regards

    Dhanush

  • Hello Dhanush,

    You would need to periodically call USBOTGMain to check if the device is still connected and if not then restart the process.

    Regards

    Amit

  • Hi Dhanush Nair (or sagar salunkhe?) and Amit,

    The OP(s) made the same question twice on the Keil forum,
    http://www.keil.com/forum/58447/
    http://www.keil.com/forum/56994/ (Posted 20-Aug-2014 14:39 GMT)
    And Andy Neil complained that the topic has nothing to do with Keil.
    I agree with Andy, we have moved here.

    On the Keil forum, the OP(s) made another question different from the original, but it seems tightly related to their original question,


    sagar salunkhe said:

    I am facing another problem also,as In my project i am doing spark testing on keyboard . In this after some time in USBHCDEvent() function it shows an USB_DISCONNECT event only. I removed keyboard manually and connected again still it is showning only USB_DISCONNECT event only. Other than USB everything is working fine.

    I answered to this question on the Keil forum,
    Tsuneo Chinzei said:

    Noise caused by the spark should make the USB host module / firmware mad on the chip.

    The USB ports should have TVS (ESD) protection chips, like TI TPD3E001, TPD4E001-Q1 (**1) or ST USBLC6-2, just after the USB connectors, before the spark would break your Tiva chip down unrecoverablly.

    Insert protection chips, and monitor these facts,
    - The host stack may return transaction error, just when a transaction is going on at the spark. But the next transaction (error retry) passes successfully.
    - The target keyboard still works properly after the spark, without power-cycling of VBUS.

    I believe it should be the purpose of the spark test ;-)

    (**1) I added TI parts, respecting TI forum ;-)


    Ok, go on further discussion here.

    Tsuneo

  • hi Tsuneo ,

        Thank you very much Tsuneo for your valuable suggestion.I have implemented your suggestion After applying few spark on usb keyboard usb disconnect event comes. In this after some time in USBHCDEvent() function it shows an USB_DISCONNECT event only. I removed keyboard manually and connected again still it is showning only USB_DISCONNECT event only. Other than USB everything is working fine.

        Is there any way to reset internal usb controller of TIVA without reseting the main controller.

    Regards,

    Dhanush