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.

CCS/TM4C129XNCZAD: HOW TO WRITE THE PROGRAM FOR USB

Part Number: TM4C129XNCZAD

Tool/software: Code Composer Studio

Hi,

I am using dk tm4c129xnczad controller interfacing with sensor here i captured all the data in the controller so i need to transfer all these data to the pc through usb.I  have tried with the below below program but  it is not working means it is going inside the function then it is stucking over there not executing further instructions not even going to first instruction ie USBDevConnect(USB0_BASE); stucking at this point so can you plz help me to resolve this issue.

void usb_trans()
{
uint8_t data="hell0";
Display(("usd.\r\n"));

USBDevConnect(USB0_BASE);

USBDevMode(USB0_BASE);
USBDevEndpointConfigGet(USB0_BASE, USB_EP_1, 10, USB_EP_MODE_BULK | USB_EP_DEV_OUT);
//
// Configure FIFO as a device IN endpoint FIFO starting at address 64
// and is 64 bytes in size.
USBFIFOConfigSet(USB0_BASE, USB_EP_1, 64, USB_FIFO_SZ_64, USB_EP_DEV_IN);
//
// Put the data in the FIFO.
USBEndpointDataGet(USB0_BASE, USB_EP_1, &data, 64);
//
// Start the transmission of data.
USBEndpointDataSend(USB0_BASE, USB_EP_1, USB_TRANS_IN);*/
}

 

  • Hello Chandana,

    It doesn't look like you are leveraging our USB library, please do so as the API's there already include the correct initialization for the USB peripheral. For example if you are trying to do a USB Bulk device, we have specific API's for that in the usblib and usblib\device folders. Also we have a full TivaWare example for the DK-TM4C129X located at [Install Path]\TivaWare_C_Series-2.1.4.178\examples\boards\dk-tm4c129x\usb_dev_bulk - you should study this to understand how to properly configure the USB peripheral for your TM4C device.