 | Discussion Forum |  |
|
|
i m not getting sck clock from lpc2378 fpr spiNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author ganesh badgujar Posted 8-Jan-2009 05:48 GMT Toolset ARM |  i m not getting sck clock from lpc2378 fpr spi ganesh badgujar 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();
}
| | Read-Only Author Nathan Duffy Posted 8-Jan-2009 15:42 GMT Toolset ARM |  RE: i m not getting sck clock from lpc2378 fpr spi Nathan Duffy I don't have the data sheet for your processor in front of me, but S0SPCCR is clock control register? S0SPCR is control register? Where do you write to the data register? You're not going to get clock pulses if you are not writing data. ND | | Read-Only Author ganesh badgujar Posted 9-Jan-2009 06:52 GMT Toolset ARM |  RE: i m not getting sck clock from lpc2378 fpr spi ganesh badgujar yes S0SPCCR is clock control register i use SOSPDR to WRITE the data then also I am not going to get clock pulses i given 12mz to procesor and that to the peripheral iinitialise all register as per above code but no sck getting . | | Read-Only Author D. S. Posted 8-Jan-2009 17:40 GMT Toolset ARM |  RE: i m not getting sck clock from lpc2378 fpr spi D. S. Hi! Are you sure, that you've enabled the SPI-Interface?? (PCONP-Register @ p.53 in Manual) | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|