
FlexCAN Module
MPC5644A Microcontroller Reference Manual, Rev. 6
1438
Freescale Semiconductor
The clock source (CLKSRC bit) should be selected while the module is in Disable Mode. After the clock
source is selected and the module is enabled (MDIS bit negated), FlexCAN automatically goes to Freeze
Mode. In Freeze Mode, FlexCAN is unsynchronized to the CAN bus, the HALT and FRZ bits in the MCR
are set, the internal state machines are disabled and the FRZACK and NOTRDY bits in the MCR are set.
The Tx pin is in recessive state and FlexCAN does not initiate any transmission or reception of CAN
frames. Note that the Message Buffers and the Rx Individual Mask Registers are not affected by reset, so
they are not automatically initialized.
For any configuration change/initialization it is required that FlexCAN is put into Freeze Mode (see
). The following is a generic initialization sequence applicable to the
FlexCAN module:
•
Initialize the Module Configuration Register (MCR)
— Enable the individual filtering per message buffer and reception queue features by setting the
MBFEN bit
— Enable the warning interrupts by setting the WRNEN bit
— If required, disable frame self reception by setting the SRX_DIS bit
— Enable the FIFO by setting the FEN bit
— Enable the abort mechanism by setting the AEN bit
— Enable the local priority feature by setting the LPRIO_EN bit
•
Initialize the Control Register (CR)
— Determine the bit timing parameters: PROPSEG, PSEG1, PSEG2, RJW
— Determine the bit rate by programming the PRESDIV field
— Determine the internal arbitration mode (bit CR[LBUF])
•
Initialize the Message Buffers
— The Control and Status word of all Message Buffers must be initialized
— If FIFO was enabled, the 8-entry ID table must be initialized
— Other entries in each Message Buffer should be initialized as required
•
Initialize the Rx Individual Mask Registers
•
Set required interrupt mask bits in the corresponding IMRL or IMRH register (for all message
buffer interrupts), in the CR (for Bus Off and Error interrupts) and in the MCR for Wake-Up
interrupt
•
Negate the HALT bit in MCR
Starting with the last event, FlexCAN attempts to synchronize to the CAN bus.
32.6.2
FlexCAN addressing and RAM size configurations
There are three RAM configurations that can be implemented within the FlexCAN module. The possible
configurations are:
•
For 16 message buffers: 288 bytes for message buffer memory and 64 bytes for Individual Mask
Registers
Содержание MPC5644A
Страница 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Страница 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Страница 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Страница 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Страница 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Страница 130: ...Device Performance Optimization MPC5644A Microcontroller Reference Manual Rev 6 130 Freescale Semiconductor...
Страница 204: ...Multi Layer AHB Crossbar Switch XBAR MPC5644A Microcontroller Reference Manual Rev 6 204 Freescale Semiconductor...
Страница 212: ...Peripheral Bridge PBRIDGE MPC5644A Microcontroller Reference Manual Rev 6 212 Freescale Semiconductor...
Страница 558: ...System Integration Unit SIU MPC5644A Microcontroller Reference Manual Rev 6 558 Freescale Semiconductor...
Страница 582: ...Frequency modulated phase locked loop FMPLL MPC5644A Microcontroller Reference Manual Rev 6 582 Freescale Semiconductor...
Страница 766: ...Enhanced Time Processing Unit eTPU2 MPC5644A Microcontroller Reference Manual Rev 6 766 Freescale Semiconductor...
Страница 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Страница 1236: ...System Information Module and Trim SIM MPC5644A Microcontroller Reference Manual Rev 6 1236 Freescale Semiconductor...
Страница 1250: ...Cyclic Redundancy Checker CRC Unit MPC5644A Microcontroller Reference Manual Rev 6 1250 Freescale Semiconductor...
Страница 1336: ...Deserial Serial Peripheral Interface DSPI MPC5644A Microcontroller Reference Manual Rev 6 1336 Freescale Semiconductor...
Страница 1388: ...Enhanced Serial Communication Interface ESCI MPC5644A Microcontroller Reference Manual Rev 6 1388 Freescale Semiconductor...
Страница 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...
Страница 1624: ...FlexRay Communication Controller FlexRay MPC5644A Microcontroller Reference Manual Rev 6 1624 Freescale Semiconductor...
Страница 1670: ...JTAG Controller JTAGC MPC5644A Microcontroller Reference Manual Rev 6 1670 Freescale Semiconductor...
Страница 1692: ...Nexus Port Controller NPC MPC5644A Microcontroller Reference Manual Rev 6 1692 Freescale Semiconductor...
Страница 1701: ...Development Trigger Semaphore DTS MPC5644A Microcontroller Reference Manual Rev 6 Freescale Semiconductor 1701...
Страница 1702: ...Development Trigger Semaphore DTS MPC5644A Microcontroller Reference Manual Rev 6 1702 Freescale Semiconductor...