SPI communication between two controller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI communication between two controller

1,173 Views
dasar_pavanraju
Contributor I

Hi All,

Using 2 MM9z1_638 controller for SPI master and SPI slave.

In datasheet it mentioned as when it configured as Master---->Clock should be bus clock/2

                                               when it configured as Slave---->Clock should be bus clock/4

So i decided to keep bus clock /4;

I am using bus clock as 28Mhz.

am using SPI to ensure both controllers are running on same time.

Initially mater will send character 'R'.Slave will reply with 'R'.

Then both will start executing there code.

To verify sync,I enabled 500ms timer. Every 500ms tone counter will increment both sided.

For every one sec master will ask counter value of slave and also stores its count value.If both counter are same then both are in sync.

But problem is 

in master = 2,4,6,8,...

from  slave =0,0,2,4

Initially two bytes getting 0.

Then i decided to send some dummy data from slave to master whenever interrupt hits.In this condition am getting proper value.

also i checked both are running on same speed.

Please let me know the problem.

Thanks,

Pavan

Tags (2)
1 Reply

878 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Pavan,

Please see my comments here:

https://community.nxp.com/thread/491560 

Thanks,

Daniel