Configuring can_onchip example for 500kbps

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configuring can_onchip example for 500kbps

442 Views
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 Kudos
Reply
2 Replies

397 Views
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 Kudos
Reply

397 Views
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 Kudos
Reply