Monitoring Bus States

4-Channel CAN Router with Data Logger
Post Reply
sstrong
Posts: 1
Joined: Thu 25. Feb 2016, 20:01

Monitoring Bus States

Post by sstrong » Thu 25. Feb 2016, 20:12

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

User avatar
P.Steil
Hardware Development
Hardware Development
Posts: 32
Joined: Fri 14. Jan 2011, 10:27

Re: Monitoring Bus States

Post by P.Steil » Mon 29. Feb 2016, 12:58

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
--------------------------------------------
PEAK-System HW development Team
support@peak-system.com
phone: +49-6151-8173-20
fax: +49-6151-8173-29
--------------------------------------------

Post Reply