Hi,
I m using LM4F232 Evaluation kit and configuring it for SSI (Freescale SPI)(D[3:0] pins). I have written the following C code for configuration as per datasheet, and I m not getting appropriate signals at SSI1Clk and SSI1Fss.
Please can any body suggest me the changes to be made or anything to be added.
SYSCTL_RCGCSSI_R = SYSCTL_RCGCSSI_R1;
SYSCTL_RCGCGPIO_R = SYSCTL_RCGCGPIO_R3;
GPIO_PORTD_AFSEL_R = 0x0F;
GPIO_PORTD_PCTL_R = 0x00002222; // Configure PD[3:0] for SSI1
SSI1_CR1_R = 0x00000000;
SSI1_CC_R = SSI_CC_CS_PIOSC; // SSI PIOSC clock source 16MHz
// SSIClk = SysClk / (CPSDVSR * (1 + SCR)) for 2MHz
SSI1_CR1_R = 0x00000000; //Master mode, Clear SSE
SSI1_CPSR_R = 0x00000002; //CPSDVSR=2
SSI1_CR0_R = 0x000003C7; // SCR is 3, C is SPI CH and CHP, F is 16bit data
SSI1_CR1_R = SSI_CR1_LBM; // Loopback test
SSI1_CR1_R |= SSI_CR1_SSE; // SSI operation is enabled.