Is bitrate 100kBit/s possible with FlexCAN on i.MX6?

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

Is bitrate 100kBit/s possible with FlexCAN on i.MX6?

跳至解决方案
1,667 次查看
albrechtuhlmann
Contributor I

Hi all,

we have here equipment with CAN interface that needs a birate of 100000. The controller is a i.MX6Q. Can someone please help how to setup for 100kBbit/s? According to docs, I found only examples for 125kBit/s.

We can test with a Linux, but eventually the application will run under QNX OS, so I must understand how clocks and registers must be configured to achieve the effect. Many thanks.

-Albrecht

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,428 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Albrecht

you can look at SDK can example and document

iMX6_Firmware_Guide.pdf included to it. For 100Kbit/s one can add

next codes to function can_update_bitrate()  file can.c

i.MX 6Series Platform SDK : Bare-metal SDK for the i.MX 6 series

        case KBPS_100:
            presdiv = 11; // sets sclk ftq to 30/12=2.5 MHz = PEclk/12
            ts = time_segments[17]; // 25 time quanta (25-8=17 for array ID)
            break;

IMX6DQRM p.1315 explains

FlexCan bitrate.jpg

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,428 次查看
albrechtuhlmann
Contributor I

Thank you for your quick answer, it works for us!

0 项奖励
回复
1,429 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Albrecht

you can look at SDK can example and document

iMX6_Firmware_Guide.pdf included to it. For 100Kbit/s one can add

next codes to function can_update_bitrate()  file can.c

i.MX 6Series Platform SDK : Bare-metal SDK for the i.MX 6 series

        case KBPS_100:
            presdiv = 11; // sets sclk ftq to 30/12=2.5 MHz = PEclk/12
            ts = time_segments[17]; // 25 time quanta (25-8=17 for array ID)
            break;

IMX6DQRM p.1315 explains

FlexCan bitrate.jpg

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复