Part Number: 66AK2H14
Hello, I'm trying to develop a simple, baremetal SPI example program using the 66AKH14 processor. The trouble I am seeing is the data is not correct and the clock has non-uniform pulse widths.
The SPI clock should be 6Mhz and for 16-bit data the total time should be about 2.7us and it but the pulse widths are not the same. I'm expecting the same pulse width, am I correct? Also, the first word I am sending out is 0xA but I don't see that on the MOSI pin.
Any ideas what I may be doing wrong?
Here is my code:
I'm running the code on DSP Core 0 and using SPI Channel 0.
Thank you very much,
I decreased the frequency of the SPI clock to 1Mhz and the clock is looking much better. Now I need to figure out why the data is not looking correct.
Here is what I'm transmitting:
Here is what the SPI signals look:
I'm doing 5 SPI writes and that is what the scope shows. The data on the MOSI does not look like what is in the TXBUF. So I'm looking into that problem.
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 joe306:
From the memory browser of CCS, could you dump the SPI register values and share them? Thanks, Yordan
Please make sure you read the forum guidelines first.
In reply to Yordan Kovachev:
Hello, thanks for helping me solve this SPI data problem. Here is a screen shot of the SPI registers:
Here is the Memory Save text file starting at the 0x0082BD80.
Hello, I changed the SPI Data width to 8 instead of 16 and I also modified my SPI_SendReceiver() to send the data in the txBuff array. I was sending over a count. Also my Salea Logic analyzer was not setup right. With those changes I got things working.
Here is my txBuf data:
Thank you everyone for helping me along the way.
I'm interfacing with a Cypress PSOC5 microcontroller to the 66AK2H14 processor. Now I need to get the PSOC to send back the correct data.
Thanks for updating the thread.
Best Regards, Yordan
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. 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.