问个问题,在github里下载了sc_can例程,不知道在程序运行的过程中有什么方法修改can的波特率?
有没有做到过这一块的给讲解下,谢谢!
怎么修改sc_can中的波特率啊?
-
- New User
- Posts: 3
- Joined: Wed May 11, 2016 9:48 am
-
- XCore Addict
- Posts: 230
- Joined: Wed Mar 10, 2010 12:46 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
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
-
- New User
- Posts: 3
- Joined: Wed May 11, 2016 9:48 am
好的,谢谢。
-
- Member++
- Posts: 16
- Joined: Thu Apr 10, 2014 4:42 pm
我公司有研发的同事熟悉这一块,我问问他