**Content originally posted in LPCWare by kty-tty on Fri Jan 27 02:57:39 MST 2012**

Hi,

I have a 12MHz crystal on an LPC11C12, and I am trying to initialise the C_CAN for 1MHz.

I am having trouble with the bit timing initialisation. I can't find the PROP_SEG value or register!!

As you know the CAN bit timing is broken into 4 segments, and the baud rate is the inverse of the sum of each of them ie f=1/(tsync + tprop+tph1+tph2). Without the prop term how do i work this out?

ie can someone please help me with the BT register settings for 1MHz from a 12MHz crystal?

I have tried to reverse engineer the settings from the sample codes to work out what the PROP_SEG value is if it is fixed but am not having any luck. I am also new to CAN so would like some guidance on positioning of the thp1/tph2.

Any help appreciated.

Also, I have very low power requirements I am trying to meet so cannot just change the PLL for 48MHz. If worst comes to worst I might change it for 16MHz, but i would rather not!

Content originally posted in LPCWare by kty-tty on Fri Jan 27 03:06:43 MST 2012actually i just found this in the sample code header file notes:

[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f] /*

BRP+1 = [U]Fpclk[/U]/(CANBitRate * QUANTAValue)

QUANTAValue = 1 + (Tseg1+1) + (Tseg2+1)

QUANTA value varies based on the [U]Fpclk[/U] and sample point

e.g. (1) sample point is 87.5%, [U]Fpclk[/U] is 48Mhz

the QUANTA should be 16

(2) sample point is 90%, [U]Fpclk[/U] is 12.5Mhz

the QUANTA should be 10

[U]Fpclk[/U] = [U]Fclk[/U] /APBDIV

or

BitRate = [U]Fcclk[/U]/(APBDIV * (BRP+1) * ((Tseg1+1)+(Tseg2+1)+1))

*/

[SIZE=3][COLOR=black]Can someone help me understand this so I know what to set the BT register?[/COLOR][/SIZE]

[SIZE=3][COLOR=#000000][/COLOR][/SIZE]

[/COLOR][/SIZE][/COLOR][/SIZE]