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.
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,
Hi Udita,
You can refer the following thread and see if the resolution provided in it helps you.
You can monitor the VBUS pin and invoke the Connect function.
Best Regards
Siddharth
hi
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