MPC5566 FlexCAN

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

MPC5566 FlexCAN

2,285 Views
r_james14
Contributor I

Hi There,

 

Could anyone please explain how to calculate the baudrate for the FlexCAN on the MPC5566, currently im lost,

 

I have a 8Mz Crystal and require  buadrate of 1Mz

 

Thanks

Labels (1)
Tags (2)
0 Kudos
Reply
2 Replies

1,817 Views
lama
NXP TechSupport
NXP TechSupport

Have you already  read http://cache.freescale.com/files/microcontrollers/doc/app_note/AN1798.pdf (CAN Bit Timing Requirements)?

BR

Ladislav

0 Kudos
Reply

1,817 Views
chrism
Contributor I

Checkout section 22.4.5.4 "Protocol Timing" of the MPC5566 Reference Manual.

The relevant parameters are set in the CAN Control Register (CAN_CR), described in section 22.3.3.2.

As an example:

To get a bit rate of 1MHz, choose:

CLK_SRC = 0 (crystal source)

PRESDIV = 0

This will set the time quanta frequency, ftq, to 8 MHz

Then, choose a combination of PROPSEG, PSEG1 and PSEG2 to give 8 'time quanta' per bit time

Bit rate will then be

  ftq / num time quanta = 8 Mhz / 8 = 1Mhz, as desired

0 Kudos
Reply