Other Parts Discussed in Thread: C2000WARE
Tool/software: Code Composer Studio
Hi,
i am using SPI communication between two F28377S. and when i was sending just one package 16bit data , there was not any problem.
BUT i am sending 16 bit,4 package from one mcu to another one as below:
for(Sdata_Buff=0;Sdata_Buff<4;Sdata_Buff++)
{
SpiaRegs.SPITXBUF = sdata[Sdata_Buff];
}
and reading from another one as below:
for(Rdata_Buff=0;Rdata_Buff<4;Rdata_Buff++)
{
rdata[Rdata_Buff]=SpiaRegs.SPIRXBUF;
}
So i have taken this from examples which is "spi_loopback_interrupts_cpu1".
but my problem is sequence of this data.for example the datas are send by mcu one as:
sdata[0]=10;
sdata[1]=11;
sdata[2]=12;
sdata[3]=13;
the second one reads the as
rdata[0]=13;
rdata[1]=11;
rdata[2]=12;
rdata[3]=10;
or
rdata[0]=11;
rdata[1]=10;
rdata[2]=12;
rdata[3]=13;
or
...
i mean the sequence of reading is not same as sending sequence...
what sould i do for taking datas as correct sequence?
thank you for your helps..