Page 1 of 1

Monitoring Bus States

Posted: Thu 25. Feb 2016, 20:12
by sstrong
Hello Everyone.

I have an application in which my pcan router pro is keeping sensors alive on CAN2,CAN3, and CAN4 alive by sending cyclic messages to them. It is possible for these sensors to fail for various reasons. I would like to be able to monitor the bus states and report any BUS-OFF states to CAN1. I do not see any functions for monitoring this but perhaps I can read a register somewhere.

Thanks,
Steve

Re: Monitoring Bus States

Posted: Mon 29. Feb 2016, 12:58
by P.Steil
hi,

you can read e.g. C1GSR register and test for bit 7. If set, the CAN controller is Bus-OFF. Use CnGSR (n=1..4) for
each CAN bus.

Regards
Philipp