respected sir this is my code
int main (void) { SYS_TargetResetInit(); PCONP |= (1 << 8); /* by default, it's enabled already, for safety reason */ PINSEL0 |= 0xC0000000; PINSEL1 |= 0x0000003C; S0SPCCR = 0x8; S0SPCR = 0x000; }
void SYS_TargetResetInit(void) { SCS |= 0x20; /* Enable main OSC */ while( !(SCS & 0x40) ); /* Wait until main OSC is usable */ CLKSRCSEL = 0x1; /* select main OSC, 12MHz, as the PLL clock source */ PCLKSEL0 = 0x55555555; /* PCLK is the same as CCLK */ PCLKSEL1 = 0x55555555; SYS_GPIOResetInit(); }
Hi!
Are you sure, that you've enabled the SPI-Interface?? (PCONP-Register @ p.53 in Manual)