mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 10:50:20 +08:00
bsps/shared/dev/can/ctucanfd/ctucanfd.c: Mark error counters valid
The Error Active frame populates the TX and RX error counter bytes but does not set CAN_ERR_ID_CNT. Set CAN_ERR_ID_CNT so consumers know the counter fields are valid.
This commit is contained in:
@@ -933,7 +933,7 @@ static void ctucanfd_err_interrupt( struct rtems_can_chip *chip, uint32_t isr )
|
||||
err_frame.data[ CAN_ERR_DATA_BYTE_CNT_RX ] = rxerr;
|
||||
break;
|
||||
case CAN_STATE_ERROR_ACTIVE:
|
||||
err_frame.header.can_id = CAN_ERR_ID_CRTL;
|
||||
err_frame.header.can_id = CAN_ERR_ID_CRTL | CAN_ERR_ID_CNT;
|
||||
err_frame.header.flags = CAN_FRAME_ERR;
|
||||
err_frame.data[ CAN_ERR_DATA_BYTE_TRX_CTRL ] = CAN_ERR_CRTL_ACTIVE;
|
||||
err_frame.data[ CAN_ERR_DATA_BYTE_CNT_TX ] = txerr;
|
||||
|
||||
Reference in New Issue
Block a user