Asked for help from what I got yesterday.
so i try to spi communication, but it is still not work.
upside picture is idle situation. downside picture is my situation.
i can check every line is well. but clk is have problem. how can i make keep clk until the end of the receive action
int
main(void)
{
tContext sContext;
uint32_t ui32SysClock;
ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
PinoutSet();
Kentec320x240x16_SSD2119Init(ui32SysClock);
GrContextInit(&sContext, &g_sKentec320x240x16_SSD2119);
FrameDraw(&sContext, "Radar Test");
GrContextFontSet(&sContext, g_psFontCm48);
GrStringDrawCentered(&sContext, "using spi", -1,
GrContextDpyWidthGet(&sContext) / 2,
((GrContextDpyHeightGet(&sContext) - 32) / 2) + 24,
0);
GrFlush(&sContext);
uint32_t pui32DataTx[NUM_SSI_DATA];
uint32_t pui32DataRx[NUM_SSI_DATA];
uint32_t ui32Index;
// InitConsole();
SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI2);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
GPIOPinConfigure(GPIO_PD3_SSI2CLK);
GPIOPinConfigure(GPIO_PD2_SSI2FSS);
GPIOPinConfigure(GPIO_PD1_SSI2XDAT0);
GPIOPinConfigure(GPIO_PD0_SSI2XDAT1);
GPIOPinTypeSSI(GPIO_PORTD_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 |
GPIO_PIN_3);
SSIConfigSetExpClk(SSI2_BASE, ui32SysClock/14, SSI_FRF_MOTO_MODE_0,
SSI_MODE_MASTER, 1000000, 16);
SSIEnable(SSI2_BASE);
while(SSIDataGetNonBlocking(SSI2_BASE, &pui32DataRx[0]))
{
}
pui32DataTx[0] = 0x0103;
pui32DataTx[1] = 0x0101;
//pui32DataTx[2] = 0x0000;
//pui32DataTx[3] = 0x0000;
for(ui32Index = 0; ui32Index < NUM_SSI_DATA; ui32Index++)
{
SSIDataPut(SSI2_BASE, pui32DataTx[ui32Index]);
}
while(SSIBusy(SSI2_BASE))
{
}
for(ui32Index = 0; ui32Index < NUM_SSI_DATA; ui32Index++)
{
SSIDataGet(SSI2_BASE, &pui32DataRx[ui32Index]);
}
while(1){
}
}
