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.

TMS320F28075: USB Serial Device Example

Part Number: TMS320F28075
Other Parts Discussed in Thread: C2000WARE

Hello,

I managed to compile and run the "usb_ex1_serial_device" project from latest version of C2000Ware.

The board registers a virtual COM port with provided driver and looks fine on Windows 10 side.

I can send data (in 6 byte packets) from PC using a terminal software and receive it on SCIA-RX pin.

In next step,  I connected the SCIA-RX to SCIA-TX on microcontrller (GPIO28 an GPIO29), on terminal software I receive only 2 bytes of sent data whenever I send a packet.

Here is the example:

Tx: "USBSER"         Rx: "US"

Tx: "TEST P"           Rx: "BS"

Tx "rogram"             Rx: "ER"

It seems that the data buffered correctly but the interrup for USB serial TX does not trigger properly.

  • Hi Mir,

    Can you provide details on how are you sending the packets from the terminal software ?

    Also , were you able to run this example as is without any modifications? You should see two COM Ports and characters typed in one COM Port should be echoed in the other and vice versa.

    Best Regards

    Siddharth

  • Hi Siddharth,

    The test is done on a custom made hardware. 

    We have USB interface (GPIO42 and GPIO43) connected to PC and SCI-A port (GPIO28 and GPIO 29) as LVTTL signals tied together.

    So we see only one VCP (Virtual COM port) on the PC that is correctly enumerated and reported with no error in device manager.

    The example code is compiled and executed with minimal modifications, we just removed 4 lines of initializing GPIO120 and GPIO121 as suggested in this question:

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/869036/3214995?tisearch=e2e-sitesearch&keymatch=tms320f28075#3214995

    To send a packet we use TeraTerm, other terminal programs can also do the same.

    When you enter strings from keyboard byte by byte, everything works fine, and you get echo for each byte given that SCIA-TXD and SCIA-RXD are tied together.

    To produce the problem, I type a string in Notepad, copy it to clipboard and paste it in TeraTerm, this is a simple way to enter a burst of characters to terminal.

    I can verify that on SCI-A side all bytes are correctly sent out, but only first two bytes will be echoed back to USB side.

    TeraTerm has a feature in its "Menu" -> "Setup" -> "Serial Port..." -> "Transmit Delay" that by default is 0, when you enter a value greater than 10ms, a burst of characters will be sent one by one with specified delay between them. In this case we get all the string correctly echoed back.

    It seems that the example software can not handle burst of 3 bytes or more of characters, which will drastically reduce its throughput.

    With regards,

    MHG

  • Hi Mir,

    For bulk data transfer, there is another example provided "usb_ex4_dev_bulk" . You can take a look at that.

    This example "usb_ex1_serial_device" expects data to be sent byte by byte.

    Best Regards

    Siddharth

  • Hello Siddharth, Thank you for your suggestion. Over the years we have developed some boards based on F2808, F2809, F28035, ... and developed PC software that communicates to them over Serial Port. Then we used various USB to Serial interfaces to connect them to Modern PCs and Laptops. Now we want to use the benefit of USB port on F28075 or F28069 to remove the USB to serial interface. The Serial Device example as explained in USB documentation in C2000Ware, enumerates as a virtual serial port on PC with a standard driver and the PC side software should communicate to the board with no change. The byte by byte restriction is a very strange limitation on a serial port interface. I'll try to change it myself and enable SCI FIFO to make it work as close to a general USB to serial interface throughput. Any suggestion or clues to help me do that is highly appreciated. With regards, MHG