1.11.3.13 CANx_ErrorCountGet Function
The prototype of CANx_ErrorCountGet() varies based on device family. Refer to the generated header file for the actual prototype to be used.
C
void CANx_ErrorCountGet(uint8_t *txErrorCount, uint8_t *rxErrorCount) // x - Instance of the CAN peripheral void CANx_ErrorCountGet(uint16_t *txErrorCount, uint8_t *rxErrorCount) // x - Instance of the CAN peripheral
Summary
Returns the transmit and receive error count during transfer.
Description
This routine returns the transmit and receive error count during transfer.
Precondition
CANx_Initialize must have been called for the associated CAN instance.
Parameters
Param | Description |
---|---|
txErrorCount | Transmit Error Count to be received |
rxErrorCount | Receive Error Count to be received |
Returns
None.
Example
uint8_t txErrorCnt, rxErrorCnt; CAN0_ErrorCountGet(&txErrorCnt, &rxErrorCnt);
uint16_t txErrorCount; uint8_t rxErrorCount; CAN0_ErrorCountGet(&txErrorCount, &rxErrorCount);
Remarks
None.