[求助]急:9s12dp256b中的MSCAN通信波特率设置如何设置
- UID
- 115880
- 性别
- 女
|
[求助]急:9s12dp256b中的MSCAN通信波特率设置如何设置
看了资料没看明白,请各位高手帮忙
如
晶振为16M时:
波特率为1M CANBTR0=? CANBTR1=?
波特率为500K CANBTR0=? CANBTR1=? |
hi thank you for your help |
|
|
|
|
|
- UID
- 104673
- 性别
- 男
|
** Protocol
** Time segment 1 : 6
** Time segment 2 : 7
** RSJ : 1
** 16 Mhz
CAN0CTL0 = 0x01; /* Set the control register */
CAN0CTL1 = 0x80; /* Set the control register */
CAN0BTR0 = 0x43; /* Set the device timing register */
CAN0BTR1 = 0x76; /* Set the device timing register */
CAN0CTL1_CLKSRC = 0x00; /* Select the clock source from crystal */
注意 Time Segment1,2的选择要符合整车协议。
请到freescale网站上看这个文档
Application note
AN1798/D - CAN Bit Timing Requirements |
|
|
|
|
|
- UID
- 115880
- 性别
- 女
|
hi thank you for your help |
|
|
|
|
|