Daniel White

In-System CAN error measurement

Discussion created by Daniel White on Mar 2, 2007
Latest reply on Mar 3, 2007 by Alban Rampon
MC9S12XDT256
 
I need to measure CAN bus errors (CRC, bit, form, stuff) after my system is installed to verify network integrity.
 
I thought this we be as simple as monitoring the error counter or adding an rx error ISR but now it looks impossible. The docs say I can't read the error counter except in sleep or init modes and the only error interrupt is the status change which will only occur after the error counter goes to 96. Since the error counter decrements with each correct message, this is useless to measure small bit error rates.
 
Can anyone suggest how to measure CAN errors in my application?

Outcomes