TI E2E Community
SPI Example Drops Last Rx Byte
I've been porting the spi non-edma example from the C6748 EVM to the C6747 EVM. The version is C6748_StarterWare_1_20_03_03. Sometimes the last byte is not received. For example if I request 260 bytes, the code stop receiving after 259 bytes. With the Debug configuration, the problem seldom occurred. With the Release configuration, the problem almost alway occurred. The problem occurs when the the Rx interrupt occurs before the Tx interrupt for a particular byte. The code assumes that Tx always occurs before Rx. A shared counter causes the Rx IRQ to be disabled early. The fix is to use separate counters. All this appears to have been fixed in LCDK version.
examples\evmC6748\spi\spiflash.c <-- BAD, brokenexamples\lcdkC6748\spi\spi.c <-- GOOD, fixed
Make me wonder what else has been fixed in LCDK but left broken on the EVM version.
Thanks for pointing the issue. The issue is reproducible.
We shall provide the fix in the next release.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.