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.

TMS320F28069: SCI and SPI not working together

Part Number: TMS320F28069


Tool/software:

Hello TI Team,

I am using TMS320F280069M for  development .

I used  SCI and SPI for communication. SCI is used to send data to other device .SPI used for Data logging in Sd card.

SCI and SPI Communication is working fine individual.

SCI and SPI communication not working together, I got garbage data on SCI TX Pin. SPI working fine at that time.

How to debug this issue ?

Thanks In Advance 

Nitish 

  • Hi Nitish,

    Could you perhaps elaborate on:

    SCI and SPI communication not working together,

    What is the context of the application? How are you using SCI and SPI communication together? I will need to understand a bit more of what you are trying to do before I can provide suggestions. If they are working individually, that's great; this indicates you likely don't have specific issues with the SPI or SCI configurations alone- I'd like to know what you are altering when you use them together.

    Best Regards,

    Allison

  • Hi Allison,

    We’ve been working on developing an application called “X.” In this application, we use SPI to log data onto an SD Card using the FAT file system.

    During testing, we encountered an issue. When we enable both SPI logging and UART (with a baud rate of 9600) to log data onto the SD Card and send commands to an external device, we noticed that the external device only accepts half of the transmitted bytes (Example: Tx 8 bytes Rx 4 byte, Tx 10 Bytes Rx 5 Bytes etc).

    To troubleshoot this issue, we temporarily disabled SPI logging. Surprisingly, the external device was then able to receive the entire set of bytes correctly.

    Further investigation led us to check the UART signal using a logic analyzer. We discovered that the UART baud rate doubled from 9600 to 19200 when both SPI and UART were enabled. Strangely, the register value remained the same as the one we had set for the UART baud rate.

    Any insights or suggestions would be greatly appreciated.

    Thanks,

    Nitish Sharma

  • Hi Nitish,

    Thank you for the response. Can I ask what clock settings are you using for SPI and UART? What are the LSPCLK settings/dividers and what are your SPI and SCI clock dividers set to?

    Just to clarify, when you talk about an external device, you are referring to a non-C2000 device, right? Are you saying that the C2000 is sending full data (and you see this on the scope/analyzer), but the other device is only receiving half of the data? This half data is only happening with UART, right (but happens only when you use SPI at the same time as UART)? 

    Best Regards,

    Allison

  • Hi Allison,

    Thanks for your support. we fixed this Issue. i was because of FLASH waitstate, we just configure the Flash control register.

    Thanks

    Nitish Sharma