Configuring can_onchip example for 500kbps

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Configuring can_onchip example for 500kbps

1,081件の閲覧回数
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,036件の閲覧回数
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,036件の閲覧回数
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 件の賞賛
返信