Hi all,
I'm currently working with the SSP0 peripheral on a LPC1857 and a LPC1837. On both chips, I've not been able to get the MISO line to read anything besides a high value (255) no matter what is written to the line. I am able to read the correct values however when the loopback is enabled or when I use the SSP1 peripheral. I've tried getting the receive data through the DMA peripheral as well with similar results. As far as I can tell, the receive FIFO is only ever receiving a value of 255. Here are a few things I've tried:
- Examining the SSP0 CR0 register to see if it is set up correctly
- Examining the SCU configuration register for the MISO pin to make sure it is on the correct function
- Switching the MISO pin to multiple different pins using the SCU
All the other lines (MOSI, CLK, SS) work as expected.
I have attached an example program I have written to demonstrate the misbehavior, the program simply sends 1 byte with value 100 over SPI and reads 1 byte. If you tie the MISO and MOSI lines together, one would expect a byte of 100 to be read. However, this only works with SSP1; SSP0 shows that the value 255 has been read. If you enable the loopback on SSP0 however, it works as expected and you read a value of 100.
Any help would be appreciated, thanks!