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

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

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

Post by kk123456 »

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

有没有做到过这一块的给讲解下,谢谢!


peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Post by peter »

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

Post by kk123456 »

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

Post by qiusongxiao »

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