AnsweredAssumed Answered

Sync between two contrller

Question asked by raju d on Dec 17, 2018
Latest reply on Jan 2, 2019 by Daniel Martynek

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

Outcomes