how i should configure spi at45db161
tell me some basic idea how to read and write thank you
The instructions for posting source code are very clear and easy to follow:
www.danlhenry.com/.../keil_code.png
If you can miss something so obvious as that, and not even notice the problem in the Preview or in the actual post - and do it twice - then it is very likely that you have missed important details in the NXP documentation.
Go back to the NXP documentation and study it thoroughly...
thank you sir,
actulally i m not getting sck clock from the processor, i checked that pin on CRO . in lpc user manual they given that in master mode clock counter value is even and equal to 8 or greater than this. i initialised tthat value also but then also i m not getting sck on that pin. whenever i get clock then i will go ahead. 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; ** how much value i should enter i tried so many freqvency above 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(); }
thank u
actulally i m not getting sck clock from the processor, i checked that pin on CRO . in lpc user manual they given that in master mode clock counter value is even and equal to 8 or greater than this. i initialised tthat value also but then also i m not getting sck on that pin. whenever i get clock then i will go ahead. this is my code .. < pre> 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();
} .