Part Number: TMS320C6748
In my system, I use a MCU to communicate with C6748 throught SPI bus. The MCU is SPI Master, and the C6748 is SPI Slave.
The SPI_CLK is 10MHz, POLARITY = 0 and PHASE = 1.
I use C6748 EDMA to drive the SPI SOMI output.
For test, I let the C6748 to output 0xF1F2F3F4F5F6F7
For SPI_CLK= 4MHz, the read data is always right, which is 0xF1F2F3F4F5F6F7.
For SPI_CLK=10MHz, the read data is sometimes right, but sometimes wrong.
The wrong data is:
At first, I thought maybe the POLARITY and PHASE maybe wrong at the two end. But I've checked that they are alright.
And if the POLARITY and PHASE is wrong, the result should be one bit shift.
But you can see that, the wrong bit always happens to be the 1st bit of a whole byte!
The waveform tells the truth:
This is a waveform between 0xF3 and 0xF4, there is a negtive pulse between the two bytes.
I think this is why my readata is wrong.
Question: Why there is a negtive pulse between the two bytes?
Please make sure you read the forum guidelines first.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Yordan Kovachev:
Thank you very much for reply.
Here is the SPI0 registers:
In reply to FrankXu:
Hi Yordan Kovachev, Thank you very much. I've tried the SPI_LoopbackExample_lcdkOMAPL138_c674xExampleProjec. If I comment the line "SPI_control(hwHandle,SPI_V0_CMD_LOOPBACK,(void *) &loop);" which means do not use the interl loop test mode,
and change the "TEST_SPI_PORT" to "1", I can see the SPI_CLK waveform on the SPI1_CLK pin. But if the "TEST_SPI_PORT" is "0", the SPI_CLK waveform is always high on the SPI0_CLK pin. Nothing esle changed on the code. I've taken a lot time looking through the example code, but havn't find the cause of the problem.
Why the code does not work for SPI0? Could you please help.
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.