FlexCAN is not working - Always stuff error is coming

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

FlexCAN is not working - Always stuff error is coming

Jump to solution
2,396 Views
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_1-1694644156895.png

 

Girish1_2-1694644192025.png

 

Girish1_3-1694644221454.png

 

Girish1_4-1694644294815.png

 

Girish1_5-1694644325512.png

 

Girish1_6-1694644348473.png

 

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

 

Thanks

Girish S

0 Kudos
Reply
1 Solution
2,272 Views
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

View solution in original post

0 Kudos
Reply
5 Replies
2,352 Views
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 Kudos
Reply
2,329 Views
Girish1
Contributor II

Hello Peter,

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

 

Thanks

Girish S

2,319 Views
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 Kudos
Reply
2,315 Views
Girish1
Contributor II

Hello Peter,

 

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

Girish1_0-1694698073452.png

Thanks

Girish S

 

0 Kudos
Reply
2,273 Views
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 Kudos
Reply