We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I had code to configure the LPC 2378 as an SPI slave that appeared to be working, but now no longer does. Now, when I read the S0SPDR register, I always get 0xFFFF
PCONP |= 0x00000100; PINSEL0 &= ~0xC0000000; PINSEL1 &= ~0x0000003F; PINSEL0 |= 0xC0000000; PINSEL1 |= 0x0000003F; S0SPCR = 0x0004; //SLAVE mode; 16 bit transfers; MSB first; SPI Mode 0 while (1) { status = (S0SPSR & 0x0080); if (status) { data = S0SPDR;
"data" above always returns 0xFFFF. I looked at the SPI lines on a scope and they look correct. I read the SPTSR register and it shows no errors. I ran the same code on an LPC2478 development board with the same results
Thanks in advance, Bill F
or maybe your peripheral expects the LSB first, rahter than the MSB...?