Part Number: TMS320F28379D
Tool/software:
I am looking into CAN bus error handling and I am wondering what the reason is for using the following when checking for CAN bus errors?
if(((status & ~(CAN_STATUS_TXOK | CAN_STATUS_RXOK)) != 7) &&
((status & ~(CAN_STATUS_TXOK | CAN_STATUS_RXOK)) != 0))
instead of
if(((status & CAN_STATUS_LEC_MSK) != CAN_STATUS_LEC_MSK) &&
((status & CAN_STATUS_LEC_MSK) != CAN_STATUS_LEC_NONE))
It seems that it is assumed that the other error bits are not considered in the check. Are bits 5-8 not used?