Page 1 of 1

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

Posted: Wed May 11, 2016 10:20 am
by kk123456
问个问题,在github里下载了sc_can例程,不知道在程序运行的过程中有什么方法修改can的波特率?

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

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

Posted: Wed May 11, 2016 3:53 pm
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

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

Posted: Thu May 12, 2016 9:16 am
by kk123456
好的,谢谢。

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

Posted: Fri May 13, 2016 3:02 pm
by qiusongxiao
我公司有研发的同事熟悉这一块,我问问他