Hi,
I have configured EcanA MailBox31 for receiving multiple ID's. I have taken care of AME bit, LAM Registers for fully acceptances of messages irrespective of ID .
Baud rate is set to 1Mb/s..
The issue is that , I am able to receive all IDs.
But when reading one ID data, the mailbox 31 is overwritten by new ID and New data.
I have enabled CANOPC bit and mailbox 30 also enabled for receiving purpose, still the same issue persists.
receive function is called in while loop. 10 IDs are coming with each frequency @10ms . when reading out one ID , ecan Mailboxes are being updated with new one.
At some unperiodic time intervals , the variable test is incrementing
void Receive_eCAN_A()
{
ECanaShadow.CANRMP.all=ECanaRegs.CANRMP.all;
if(ECanaShadow.CANRMP.bit.RMP31==1)
{
ECanaShadow.CANRMP.all=0;
ECanaShadow.CANRMP.bit.RMP31=1;
ECanaRegs.CANRMP.all=ECanaShadow.CANRMP.all;
RecvID = ECanaMboxes.MBOX31.MSGID.bit.STDMSGID;
if(RecvID!=ECanaMboxes.MBOX31.MSGID.bit.STDMSGID)
test++;
In the above code , same issue persists even if timer interrupts are disabled .
with in one instruction execution , the can mailboxe data is changing!!!
Thanks in Advance