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.

TMS320F28379D: Ring buffer implementation usblib for f2837xd in usbringbuf.c, C2000Ware V3.4

Part Number: TMS320F28379D

Hello,

when calling USBRingBufWrite(tUSBRingBufObject *psUSBRingBuf, const uint8_t *pui8Data, uint32_t ui32Length) with ui32Length > 1, then all Bytes are overwriting one another, as the index remains unchanged in the for loop. This for itself can be corrected easily, but with handling wrap-arounds it gets more sophisticated to resolve ....

Kind regards

Wolfgang Zehetmair

  • Hi ,

    Yes, this is an issue. A defect is already raised for this and it will be fixed in the next release of C200Ware.

    The index has to be incremented during copying. However as per this code , data from the source buffer is always written into same destination buffer cell with index "psUSBRingBuf->ui32WriteIndex", since this index is not being incremented during copying.

    Best Regards

    Siddharth