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.

TMS320F2800157: SPI Communication Fails at Clock Speeds Above 3 MHz Despite Configuration on Control Card (Master)

Part Number: TMS320F2800157
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Tool/software:

Hello,


I am using the F2800157 controlCARD with a docking station. I'm configuring SPIA for communication with an external STM32 device (slave). The SPI is working, but I am unable to increase the SPI clock beyond 3 MHz.

 

Here’s what I have tried:

- Tried values up to 10 MHz (verified using logic analyzer).

- Verified `DEVICE_SYSCLK_FREQ` is 120 MHz and `LSPCLK` is 60MHZ.

- Clock divider values are calculating properly, but scope output always remains limited to ~3 MHz.

 

I am using the driverlib-based initialization. No DMA, just simple transmit/receive.

 

Questions:

  1. Is there a known limitation for SPI clock rate on F280015x?
  2. Is any additional configuration needed for high-speed SPI?

Attached:

- SysConfig screenshot showing SPI pinmux.

- Scope capture of SPI CLK at 4MHz.
SPI CLOCK is 4MHz

- Source snippet used to configure the SPI module.

 

Any guidance would be appreciated. Thank you!

  • Hi Roshni,

    In your SysConfig screenshot, I see the bit rate (aka SPICLK) is set to 3 MHz. Have you already tried to modify that to 10 MHz and/or other values? What version of SDK/SysConfig are you utilizing? I've tried using C2000WARE 5.04 and SysConfig 1.24.

    Is there a known limitation for SPI clock rate on F280015x?

    The SPICLK needs to equal between LSPCLK/128 to LSPCLK/4, so SPICLK could reach up to 15 MHz for a 120 MHz SYSCLK + 60 MHz LSPCLK system.

    Is any additional configuration needed for high-speed SPI?

    Enabling HS mode in SysConfig as you've done should be it since all SPI pins support HS mode on F280015x.

    Best Regards,

    Aishwarya

  • Hi Aishwarya,
    Thanks for your response. I am using C2000WARE 5.05 and I tried to configure SPI clock up to 15MHZ however it is working only up to 3MHz.Do I need to use C2000Ware 5.04 version to get this working?

  • Roshni,

    Can you bring out LSPCLK out on XCLKOUT and see if LSPCLK frequency is correct and as expected? Same with SYSCLK?

    Are you able to manually write to the registers in CCS registers window?

    If you have another unit, can you try configuring the SPICLK and see what the results are?

    Best Regards,

    Aishwarya

  • Roshni,

    Checking in to see if you have been able to resolve the issue and if you have any other questions

    Best Regards,

    Aishwarya

  • Hi Aishwarya,


    Thanks for checking in, I followed the steps you mentioned earlier but unfortunately nothing worked so far. For my current use case 3Mhz is sufficient so I’ll continue with that for now.
    Appreciate your support!

    Best Regards,

    Roshini.

  • Roshni,

    Let me continue to look into this from my end and get back to you.

    Best Regards,

    Aishwarya

  • Hi Aishwarya,

    Thank you for taking time to look into this.I appreciate your support and will wait for your update.

    Best Regards,

    Roshini

  • Roshni,

    Can you bring out LSPCLK out on XCLKOUT and see if LSPCLK frequency is correct and as expected? Same with SYSCLK?

    Are you able to manually write to the registers in CCS registers window?

    If you have another unit, can you try configuring the SPICLK and see what the results are?

    Can you confirm this in the meantime as well? You mentioned you tried these steps, but if you can provide some more details. I am especially surprised you are not able to write to the LSPCLK registers in CCS register view.

    Best Regards,

    Aishwarya

  • Roshni,

    - Verified `DEVICE_SYSCLK_FREQ` is 120 MHz and `LSPCLK` is 60MHZ.

    When you scope LSPCLK and SYSCLK via XCLKOUT, are you seeing the expected values? The macros may be set up correctly but want to double check the device frequency itself is proper.

    Best Regards,

    Aishwarya