Hello experts:
As the experience on MPC5746R, if no CAN node(such as CANoe) is connected the CAN port, an ACKERR (=1) can be read from the ErrorStatus Register.
But it seems doesn't work on MPC5642, as below:
ESR register value is 0x512, the ACKERR bit is still 0. and ECR register value is 0x8700(RXECNT = 0x87)
The debugger is P&E multiLink universal , not MultiLink FX, is this the reason only general registers (r0~r12 PC etc) can be read from the debugger register window?
I can only read the FlexCAN registers via Memory window.
thanks and BR
Zhou YiChuan
解決済! 解決策の投稿を見る。
Hi,
please refer to my feedback at https://community.nxp.com/t5/MPC5xxx/Read-bus-off-state-of-MPC5642-from-ESR-FLTCONF-after-CAN-H-and/...
BR, Petr
Hi,
so you have MPC5642A disconnected from the CAN bus and sent a message. ACK is set during message transmission and also TX error counter should increase.
Read ESR within code into variable, The CPU read action clears bits16–21.
There should be an option to display EmbSysView register window. In debuger press ALT+SHIFT+Q, then Q and search for EmbSysView.
BR, Petr
Hi, Petr:
Yes, to test ACKERR , MPC5642A is disconnected from CAN bus.
The code was changed like below to check the ACKERR: The SW never runs to the line with brown color .
if(0x1 == CAN_A.ESR.B.ACKERR)
{
CanA_AckError = 0x1; //SW never run to this line
}
EmbSys Registers view is opened, there is still no FlexCAN registers .
From memory view , the ACKERR bit is still 0 because ESR value is 0x512.
thanks and BR
Zhou YiChuan
Hi,
as written in your "bus off" thread....could you please share project you have, so I can check it.
Also share measurement of TX/RX/bus lines on MCU running given code.
BR, Petr
Hi,
please refer to my feedback at https://community.nxp.com/t5/MPC5xxx/Read-bus-off-state-of-MPC5642-from-ESR-FLTCONF-after-CAN-H-and/...
BR, Petr