Hi all
I've been debugging usb on F2837xD and found a bug in the sources in usbdriverlib.c
It's in file "..\C2000Ware_2_00_00_03\libraries\communications\usb\f2837xd\source\usbringbuf.c" in function "void USBRingBufWrite()" (defined on line №679).
The problem part:
// // Write the data into the ring buffer. // for(ui32Temp = 0; ui32Temp < ui32Length; ui32Temp++) { // // Write the data byte. // psUSBRingBuf->pui8Buf[psUSBRingBuf->ui32WriteIndex] = pui8Data[ui32Temp]; } // // Increment the write index. // // // Update the variable value. // psUSBRingBuf->ui32WriteIndex += ui32Length;
According to 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.
But i've also mentioned that in old version of this lib in Control Suite the copying is made by calling "USBRingBufWriteOne()" function inside "for(;;)" loop, so the old lib is working ok in this part.
Is there any updates on this part?