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.

example code use usb library tiva ware

Other Parts Discussed in Thread: EK-TM4C123GXL

guide arm.pdfhi guy

 I program transfer data from TM4c123g via USB, I read guide but I do not understand how it work . I can't configure USB . in page 428 in USER’S GUIDE(Stellaris® Peripheral Driver Library) it is not full example code for me, could you please show me full code and configure USB program use tivaware ,

thankyou very much

  • Hello Vu,

    The data can be transferred in multiple ways with USB. We will need more details, about what exactly are you trying to achieve, to better assist you.

    What do you want the USB on TM4C123G to act as - master or slave?

    If slave, what should the TM4C123G work as a - bulk device (that is, like a USB pen drive), Human interface device (like a USB mouse or keyboard) or something else, please explain?

    If master, what USB slave/device will be connected to TM4C123G?

    Thanks,
    Sai
  • Thank you for reply my question. I coltrol a mortor end sample time is 50uS . I need transfer date from TIva to Pc monitor . I think UART is not enough speed , i think that I should use Usb in regular speed , I don't have enough experience use it. Could you please consult me for some think. Thank you so much
  • Hello Vu,

    The UART can be clocked upto 10Mbps. You could send upto 40 bytes of data in 50uS at that rate. Is this not enough?

    If you want to use USB, you will also need to have an application on the PC. TivaWare has examples like "usb_dev_bulk" and "usb_dev_serial" that can be used. These examples can be found in the folder "<TivaWare_Installation_Directory>/examples/boards/ek-tm4c123gxl"

    The "usb_dev_bulk" can be used along with an application to send data to PC (please refer the readme.txt file for this example).
    The "usb_dev_serial" converts the USB to virtual serial port. So any terminal utility can be used to interact with the TM4C MCU.

    Hope this helps!

    Sai
  • hello Sai
    Tiva 4c 123 can transfer data in regular speed 5Mbs with UART . But when I see some receive program , the bard rate max is 250000. Can you show me the program can receive data in 5 Mbs with UART
    thank you so much
  • Hello Vu,

    That is a very good point you brought up. I did not think about the limitation on terminal window applications.

    I don't know of any terminal utility that can do a 5Mbs speed. However Tera Term utility can communicate with speeds upto 921600 bits per second (see screenshot below), which means you could transmit about 5 bytes in 50us. Not sure if that is enough for your application.

    Thanks,

    Sai