Controll of the baud rate in can_pal_s32k146 example on S32K146EVB-Q144

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

Controll of the baud rate in can_pal_s32k146 example on S32K146EVB-Q144

Jump to solution
567 Views
Tsunokawa
Contributor I

Hello, 

I'm using S32K146EVB-Q144. And tried to check the output CAN signal using external CAN device (CANoe) but didn't succeed. I guess the baud rate mismatched. The setting of the CANoe was 500KB/s.

How can I know the baud rate of the signal the can_pal_s32k146 example output.

The CAN periferal configuration was defined in can_pal1.c file generated.

Capture.PNG

My assumption is the below

The clock source is selected as CAN_CLK_SOURCE_OSC. This is 4MHz (Extenral Cyristal Frequency / 2).

baud rate = 4MHz / ((7+1) + (4+1) + (1+1) + 1) = 4MHz/16 = 250KHz.

Is my assumption right?

And when enableFD = false, is dataBitrate ignored?

 

Any response will be appliciated. Thank you.

0 Kudos
1 Solution
554 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi 

The example uses an 8MHz crystal, you can check it out here:

System Oscillator frequency.png

Note that: SOSCDIV2_CLK/1=8MHz 

Bitrate peripherals_can_pal1.png

If enableFD = false, dataBitrate is ignored.

The example documentation can be found in the S32 SDK documentation at Examples and Demos section. (<SDK_PATH>/doc/Start_Here.html)

Please note: Power on the board with external supply 12V (J16). This information can be found in :file:///C:/NXP/S32DS.3.4/S32DS/software/S32SDK_S32K1XX_RTM_4.0.3/doc/html_S32K146/can_pal_s32k146_gr...


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
4 Replies
520 Views
Tsunokawa
Contributor I

I could monitor the CAN packet after supplying the power from J16.

Thank you very much for your support.

0 Kudos
517 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

You are welcome!
I am glad to hear that it works now.

0 Kudos
551 Views
Tsunokawa
Contributor I

Thank you Robin for the quick reply.

I got it! (I had thought the 8MHz would be divided by 2 because of the name of the clock "SOSCDIV2_CLK" before being input to the CAN peripheral).

And I was using only USB cable. Let me modify the HW. Let me try again. I need some more HW modification, next reply will be delay sorry.

 

Best regards,

Tsunokawa

0 Kudos
555 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi 

The example uses an 8MHz crystal, you can check it out here:

System Oscillator frequency.png

Note that: SOSCDIV2_CLK/1=8MHz 

Bitrate peripherals_can_pal1.png

If enableFD = false, dataBitrate is ignored.

The example documentation can be found in the S32 SDK documentation at Examples and Demos section. (<SDK_PATH>/doc/Start_Here.html)

Please note: Power on the board with external supply 12V (J16). This information can be found in :file:///C:/NXP/S32DS.3.4/S32DS/software/S32SDK_S32K1XX_RTM_4.0.3/doc/html_S32K146/can_pal_s32k146_gr...


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