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.
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.
Yeah! I am using Two interrupts in this code one is for timer0 and other one for SPI data reception. I am giving the highest priority to the Timer Interrupt.
hi,
Some tie before i was doing the same thing using the Microchip IC ,I also face the same kind of problem. i was able solved it through the clck sycronization .Because in my application the the data sycronization is lost after 6-10 literations.
I think it will help ful for you if you check the CLOCK vs DATA syacronization for the reception part
Thanks, Paul
Did I understand you correct that you are saying to check that the slave is configured with the same clock phase as the master, so that it samples the data in the middle of the bits?
Hi! In SPI Master Deciedes the clock of Slave? So I havent Configured Slave clock Do I need to?
You have to tell the slave if it is expected to sample the data on the rising or falling edge of the clock.
If the slave samples on the wrong edge, it is only variances in the delay times for the data and clock signals that MAY let the slave pick up any valid data. But that depends on how much delay times you have in the signal lines compared to the settle times etc.