S32K148 - Change CAN FD baudrate

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

S32K148 - Change CAN FD baudrate

跳至解决方案
3,984 次查看
Chandra13
Contributor I

Hello,

I am using the flexcan_encrypted_s32k148 from S32_SDK_S32K1xx_RTM_4.0.3 for the S32K148EVB and I need to send CAN messages at a baudrate of 1000 kbps.

I went through these old forums to help with my case and here is my observation,

  1. MPC5xxx/S32Kxx: CAN / CAN FD bit timing calculatio... - NXP Community - fprescalar=2, fpropseg=5, fpseg1=7, fpseg2=7, frjw=7 after selecting the baudrate FD to 1000 (Cell G5)

Chandra13_1-1672950882378.png

2. Solved: S32 Flexcan baud rate is equal to 1000K, send fai... - NXP Community - fprescalar=3, fpropseg=4, fpseg1=1, fpseg2=1, frjw=3

I tried both the settings into my code, but my Vector CAN still receives them at 500 kbps only. If I change the settings in canoe to 1000, it fails.

Chandra13_2-1672951180393.png

 

I created a variable of type flexcan_time_segment_t and used the FLEXCAN_DRV_SetBitrateCbt function to set the baud rate.

Chandra13_3-1672951447172.png

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

Hi Chandra13,

Have you test the CAN_PAL example? Change the Bitrate of Arbitration Phase and Data Phase and then click Update Code. The example select Oscillator clock(8Mhz) as PE clock source, you can select Peripheral clock.

can_pal_s32k148 Peripherals tool.png

CAN_PAL S32K148EVB RTM4.0.3.png


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
1 回复
3,973 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Chandra13,

Have you test the CAN_PAL example? Change the Bitrate of Arbitration Phase and Data Phase and then click Update Code. The example select Oscillator clock(8Mhz) as PE clock source, you can select Peripheral clock.

can_pal_s32k148 Peripherals tool.png

CAN_PAL S32K148EVB RTM4.0.3.png


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复