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.

SPI Loop Back

Other Parts Discussed in Thread: TM4C123GH6PM

Hello All,

I am working on spi master program given in the C:\ti\TivaWare_C_Series-2.1.0.12573\examples\peripherals\ssi\spi_master.c. 

Here i am not getting any data in the SSI_DR_DATA register, and this code i tried with  

SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ) and

SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ)

Really dont know what is causing problem. can any one please help me out in solving this issue.

I am using (tm4c123gh6pm )Tiva c series Launch Pad. 

Regards,

Mamatha

  • Hi,
    Now it is working..

    Regards,
    Mamatha
  • mamatha m said:
    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
    SYSCTL_XTAL_16MHZ) and

     This line try drive cpu @PLL frequency, PLL run @200MHz so overclocking cpu is not a sane principle, remove this line from your code and never use it due it fail/can fail next line.

    mamatha m said:

    SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ)

     This line drive CPU @50MHz, divisor set to 4 then PLL/4

     you can also use SYSCTL_SYSDIV_2_5 for 80Mhz but not more SYSCTL_SYSDIV_2 result in overclock @100MHz, other value are possible till resulting frequency feed to CCPUis less than 80MHz.

  • And - would it not be far simpler to employ "blinky or blinky-like" basic program - to confirm that the MCU can be, "Up and Running?"

    Starting with the "loopback" of an advanced peripheral is a severe violation of KISS - most always fails - and deservedly so...
  • cb1_mobile said:
    Starting with the "loopback" of an advanced peripheral is a severe violation of KISS - most always fails - and deservedly so...

     And take more attention to lines of code appearing as not so different too...

     Opps

     First line selected oscillator clock so it was ok.

     Also others got catch by a similar issue, when all question appear to be same then you reduce attention to what happen and also my time arrived too fail getting more attention to.