Helo every one,
I am using S12MSCANV2 protocol for my application. I have a doubt
regarding the Bus-off condition.
As we all know, When the node goes to the busoff state, it is not
allowed to take part in the communication untill recovery to the
normal sate.
Usually, I enable my Trasmit interrupt for every 10ms,by checking
my node status like the below shown sample code and I initialize my
CAN controller when ever my node enters in to busoff sate in my
Busoff ISR (i.e CAN error interrupt ISR).
Every thing works fine for this routine i.e. My node can receive
and transmit messages after recovery from busoff state.
if(Timer > 10ms) _CANerrorISR()
{ {
if(NodeStatus != Busoff/Overrun) if(CAN0RFLG_TSTAT == 3)
{ {
Enable CAN Tx interrupt; NodeStatus = busoff;
} DisableInterrupts;
InitializeMyCAN();
else EnableInterrupts;
{ }
; /* do nothing */ }
}
}
I tried something different, i.e. I enable my Transmit interrupt
for every 10ms irrespective of the Node status like below. i.e my
node tries to transmit its Tx messages even during the busoff state.
if(Timer > 10ms)
{
Enable CAN Tx interrupt;
}
Now, I created the bus-off condition (using CANstressDR tool).
But,after recovery from the bus-off, my node can not receive any
messages from the other node or the network.
I wonder which condition is making my node not able to receive any
messages on the network
Can anyone tell me the reason for this..? It would be greatly
helpfull to me.
thanks & regards
Kasu

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )