CAN BUS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAN BUS

606 Views
wutengyouxi555
Contributor II

wutengyouxi555_0-1708768900958.png

This function is canerr callback function from s32k144 SDK 4.0.2 

How CAN I know what kind of err has happened on the CAN bus from this Function.

0 Kudos
Reply
3 Replies

581 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

calling FLEXCAN_DRV_GetErrorStatus (reading ESR1) you clears status error bits. So read it into some status variable and mask/check as needed. You can refer to https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-FlexCAN-TX-RX-Error-ISR-test-S32DS2...

BR, Petr 

569 Views
wutengyouxi555
Contributor II
Thinks your help. One more question,if a CRC err occurs , could i know which message is this error coming from ?
0 Kudos
Reply

557 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

no, you have no such info about faulty message. Module does not store received CRC and moreover if error is detected a message is not moved-in into given MB. Just error free messages are stored, but without CRC info.

BR, Petr

0 Kudos
Reply