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.

TMS320F28379D: SPI clock is not coming as expected

Part Number: TMS320F28379D
Other Parts Discussed in Thread: LAUNCHXL-F28379D, , C2000WARE

I am using C2000Tm LAUNCHXL-F28379D LaunchPadTm evaluation board. I am trying to configure the SPI A clock for 1 Mhz baud rate (loop back disabled). but when observed on oscilloscope the SPI clock is coming ~ 50 Hz. Following are the Sysclock, LSPCLK and SPI BRR settings:

Sysclock: 200 Mhz (SYSCTL_IMULT: 40, SYSCTL_SYSDIV:2, Clock source: External Oscillator (10Mhz))

LSPCLK: 50 MHz (LOSPCP: LSPCLKDIV = 2)

SPI BRR: 1 MHz (SPIBRR: 49)

the clock to SPI device is enabled (PCLKCR8: 7)

the GPIO MUX settings are done to select SPI High speed configuration. 

to test the SPI clock , I am writing some dummy value to SPI TX BUF in an infinite loop. I am tapping SPICLKA (J1-7) on TMS320F28379D LaunchPad XL evaluation board. the clock observed on oscilloscope is coming as ~ 50 Hz. 

once i changed the sysclock to 100 Mhz and then again i set it back to 200 Mhz, after that the SPI clock was coming at 1 Mhz. but after some power cycles it again started coming as ~50 Hz. 

what could be issue with the SPI clock setup. please suggest.

  • Hi Manish,

    You have all of the right settings. Are you working based on an example in C2000Ware??  What version are you using? Some of our examples require a "_LAUNCHXL_F28379D" predefine in order to setup the clocking properly. 

    Would it also be possible to check the register values in the Watch Expressions Window within CCS to ensure BRR is set correctly and that the PLL is getting configured as you describe. 

    Best Regards,

    Marlyn

  • Thank you Marlyn for your response.

    The issue got resolved, suddenly the clock started coming as expected without doing any updates to code or hardware settings. I just tried switching to other frequencies and then retried with 1 MHz. It started working.