Configuring can_onchip example for 500kbps

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Configuring can_onchip example for 500kbps

1,076 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by manishd on Fri Oct 07 09:53:10 MST 2011
I would like to configure the can_onchip example for a CAN bitrate of 500kbps instead of the 125kbps default. Can this be accomplished simply by changing the values in the ClkInitTable?

// 500kbps
uint32_t ClkInitTable[2] = {
  0x00000005UL, // CANCLKDIV 5
  0x00002301UL  // CAN_BTR 0x2301
};

//instead of 125kbps
uint32_t ClkInitTable[2] = {
  0x00000000UL, // CANCLKDIV 5
  0x00001C57UL  // CAN_BTR 0x2301
};

Calculating the bit time quanta seems a little :(
0 项奖励
回复
2 回复数

1,031 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Oct 07 09:58:46 MST 2011

Quote: manishd
Can this be accomplished simply by changing the values in the ClkInitTable?



Didn't check your values, but changing this table (before it is loaded) is the right way :)

Edit: Checked your settings and yes, it's 500k :eek:
0 项奖励
回复

1,031 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by manishd on Fri Oct 07 09:53:53 MST 2011
Forgot to mention that I am using the LPC11C24 micro...
0 项奖励
回复