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?