I am working on a project that counts total CAN bus error frames, as well as monitor bus load in real time using a Teensy4.0
How can I access the values in the CAN Rx Error registers? I found them in the iMXRT manual, I am just not sure how to read them.
My plan was to continuously check the value of the error counter in a loop, and if it was greater than the last loop, it would add the difference. Unless somebody knows of a better way.
As far as bus load, assuming all 29bit IDs, would it be as simple as counting the (number of messages in a second x 29) / bit rate ?
The data points don't need to produce absolutely perfect results, It is just going to be used to detect when bus conditions are less ideal than average.
Any input would be greatly appreciated!
How can I access the values in the CAN Rx Error registers? I found them in the iMXRT manual, I am just not sure how to read them.
My plan was to continuously check the value of the error counter in a loop, and if it was greater than the last loop, it would add the difference. Unless somebody knows of a better way.
As far as bus load, assuming all 29bit IDs, would it be as simple as counting the (number of messages in a second x 29) / bit rate ?
The data points don't need to produce absolutely perfect results, It is just going to be used to detect when bus conditions are less ideal than average.
Any input would be greatly appreciated!