FlexCAN is not working - Always stuff error is coming

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

FlexCAN is not working - Always stuff error is coming

跳至解决方案
3,655 次查看
Girish1
Contributor II

I am working on S32K148X evaluation board. I am using EB tresos for MCAL configuration. When i tried to test the CAN communication, I am always getting the stuff error.

Please go through below configurations:

Girish1_0-1694644128033.pngGirish1_0-1694644128033.pngGirish1_1-1694644156895.pngGirish1_1-1694644156895.png

 

Girish1_2-1694644192025.pngGirish1_2-1694644192025.png

 

Girish1_3-1694644221454.pngGirish1_3-1694644221454.png

 

Girish1_4-1694644294815.pngGirish1_4-1694644294815.png

 

Girish1_5-1694644325512.pngGirish1_5-1694644325512.png

 

Girish1_6-1694644348473.pngGirish1_6-1694644348473.png

 

I have shared all configurations.. i would request for your help to solve this issue.

 

Thanks

Girish S

0 项奖励
回复
1 解答
3,531 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

so if PE clock is 8MHz and your setting is NBT=17, prescaler=2, then baudrate is about 235294bps.
Try to measure bit time of generated frame by MCU. 

BR, Petr

在原帖中查看解决方案

0 项奖励
回复
5 回复数
3,611 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

most probably it is due to different CAN FD protocol used on both nodes.
MCU is using non-ISO (ISOCANFDEN bit cleared) so check if PCAN has same and set for desired one, I guess ISO CAN FD so set it on both.

BR, Petr

0 项奖励
回复
3,588 次查看
Girish1
Contributor II

Hello Peter,

Thanks for your reply. here we are not using CAN FD, It is a basic CAN.

 

Thanks

Girish S

3,578 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

well, I overlooked that. 
Then check bit timing setting, set same baudrate and sample point on both sides. What is your PE clock (you selected sys_clk)?

BR, Petr

0 项奖励
回复
3,574 次查看
Girish1
Contributor II

Hello Peter,

 

The clock frequency is 8 MHz. Same as PCAN settings.

Girish1_0-1694698073452.pngGirish1_0-1694698073452.png

Thanks

Girish S

 

0 项奖励
回复
3,532 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

so if PE clock is 8MHz and your setting is NBT=17, prescaler=2, then baudrate is about 235294bps.
Try to measure bit time of generated frame by MCU. 

BR, Petr

0 项奖励
回复