Hi I want setting 500K bit rate FlexCAN in MPC5606B.
100K is work but setting 500k is not work.
is my calculation wrong?
1. 100K (work well)
CAN_0.CR.R = 0x04E40004; /* Configure for 8MHz OSC, 100KHz bit time */
2. 500K (not work)
CAN_0.CR.R = 0x03000000; /* Configure for 8MHz OSC, 500KHz bit time */
here is the way how I calculate bit rate
- tPROP_SEG = 400ns
- OSC : 8MHZ
1). NBT * Prescaler = 8MHZ / 500kbps = 16 ( NBT = 4, Prescaler = 4)
2). PROP_SEG = Round_up(400ns * 8MHZ / 4) = 1
3). NBT - 1 - PROP_SEG = 4 - 1 - 1 = 2 (Phase_seg1 = 1, Phase_seg2 = 1)
4). RJW = 1 (smaller of 4 and PHASE_SEG1)
so result CAN_0 Control Register is 0x03000000. but it doesn't work.... TT