page 43
Function
CAN_ERRORHANDLER
Library CRxxxx.LIB
Function symbol
Purpose
Minimum error routine to monitor CAN.
Parameters
Function inputs
Function outputs
Description
CAN_ERRORCOUNT evaluates all possible CAN errors and
totals the number of the errors in the counter ERRORCOUNT.
In the case of a bus-off error the function tries to return the
participant to the bus. To do so, the function CAN_RESTART is
integrated.
The programmer's job is to locate the precise error cause by
evaluating the error counter and the error bits supplied by the
system. Via the function input RESET the counter can then be
set to 0 again.
In each application software where the CAN communication is
utilized (also for the communication with a CAN display) at
least this function should be employed and processed
cyclically.
Name Data type Description
RESET BOOL Deletes the error counter.
Name Data type Description
ERROR-
COUNT
WORD Error counter, contains the number of the
errors occurred.