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/TM4C1294KCPDT: Setting buffer size of USB Cdc after USBDCDCInit

Part Number: TM4C1294KCPDT


Tool/software: Code Composer Studio

Hi,

I would like to set the buffer of USB communication after initialization.

How can I do it? Which USB Cdc API call can be used for this purpose?

  • Hi,

     Hopefully you have already tried the TivaWare usb_dev_serial.c example which uses CDC class.   If you refer to the usb_dev_serial example, the buffer size is defined in the usb_structs.h.

  • Hi Charles,

    Thanks Charles for the reply.

    I have checked usbserialdevice_EK_TM4C1294XL_TI sample. Here it is setting in the initial stage only. i.e., through USBDCDCInit() only.

    But, my requirement is to set the new buffer after USBDCDCInit() API call.

    Can USBBufferInit called multiple times to set different buffer size after initialization?

  • Hi,

      I'm not aware of any APIs that allows you to change the buffer size dynamically during runtime. Why would you want to do that. There is a 4KB FIFO RAM that needs to be shared by the 16 endpoints. Since the FIFO RAM is shared, not only the size of buffer for each endpoint needs to be specified during initialization but also the starting address of each endpoint's buffer. If you change the size of one endpoint then the starting addresses of other endpoints are affected. I'm not sure if you want to do that in runtime. 

      

  • Hi Charles,
    Thank you Charles.
    Can we conclude like, it is not possible to change the buffer or buffer size dynamically during run time.