s12XF Flexray bus speed

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

s12XF Flexray bus speed

跳至解决方案
1,158 次查看
mikereising
Contributor I

Hello, I am trying to configure the flexray bus speed of the 2-node starter kit. I have a low speed flexray network setup and it seems to be working between the 2 nodes.

The documentation states that the the low speed flexray network runs at 1.25mb/sec. However when I look at the datasheet of the microcontroller itself, it states that it can only run at 10, 8, 5, 2.5 mb/sec.

 

The config file in the FR unified driver is set to this  -->>   0,              // Value of the PRESCALE or BITRATE bit field in the MCR register

According to that it should be running 10b/sec shouldn't it?

 

Please let me know if this is not the correct line to use to adjust the bus speed.

 

Thanks!

标签 (1)
0 项奖励
回复
1 解答
916 次查看
RadekS
NXP Employee
NXP Employee

Hi Mike,

you are right,

MCR.bitrate is set to 10 mb/sec. However this setting assumes that input clock for FlexRay module is default 80MHz.

We could choose between two clock sources:

  1. Oscillator Clocking
  2. PLL Clocking

In both cases, input clock should be 80MHz.

In case of sample project for the low speed FlexRay network application, designers used PLL clocking and lower input clock than default 80MHz. In this case, it is 10MHz (see function vfnIPLL_Startup() in CPU.c file). So, if input frequency is divided by 8 in compare with default frequency, we have to divide by 8 also output bitrate. In this case it is (10 mb/sec) / 8 = 1.25 mb/sec.


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
2 回复数
917 次查看
RadekS
NXP Employee
NXP Employee

Hi Mike,

you are right,

MCR.bitrate is set to 10 mb/sec. However this setting assumes that input clock for FlexRay module is default 80MHz.

We could choose between two clock sources:

  1. Oscillator Clocking
  2. PLL Clocking

In both cases, input clock should be 80MHz.

In case of sample project for the low speed FlexRay network application, designers used PLL clocking and lower input clock than default 80MHz. In this case, it is 10MHz (see function vfnIPLL_Startup() in CPU.c file). So, if input frequency is divided by 8 in compare with default frequency, we have to divide by 8 also output bitrate. In this case it is (10 mb/sec) / 8 = 1.25 mb/sec.


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
916 次查看
mikereising
Contributor I

I have modified MCR.bitrate on both nodes, and it seems that they only communicate with bitrate is set to 0 on both. I would assume that sets the devices to 10mb/sec, however I have an oscilloscope that decodes flexray, and it only picks up data on 2.5mb/sec.

Is there another register that i'm missing in order to get the bitrate changed?

0 项奖励
回复