S32K148 - Change CAN FD baudrate

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

S32K148 - Change CAN FD baudrate

Jump to solution
3,973 Views
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 Kudos
Reply
1 Solution
3,961 Views
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.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
1 Reply
3,962 Views
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 Kudos
Reply