
FlexCAN Module
MCF5253 Reference Manual, Rev. 1
Freescale Semiconductor
25-29
25.7
FlexCAN Initialization Sequence
Initialization of the FlexCAN includes the initial configuration of the message buffers and configuration
of the CAN communication parameters following a reset, as well as any reconfiguration that may be
required during operation. The FlexCAN module may be reset in three ways:
•
Device level hard reset—resets all memory mapped registers asynchronously
•
Device level soft reset—resets some of the memory mapped registers synchronously (refer to
to see which registers are affected by soft reset)
•
CANMCR
n
[SOFT_RST] bit—has the same effect as the device level soft reset
Soft reset is synchronous and has to follow an internal request/acknowledge procedure across clock
domains. Therefore, it may take some time to fully propagate its effects. The CANMCR
n
[SOFT_RST] bit
remains asserted while soft reset is pending, so software can poll this bit to know when the reset has
completed. Also, soft reset can not be applied while clocks are shut down in any of the low power modes.
The low power mode should be exited and the clocks resumed before applying soft reset.
The clock source, CANCTRL
n
[CLK_SRC], should be selected while the module is in disable mode. After
the clock source is selected and the module is enabled (CANMCR
n
[MDIS] bit cleared), the FlexCAN
automatically enters freeze mode. In freeze mode, the FlexCAN is un-synchronized to the CAN bus, the
CANMCR
n
register’s HALT and FRZ bits are set, the internal state machines are disabled, and the
CANMCR
n
register’s FRZ_ACK and NOT_RDY bits are set. The CAN
n
TX pin is in recessive state and
the FlexCAN does not initiate any transmission or reception of CAN frames. Note that the message buffers
are not affected by reset, so they are not automatically initialized.
For any configuration change/initialization, the FlexCAN must be in freeze mode (see
). The following is a generic initialization sequence applicable to the FlexCAN module:
1. Initialize all operation modes in the CANCTRL
n
register.
a) Initialize the bit timing parameters PROPSEG, PSEGS1, PSEG2, and RJW.
b) Select the S-clock rate by programming the PRESDIV field.
c) Select the internal arbitration mode via the LBUF bit.
Table 25-15. CAN Standard Compliant Bit Time Segment Settings
Time Segment 1
Time Segment 2
Re-synchronization
Jump Width
5 .. 10
2
1 .. 2
4 .. 11
3
1 .. 3
5 .. 12
4
1 .. 4
6 .. 13
5
1 .. 4
7 .. 14
6
1 .. 4
8 .. 15
7
1 .. 4
9 .. 16
8
1 .. 4
Summary of Contents for MCF5253
Page 1: ...Document Number MCF5253RM Rev 1 08 2008 MCF5253 Reference Manual...
Page 26: ...MCF5253 Reference Manual Rev 1 xxvi Freescale Semiconductor...
Page 32: ...MCF5253 Reference Manual Rev 1 xxxii Freescale Semiconductor...
Page 46: ...MCF5253 Introduction MCF5253 Reference Manual Rev 1 1 14 Freescale Semiconductor...
Page 62: ...Signal Description MCF5253 Reference Manual Rev 1 2 16 Freescale Semiconductor...
Page 98: ...Instruction Cache MCF5253 Reference Manual Rev 1 5 10 Freescale Semiconductor...
Page 104: ...Static RAM SRAM MCF5253 Reference Manual Rev 1 6 6 Freescale Semiconductor...
Page 128: ...Synchronous DRAM Controller Module MCF5253 Reference Manual Rev 1 7 24 Freescale Semiconductor...
Page 144: ...Bus Operation MCF5253 Reference Manual Rev 1 8 16 Freescale Semiconductor...
Page 176: ...System Integration Module SIM MCF5253 Reference Manual Rev 1 9 32 Freescale Semiconductor...
Page 198: ...Analog to Digital Converter ADC MCF5253 Reference Manual Rev 1 12 6 Freescale Semiconductor...
Page 246: ...DMA Controller MCF5253 Reference Manual Rev 1 14 18 Freescale Semiconductor...
Page 282: ...UART Modules MCF5253 Reference Manual Rev 1 15 36 Freescale Semiconductor...
Page 344: ...Audio Interface Module AIM MCF5253 Reference Manual Rev 1 17 46 Freescale Semiconductor...
Page 362: ...I2 C Modules MCF5253 Reference Manual Rev 1 18 18 Freescale Semiconductor...
Page 370: ...Boot ROM MCF5253 Reference Manual Rev 1 19 8 Freescale Semiconductor...