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
Checkout section 188.8.131.52 "Protocol Timing" of the MPC5566 Reference Manual.
The relevant parameters are set in the CAN Control Register (CAN_CR), described in section 184.108.40.206.
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
Have you already read http://cache.freescale.com/files/microcontrollers/doc/app_note/AN1798.pdf (CAN Bit Timing Requirements)?
Retrieving data ...