Other Parts Discussed in Thread: EK-TM4C1294XL
Dear Sirs
I'm using the EK-TM4C1294XL as a master unit to communicate with a embedded pressure sensor that I'm developing. To get started, I'm using the example project spi_master. The EK-TM4C1294XL has a 25MHz crystal. The system clock is set as follows using the TIVAWare peripheral driver library; ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_OSC), 25000000); The SOI clock is set as follows; SSIConfigSetExpClk(SSI0_BASE, ui32SysClock, SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, 1000000, 8); When I run the program in the debugger and look at the SSI_CR0 and SSI_CPSR registers, the following are their values; SSI_CR0 = 0x00000B07 and SSI_CPSR = 00000002. According to the equation, this equates to 1.042MHZ. However, when I look at the clock with the scope, I see a 675.7MHz clock. To get a 1MHZ clock, I have to set the SSI_CR0 = 0x00000707. This SSI_CR0 value equates to 1.56MHZ. I read a similar post of this issue for a different uC. He had a 40MHZ system clock and was trying to get a 16MHZ SPI clock. I can see this was not going to work out. However, in my configuration, it seems to me that I should get the frequency as calculated. Could you please shed some light on this issue? Thank you.