1.3.3.13 1.9.3.13 1.10.3.12 1.11.3.13 1.12.3.13 1.18.2.12 1.21.2.12 1.22.3.12 1.23.3.12 1.24.3.12 1.24.4.13 1.25.3.13 1.29.3.13 1.32.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.