Content originally posted in LPCWare by Coralicious on Thu Mar 14 10:58:01 MST 2013
Hi! I'm using lpc1113/301 for a master-slave communication. Now I'm using as a slave, and I know that Master is sending 3 bytes (0x55, 0xff, 0xff) to me. I can receive them only by setting DSS data to 16-bit (LPC_SSP1->CR0 = 0x070f) but I should receive them also by setting DSS data to 8-bit, so I could send my answer to the master at the same time I receive it's second byte.
The problem is, if I do set DSS data to 8-bit, in my buffer I just receive 0x55, 0x55, 0x55 (the first byte the master sends to me).
When I look to my oscilloscope, I can see on MOSI the 3 data bytes, but in my LED, which I programmed with a toggle to see when does the SSP1_IRQHandler starts, I see that it works each 2 frames of data (each time I've recived the 3 bytes for twice).
What can I do to solve this, so receive 1 byte of data and answer 1 byte just after this?
Sorry for my english :(