![NXP Semiconductors MPC5605BK Скачать руководство пользователя страница 593](http://html.mh-extra.com/html/nxp-semiconductors/mpc5605bk/mpc5605bk_reference-manual_1721852593.webp)
Chapter 25 FlexCAN
MPC5606BK Microcontroller Reference Manual, Rev. 2
Freescale Semiconductor
591
NOTE
Unused MB space must not be used as general purpose RAM while
FlexCAN is transmitting and receiving CAN frames.
25.6
Initialization/application information
This section provide instructions for initializing the FlexCAN module.
25.6.1
FlexCAN initialization sequence
The FlexCAN module may be reset in three ways:
•
MCU level hard reset, which resets all memory mapped registers asynchronously
•
MCU level soft reset, which resets some of the memory mapped registers synchronously (refer to
to see what registers are affected by soft reset)
•
SOFT_RST bit in MCR, which has the same effect as the MCU 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 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 cannot 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 (CLK_SRC 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 from the CAN bus, the HALT and FRZ bits in MCR
are set, the internal state machines are disabled, and the FRZ_ACK and NOT_RDY bits in 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
Section 25.5.10.1, Freeze mode
). The following is a generic initialization sequence applicable to the
FlexCAN module:
•
Initialize MCR
— Enable the individual filtering per MB and reception queue features by setting the BCC bit
— Enable the warning interrupts by setting the WRN_EN 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 CTRL
— Determine the bit timing parameters: PROPSEG, PSEG1, PSEG2, RJW
— Determine the bit rate by programming the PRESDIV field
Содержание MPC5605BK
Страница 2: ...This page is intentionally left blank...
Страница 20: ...MPC5606BK Microcontroller Reference Manual Rev 2 20 Freescale Semiconductor...
Страница 103: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 103 Clocks and power...
Страница 104: ...MPC5606BK Microcontroller Reference Manual Rev 2 104 Freescale Semiconductor This page is intentionally left blank...
Страница 243: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 243 Core platform modules...
Страница 244: ...MPC5606BK Microcontroller Reference Manual Rev 2 244 Freescale Semiconductor This page is intentionally left blank...
Страница 395: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 395 Communication modules...
Страница 396: ...MPC5606BK Microcontroller Reference Manual Rev 2 396 Freescale Semiconductor This page is intentionally left blank...
Страница 548: ...Chapter 24 LIN Controller LINFlexD MPC5606BK Microcontroller Reference Manual Rev 2 548 Freescale Semiconductor...
Страница 645: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 643 Timers...
Страница 646: ...MPC5606BK Microcontroller Reference Manual Rev 2 644 Freescale Semiconductor This page is intentionally left blank...
Страница 715: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 713 ADC system...
Страница 716: ...MPC5606BK Microcontroller Reference Manual Rev 2 714 Freescale Semiconductor This page is intentionally left blank...
Страница 787: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 787 Memory...
Страница 788: ...MPC5606BK Microcontroller Reference Manual Rev 2 788 Freescale Semiconductor This page is intentionally left blank...
Страница 893: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 893 Integrity...
Страница 894: ...MPC5606BK Microcontroller Reference Manual Rev 2 894 Freescale Semiconductor This page is intentionally left blank...
Страница 943: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 943 Debug...
Страница 944: ...MPC5606BK Microcontroller Reference Manual Rev 2 944 Freescale Semiconductor This page is intentionally left blank...