
Controller Area Network (FlexCAN)
PXN20 Microcontroller Reference Manual, Rev. 1
29-40
Freescale Semiconductor
The other two interrupt sources (bus off/transmit warning/receive warning and error) generate interrupts
like the MB interrupt sources, and can be read from CAN
x
_ESR. The bus off/transmit warning/receive
warning and error interrupt mask bits are located in the CAN
x
_CTRL.
29.4.10 Bus Interface
The CPU access to FlexCAN registers are subject to the following rules:
•
Read and write access to unimplemented or reserved address space results in access error. Any
access to unimplemented MB Rx individual mask register locations results in access error. Any
access to the Rx individual mask register space when the BCC bit in CAN
x
_MCR is negated results
in access error.
•
For a FlexCAN configuration that uses less than the total number of MBs and MAXMB is set
accordingly, the remaining MB and Rx mask register spaces can be used as general-purpose RAM
space. Note that the Rx individual mask registers can only be accessed in freeze mode, and this is
still true for unused space within this memory. Note also that reserved words within RAM cannot
be used. As an example, suppose FlexCAN is configured with 64 MBs and MAXMB is
programmed with zero. The maximum number of MBs in this case becomes one. The MB memory
starts at 0x0060, but the space from 0x0060 to 0x007F is reserved (for SMB usage), and the space
from 0x0080 to 0x008F is used by the one MB. This leaves us with the available space from
0x0090 to 0x047F. The available memory in the mask registers space would be from 0x0884 to
0x097F. Byte, word, and long word accesses are allowed to the unused MB space.
NOTE
Unused MB space must not be used as general purpose RAM while
FlexCAN is transmitting and receiving CAN frames.
29.5
Initialization and Application Information
This section provides instructions for initializing the FlexCAN module.
29.5.1
FlexCAN Initialization Sequence
The FlexCAN module can 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 CAN
x
_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.
After the module is enabled (CAN
x
_MCR[MDIS] bit negated), FlexCAN must be put into freeze mode
before doing any configuration. In freeze mode, FlexCAN is un-synchronized to the CAN bus, the HALT
and FRZ bits in CAN
x
_MCR are set, the internal state machines are disabled and the FRZ_ACK and
Содержание PXN2020
Страница 1: ...PXN20 Microcontroller Reference Manual Devices Supported PXN2020 PXN2120 PXN20RM Rev 1 06 2011...
Страница 42: ...PXN20 Microcontroller Reference Manual Rev 1 lxiv Freescale Semiconductor...
Страница 64: ...Introduction PXN20 Microcontroller Reference Manual Rev 1 1 22 Freescale Semiconductor...
Страница 112: ...Signal Description PXN20 Microcontroller Reference Manual Rev 1 3 44 Freescale Semiconductor...
Страница 118: ...Resets PXN20 Microcontroller Reference Manual Rev 1 4 6 Freescale Semiconductor...
Страница 162: ...Clocks Reset and Power CRP PXN20 Microcontroller Reference Manual Rev 1 6 30 Freescale Semiconductor...
Страница 182: ...Frequency Modulated Phase Locked Loop FMPLL PXN20 Microcontroller Reference Manual Rev 1 7 20 Freescale Semiconductor...
Страница 268: ...Boot Assist Module BAM PXN20 Microcontroller Reference Manual Rev 1 9 14 Freescale Semiconductor...
Страница 318: ...Interrupts and Interrupt Controller INTC PXN20 Microcontroller Reference Manual Rev 1 10 50 Freescale Semiconductor...
Страница 326: ...General Purpose Static RAM SRAM PXN20 Microcontroller Reference Manual Rev 1 11 8 Freescale Semiconductor...
Страница 372: ...e200z6 Core Z6 PXN20 Microcontroller Reference Manual Rev 1 13 8 Freescale Semiconductor...
Страница 412: ...e200z0 Core Z0 PXN20 Microcontroller Reference Manual Rev 1 14 14 Freescale Semiconductor...
Страница 460: ...Memory Protection Unit MPU PXN20 Microcontroller Reference Manual Rev 1 18 20 Freescale Semiconductor...
Страница 478: ...Error Correction Status Module ECSM PXN20 Microcontroller Reference Manual Rev 1 19 18 Freescale Semiconductor...
Страница 488: ...Software Watchdog Timer SWT PXN20 Microcontroller Reference Manual Rev 1 20 10 Freescale Semiconductor...
Страница 494: ...System Timer Module STM PXN20 Microcontroller Reference Manual Rev 1 21 6 Freescale Semiconductor...
Страница 821: ...Media Local Bus MLB PXN20 Microcontroller Reference Manual Rev 1 Freescale Semiconductor 27 49...
Страница 822: ...Media Local Bus MLB PXN20 Microcontroller Reference Manual Rev 1 27 50 Freescale Semiconductor...
Страница 926: ...Controller Area Network FlexCAN PXN20 Microcontroller Reference Manual Rev 1 29 42 Freescale Semiconductor...
Страница 990: ...Deserial Serial Peripheral Interface DSPI PXN20 Microcontroller Reference Manual Rev 1 30 64 Freescale Semiconductor...
Страница 1044: ...Enhanced Serial Communication Interface eSCI PXN20 Microcontroller Reference Manual Rev 1 31 54 Freescale Semiconductor...
Страница 1080: ...Cross Triggering Unit CTU PXN20 Microcontroller Reference Manual Rev 1 33 12 Freescale Semiconductor...
Страница 1134: ...Analog to Digital Converter ADC PXN20 Microcontroller Reference Manual Rev 1 34 54 Freescale Semiconductor...
Страница 1150: ...IEEE 1149 1 Test Access Port Controller JTAGC PXN20 Microcontroller Reference Manual Rev 1 35 16 Freescale Semiconductor...
Страница 1257: ...Nexus Development Interface NDI PXN20 Microcontroller Reference Manual Rev 1 Freescale Semiconductor 36 107...
Страница 1258: ...Nexus Development Interface NDI PXN20 Microcontroller Reference Manual Rev 1 36 108 Freescale Semiconductor...
Страница 1376: ...Memory Map PXN20 Microcontroller Reference Manual Rev 1 A 118 Freescale Semiconductor...