S32G3 FlexCAN loop-back mode issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32G3 FlexCAN loop-back mode issue

跳至解决方案
653 次查看
ghs_khuang
Contributor I

We are not using Linux, but our own RTOS. We created a FlexCan driver test and it's been fine on boards like S32R45, S32G2. But I recently found S32G3 unhappy with it. The pseudo code is like below:

// loop-back off. MCR is 0x5921203f when this is executed (freeze mode)
CTRL1 = 0x9392004;
// get out of freeze mode
MCR = 0x0021_203f;
// CAN bus 0 is used (0x401B4000h)
send_msg(can0);
// on board like S32R45, S32G-VNP-RDB2, this rcv_msg fails to recv anything as expected. But on S32G-VNP-RDB3, this recvs msg.
if (rcv_msg(can0) == OK) ERROR(); // <<<<<<<< Problematic :(
// go to freeze mode (looped till FRZACK at BIT24 to be on)
MCR = 0x5921_203f;
// loop-back on
CTRL1 = 0x9393004;
// get out of freeze mode
MCR = 0x0021_203f;
// CAN bus 0 is used (0x401B4000h)
send_msg(can0);
// now we expect to recv what we send
if (rcv_msg(can0) != OK) ERROR();

If running on can1 (0x401BE000h) on S32G3, this test is also OK.

Could any one throw some light? What should I try differently? Thanks

标记 (3)
0 项奖励
回复
1 解答
633 次查看
ghs_khuang
Contributor I

this can be closed. It's caused by something connected to the can bus 0:( I work remotely so I didn't know that was connected....

在原帖中查看解决方案

0 项奖励
回复
1 回复
634 次查看
ghs_khuang
Contributor I

this can be closed. It's caused by something connected to the can bus 0:( I work remotely so I didn't know that was connected....

0 项奖励
回复