How to calculate the CANFD bitrate and sample point using S32DS for PA

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

How to calculate the CANFD bitrate and sample point using S32DS for PA

2,442 次查看
shingo
Contributor II

Hi:

  Add a component called "flexcan" in S32DS for PA, Configuration is as follow:

MPC5748G Devkit;

Enable FD; Module clock = 80MHz; PE clock = 40MHz. using Peripheral clock

 Here are my questions about the Bitrate configuration.

1) Given the values of time variables, including Propagation segment/Phase segment1/Phase segment2/Prescaler Division Factor/Resync jump width, how to calculate the sample point's value? Is there any formula for calculating the sample point's value?

2) Some sample point's values calculated by time variables are not directly available? Need to convert it to an approximation?

2) On the other hand, Given the Bitrate and sample point's value, how to calculate or select these variables?

3) Is the method used to calculate the bitrate/sample point of the Arbitration Phase consistent with that of the Data Phase?

 

BR,

zhou

标记 (1)
0 项奖励
回复
2 回复数

2,427 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

1) you can refer to Figure 43-7. and Figure 43-8. of the device RM to know how sample point is get.
2) not sure of question, sample point is given by Propagation segment/Phase segment1/Phase segment2 values
2) if "Bitrate to time segments" option is selected in flexcan component, the PE should automatically calculate Propagation segment/Phase segment1/Phase segment2/Prescaler Division Factor/Resync jump width based on given Bitrate and sample point's values. if teh option is deselected you need to set Propagation segment/Phase segment1/Phase segment2/Prescaler Division Factor/Resync jump width values manually. Below document can be used https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/FlexCAN-bit-timing-calculatio
3) yes a calculation is similar for data phase, different regsiters are used. You can refer to below tool https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/MPC5xxx-S32Kxx-CAN-CAN-FD-bit-timing-calculation...

BR, Petr

0 项奖励
回复

2,401 次查看
shingo
Contributor II

Hi, PetrS:

 The website "https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/FlexCAN-bit-timing-calculatio" cannot be opened.

 Give an example show the bit time question:

 Preconditon: 

      1) "Bitrate to time segments" option is desselected in flexcan component.
      2) Want to set Bitrate as 500kbps, sampling point at 87.5%.

Here is one solution:

shingo_0-1619767519580.png

another solution as following:

shingo_1-1619767593766.png

The quesion is : the values of Propagation segment and Phase segment can be set arbitrarily, as long as the sum of the two values keep 11?

 

0 项奖励
回复