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.

TMS320F28379D: USB module communication issue

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hi all,

My company is working on usb module of the above mentioned microcontroller in CDC device class mode , I am able to send and receive the data by polling via usb , and have put the program in flash memory . The problem which I am facing is , when i am disconnecting the usb cable from pc and again connecting it , it is unable to  send and receive the bytes as before , though the tivaware bulk device can be shown in device manager , I hv to switch off and on the power to reestablish the communication. Kindly verify the issue . Also provide me with the driverlib of registers in usb if possible.

Thanks & Regards

ti user

  • Hi , 

    I tried running the usb_ex1_dev_serial example  provided in C2000Ware from Flash on F28388D control card.  I am unable to see the issue that you are observing, maybe because the Control Card is powered using USB. 

    The USB driverlib can be found in C:\ti\c2000\C2000Ware_3_04_00_00\driverlib\f2837xd\driverlib\

    Best Regards

    Siddharth 

  • Hi,

    Thanks for replying. We have used ex9 USB Bulk Throughput as reference. The following steps are taken to implement it: -

    Step 1: - A fixed external 5V supply is given to microcontroller TI28379D, due to which it is not going in USB Disconnect event provided in Rx Handler.

    Step 2: - Buffers are initialized, device mode is set, and CDC device class functions are used to call them.

    Step 3: - The device manager detects the device as tiva ware generic bulk device

    Step 4: - When tested via application interface, the code is sending and receiving the data

    Now, the problem we are facing is, while disconnecting the USB cable from pc & reconnecting it, the device manager is still detecting the device, but the application is unable to send or receive the data. To reinitialize the process, we have to switch off the power supply and switch it on again. Kindly look through the issue.

    Also, the registers mentioned in hardware file in driver library are just definitions and we are unable to access them . Is there a way out to use them via bit specific field approach?

  • Hi, 

    When you reconnect the USB, it should get a USB_EVENT_CONNECTED event  which can be used to initialize the CDC device.

    We don't have header files with bit field register definitions for USB. We only provide hw_usb.h located in the C:\ti\c2000\C2000Ware_3_04_00_00\device_support\f2837xd\common\deprecated\inc folder.

    Best Regards

    Siddharth

  • Hi Siddharth,

    The USB is going to USB_EVENT_CONNECTED but is not reinitializing until we switch off the power supply and again switch it on . Also no event is defined for USB event disconnect while it is connected directly to 5 V supply in device mode. 
  • Hi Udita, 

    You can refer the following thread and see if the resolution provided in it helps you.

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/734531/tms320f28379d-usb-examples-from-c2000ware-events-problems

    You can monitor the VBUS pin and invoke the Connect function. 

    Best Regards

    Siddharth

  • hi

    In this thread kindly explain where the USB0_base address is defined and how to use this code without calling external interrupt , Also clarify whether we can use this in usb bulk throughput example.
  • Hi, 

    It is now defined as USBA_BASE in the C:\ti\c2000\C2000Ware_3_04_00_00\driverlib\f2837xd\driverlib\inc\hw_memmap.h. 

    If you don't want to use any interrupt , then  you will have to add the isr code during startup. 

    // check if VBUS is high or low at start up because this would not cause an interrupt.
    //
    if(GpioDataRegs.GPBDAT.bit.GPIO46 == 1)
    {
    USBDevConnect(USB0_BASE);
    }
    else
    {
    USBDevDisconnect(USB0_BASE);
    }

    You should be able to use this in the usb bulk throughput example.

    Best Regards

    Siddharth

  • Hi 

    Thank you so much for helping  out . I got  the issue , while removing the  echo new data to host , I mistakenly removed  one  event  as  well. Now its  working fine 

    Thanks  & Regards

  • Glad that you were able to resolve the issue. I will close this thread.

    Best Regards

    Siddharth