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!
已解决! 转到解答。
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:
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!
-----------------------------------------------------------------------------------------------------------------------
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:
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!
-----------------------------------------------------------------------------------------------------------------------
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?