This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPI communication problem

Hi!
I am trying to communicate two LPC2214 using SPI, For this I am making One LPC 2214 Master and Transmitting Data using SPI1 and the other LPC is Slave and reciving data using SPI0 Port. Initially for few seconds I am reciving correct data but then data starts corrupting, Why? If I use same SPI port at Both end It is working fine. I have initialized both SPI as said in the data sheet for Master Slave communication. Please Help me! I am in deep trouble now I have almost finalised my hardware and kept these two port free for communication.

Parents
  • Have you checked if your corrupted data is a single bit off or a single byte off?

    If you have noise on the clock line, the slave may tick too few or many steps in the data transfer. Because of this, it is important that you make sure that your solution has a way of synchronize in case they get out of sync. You may use the slave select to reset the slave or you may add magic patterns in the data to let the software detect any bit shifts.

    Another thing to care about is interrupt response times. Have you made sure that the slave is fast enough responding to any interrupts, since it has no way of controlling the speed of the transfer. If it fails to pick up received data fast enough, you will get an overrun.

Reply
  • Have you checked if your corrupted data is a single bit off or a single byte off?

    If you have noise on the clock line, the slave may tick too few or many steps in the data transfer. Because of this, it is important that you make sure that your solution has a way of synchronize in case they get out of sync. You may use the slave select to reset the slave or you may add magic patterns in the data to let the software detect any bit shifts.

    Another thing to care about is interrupt response times. Have you made sure that the slave is fast enough responding to any interrupts, since it has no way of controlling the speed of the transfer. If it fails to pick up received data fast enough, you will get an overrun.

Children