怎么修改sc_can中的波特率啊?

技术交流
kk123456
New User
Posts: 3
Joined: Wed May 11, 2016 9:48 am

怎么修改sc_can中的波特率啊?

Postby kk123456 » Wed May 11, 2016 10:20 am

问个问题,在github里下载了sc_can例程,不知道在程序运行的过程中有什么方法修改can的波特率?

有没有做到过这一块的给讲解下,谢谢!
peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Postby peter » Wed May 11, 2016 3:53 pm

Unfortunately it looks like the way it is currently written it is designed to be a compile-time constant and therefore not modifiable at run-time. This page details the values of CAN_CLOCK_DIVIDER and what data rate that will produce (though the table doesn't format well in a browser):

https://github.com/xcore/sc_can/blob/ma ... amming.rst

Clock Divider = Baud Rate
1 = 1Mbps
2 = 500 Kbps
4 = 250 Kbps
8 = 125 Kbps
kk123456
New User
Posts: 3
Joined: Wed May 11, 2016 9:48 am

Postby kk123456 » Thu May 12, 2016 9:16 am

好的,谢谢。
qiusongxiao
Member++
Posts: 16
Joined: Thu Apr 10, 2014 4:42 pm
Contact:

Postby qiusongxiao » Fri May 13, 2016 3:02 pm

我公司有研发的同事熟悉这一块,我问问他

Who is online

Users browsing this forum: No registered users and 1 guest