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.

Compiler/TMS320F28379D: USB connection between TMS320F28379D and computer

Part Number: TMS320F28379D
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE, CODECOMPOSER

Tool/software: TI C/C++ Compiler

Hello to everyone,

I am currently working with the DSP TMS320F28379D in topics related with communication. I have been trying to connect the device with my computer via USB, using the examples usb_dev_bulk and usb_bulk_example ControlSUITE provides. I think I have followed all the steps I've been told to make it work: I built the tiusdll project, generating the .dll archive (tiusdll.dll), I copied it into the usb_bulk_device folder, I ran the application for the computer (usb_bulk_device) and it built perfectly, I installed the drivers for the DSP (the computer recognised the device as Generic Bulk Device) and debugged the project usb_dev_bulk into the DSP and it runs perfectly.

The problem appears when I tried to run the usb_bulk_example in my computer and it appears the following message:

Unable to initialize the TI Bulk USB Device.
Error code is 1167 (Device is not connected.)

Please make sure you have a TI USB-enabled evaluation
or development kit running the usb_dev_bulk example
application connected to this system via the "USB OTG" or
"USB DEVICE" connectors. Once the device is connected, run
this application again.

I wonder if you could help me and tell me if I have done something wrong or if I should have done something else to make it work properly.

Thank you very much in advance,

Greetings

  • Hi,

    This may be an issue with the drivers you are using. What operating system are you using?

    Can you please use the drivers available in the C2000Ware software release package? They are signed properly and should work.

    Also, are you using the controlCARD? Make sure you connect to the MCU with the micro-USB connector located on top of the card.

    Regards,
    sal
  • Hi Sal,

    I am using Windows 10, that would be a problem?
    Now, I will download the C2000Ware software package and try to install the proper driver.
    Yes, I am using the controlCARD, connecting the mini-USB into the USB Emulation/UART connector and the micro-USB to the USB Host/Device Connector.

    Thank you Sal for your information and I will let you know as soon as I tried the C2000Ware drivers

    Regards
  • Hi Sal,

    I have just downloaded and installed the C2000Ware package and found the drivers as you told me. I supposed they are the one which are on the following path: C:\ti\c2000\C2000Ware_1_00_02_00\utilities\windows_drivers, aren't they?
    The problem occurs when I tried to install the drivers into the device, it appears a message saying:

    Windows found driver software for your device but encountered an error while attempting to install it.
    The hash for the file is not present in the specified catalog file. The file is likely corrupt or the victim of tampering

    Any idea why this has happened?

    Thank you very much,

    Regards
  • Yes. those are the correct drivers.

    That is a little strange. The drivers are signed. Can you try going into device manager and uninstalling the drivers and trying to reinstall them.

    Uninstall the drivers, then connect the device. then install the new drivers.

    sal
  • I have tried to do all the steps you told me (uninstall the drivers, plug the device and then install the new ones) and it stills doesn't work, it appears the same message I explained before.

    I am using Windows 10, as I said before, is it OK or should I do it with another operating system?

    Another aspect I have detected is that the bulk device only appears on the list in Device Manager when I connect the device and run the usb_bulk_device example on Code Composer. I supposed it is normal but I would like to know if it is really like that.

    Thank You
  • Hi Sal,

    I have finally got it working. I had to disable the compulsory checking for signed drivers. Then I could install the drivers without any trouble. Now, it all works fine.

    Thank you

  • Very good! Thank you for posting.

    In one of the next two C2000Ware releases, we should have an update of the drivers.
  • Hello Sal,

    Which rev will this be?

    Thanks,
    John W.
  • Hi Sal,

    Now that the communication works fine, I was wondering if the rate of bits per second (established in 115200) could be changed to make the communication faster and if that would work. If that was the case, would it enough just to changed the rate of bits per second in the device manager or would I have to do something else?

    Thank you very much

  • Are you setting a bit rate for a bulk device?

    I doubt you will see much improvement if you could increase the bit rate above 115200.

    Please see this parallel thread. e2e.ti.com/.../2375256

    I suggest increasing the optimization level of your CCS project for the C28x. At least -O2.

    sal
  • Hi Sal,

    I was working with the USB communication for TMS320F28379D with the example usb_dev_bulk and I would like to make some changes. I was trying to make it work in a way that the communication be in just one way, from the DSP to the computer only, instead of the echo mode that it is established by default. What I want to do is generate a number in the DSP every second, for example, and then send it to the computer. I tried to get rid of the RxHandler function and called the EchoNewDataToHost function in main(), but it didn't work.

    I would like to ask you if you know a way to make this work, using this example or another, I don't care.

    Thank you very much

  • Hi,

    In order to do this, you should identify when and were the data that is being transmitted is placed in the USB Transmit Buffer. Since you won't be receiving any data, all you should need to do is fill the USB TX Buffer.

    You will still get interrupts though because the PC will send DATA IN packets requesting data. As long as the data was written to the USB TX software buffer and then properly written to the registers and FIFO via the USBlib, it should send the data out as a response to the DATA IN packet.

    Hope this helps.

    sal
  • Hi,
    And would it be possible that the program only enters in the RxHandler interrupt in the beggining to establish the configuration and then it opperates only with EchoNewDataToHost and TxHandler when I call them?
    What I want to do consists in every certain seconds generates a number with a timer interrupt and then send this number into the computer, but without the need of sending the szBuffer in the usb_bulk_example every time I want to get a new number.
    Thank you very much
  • Hi,

    See this post with the two ZIPs I posted.

    e2e.ti.com/.../2378063

    Included is a modified USB bulk example which only sends to the Host. THis will have everything you need. You should only have to look at the source file containing main().

    You should call USBDBulkTxPacketAvailable() and USBDBulkPacketWrite() from your main loop or from an interrupt service routine. It shouldn't matter.

    sal
  • Hi,
    I have been trying both proyects you sent me and I have some doubts about them.
    First of all, in which variable of the Visual Studio project is received the information sent in variable buffer[256] of the CodeComposer project?
    Another problem is that it seems that the CodeComposer project at one time is doing nothing and if I pause it, it appears the following message:
    "Can't find a source file at "C:/repositories/cs30_f2837x/F28X7x_common/usblib/usbringbuf.c"
    Locate the file or edit the source lookup path to include its location." Any idea?
    Also, when I build the CodeComposer project, a warning says that in the USBDBulkPacketWrite function it is more appropiate to use uint8_t* instead of unsigned char*, would it make any difference?
    And last, if I want to send a number to the computer, it is only neccesary to call for the functions USBDBulkTxPacketAvailable and USBDBulkPacketWrite or it is only needed the RxHandler and the TxHander?

    Thank you so much
  • Hi,

    Please try calling USBDBulkTxPacketAvailable() and USBDBulkPacketWrite() as you see in the stress test C2000 source code. You should also call USBDBulkPacketWrite() in your TXHandler like the example shows.

    Please follow the example RXHandler and TXHandler.

    In the example, the main loop and the TX Handler are both writing data to the USB TX Buffer.

    sal
  • Hi,
    Alright, I haven't changed anything from the projects you sent me. What I was asking is that, in the Visual Studio project, which is the buffer in which I can receive the data I send in buffer[256] from the DSP with the USBDBulkPacketWrite function. Also, it seems that the Visual Studio program is stacked in the following line: dwError = ReadUSBPacket(hUSB, szBuffer, ECHO_PACKET_SIZE, &ulRead,INFINITE, NULL); I supposed it is because the szBuffer is not initialized.
    Thank you
  • Hi,
    Alright, I haven't changed anything from the projects you sent me. What I was asking is that, in the Visual Studio project, which is the buffer in which I can receive the data I send in buffer[256] from the DSP with the USBDBulkPacketWrite function. Also, it seems that the Visual Studio program is stacked in the following line: dwError = ReadUSBPacket(hUSB, szBuffer, ECHO_PACKET_SIZE, &ulRead,INFINITE, NULL); I supposed it is because the szBuffer is not initialized.
    Thank you
  • Just to add something to this post - I have my target ("Themis") working now with the USB Bulk driver; working meaning right now that the driver can load without error.

    I took the example from the latest "C2000-Ware" - that is posted here:   - used the examples and the drivers.

    I also had to disable the signed driver windows-10 setting - after that - I see this:

    Regards,
    John W.

  • Sure Sal, N.P.

    Happy New Year!
    John