FlexCAN
MPC5606S Microcontroller Reference Manual, Rev. 7
698
Freescale Semiconductor
18.4.2
Transmit process
In order to transmit a CAN frame, the CPU must prepare a Message Buffer for transmission by executing
the following procedure:
1. If the MB is active (transmission pending), write an ABORT code (1001) to the Code field of the
Control and Status word to request an abortion of the transmission, then read back the Code field
and the IFRL/IFRH registers to check if the transmission was aborted (see
). If backwards compatibility is desired (AEN in MCR negated),
just write 1000 to the Code field to inactivate the MB, but be aware that in this case the pending
frame may be transmitted without notification (see
Section 18.4.6.2, Message Buffer deactivation
2. Write the ID word.
3. Write the data bytes.
4. Write the Length, Control, and Code fields of the Control and Status word to activate the MB.
Once the MB is activated in the fourth step, it will participate in the arbitration process and eventually be
transmitted according to its priority. At the end of the successful transmission, the value of the Free
Running Timer is written into the Time Stamp field, the Code field in the Control and Status word is
updated, a status flag is set in the Interrupt Flag Register, and an interrupt is generated if allowed by the
corresponding Interrupt Mask Register bit. The new Code field after transmission depends on the code that
was used to activate the MB in step four (see
and
in
Section 18.3.2, Message Buffer
). When the Abort feature is enabled (AEN in MCR is asserted), after the Interrupt Flag is asserted
for a MB configured as transmit buffer, the MB is blocked—therefore the CPU is not able to update it until
the Interrupt Flag is negated by the CPU. It means that the CPU must clear the corresponding interrupt flag
bit before starting to prepare this MB for a new transmission or reception.
18.4.3
Arbitration process
The arbitration process is an algorithm executed by the MBM that scans the whole MB memory looking
for the highest priority message to be transmitted. All MBs programmed as transmit buffers will be
scanned to find the lowest ID
1
or the lowest MB number or the highest priority, depending on the LBUF
and LPRIO_EN bits on the Control Register. The arbitration process is triggered in the following events:
•
During the CRC field of the CAN frame
•
During the error delimiter field of the CAN frame
•
During Intermission, if the winner MB defined in a previous arbitration was deactivated, or if there
was no MB to transmit, but the CPU wrote to the Control and Status word of any MB after the
previous arbitration finished
•
When MBM is in Idle or Bus Off state and the CPU writes to the Control and Status word of any
MB
•
Upon leaving Freeze mode
When LBUF is asserted, the LPRIO_EN bit has no effect and the lowest number buffer is transmitted first.
When LBUF and LPRIO_EN are both negated, the MB with the lowest ID is transmitted first. However,
1. Actually, if LBUF is negated, the arbitration considers not only the ID, but also the RTR and IDE bits placed inside the ID at the
same positions they are transmitted in the CAN frame.
Содержание MPC5602S
Страница 76: ...Overview MPC5606S Microcontroller Reference Manual Rev 7 74 Freescale Semiconductor...
Страница 82: ...Memory Map MPC5606S Microcontroller Reference Manual Rev 7 80 Freescale Semiconductor...
Страница 112: ...Signal Description MPC5606S Microcontroller Reference Manual Rev 7 110 Freescale Semiconductor...
Страница 166: ...Analog to Digital Converter ADC MPC5606S Microcontroller Reference Manual Rev 7 164 Freescale Semiconductor...
Страница 182: ...Boot Assist Module BAM MPC5606S Microcontroller Reference Manual Rev 7 180 Freescale Semiconductor...
Страница 234: ...Clock Description MPC5606S Microcontroller Reference Manual Rev 7 232 Freescale Semiconductor...
Страница 286: ...Crossbar Switch XBAR MPC5606S Microcontroller Reference Manual Rev 7 284 Freescale Semiconductor...
Страница 470: ...e200z0h Core MPC5606S Microcontroller Reference Manual Rev 7 468 Freescale Semiconductor...
Страница 524: ...Enhanced Direct Memory Access eDMA MPC5606S Microcontroller Reference Manual Rev 7 522 Freescale Semiconductor...
Страница 546: ...Error Correction Status Module ECSM MPC5606S Microcontroller Reference Manual Rev 7 544 Freescale Semiconductor...
Страница 669: ...Flash Memory MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 667...
Страница 670: ...Flash Memory MPC5606S Microcontroller Reference Manual Rev 7 668 Freescale Semiconductor...
Страница 716: ...FlexCAN MPC5606S Microcontroller Reference Manual Rev 7 714 Freescale Semiconductor...
Страница 882: ...LIN Controller LINFlex MPC5606S Microcontroller Reference Manual Rev 7 880 Freescale Semiconductor...
Страница 901: ...Memory Protection Unit MPU MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 899...
Страница 902: ...Memory Protection Unit MPU MPC5606S Microcontroller Reference Manual Rev 7 900 Freescale Semiconductor...
Страница 955: ...Mode Entry Module MC_ME MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 953...
Страница 956: ...Mode Entry Module MC_ME MPC5606S Microcontroller Reference Manual Rev 7 954 Freescale Semiconductor...
Страница 1072: ...Quad Serial Peripheral Interface QuadSPI MPC5606S Microcontroller Reference Manual Rev 7 1070 Freescale Semiconductor...
Страница 1096: ...Reset Generation Module MC_RGM MPC5606S Microcontroller Reference Manual Rev 7 1094 Freescale Semiconductor...
Страница 1106: ...Real Time Clock RTC API MPC5606S Microcontroller Reference Manual Rev 7 1104 Freescale Semiconductor...
Страница 1186: ...Stepper Stall Detect SSD MPC5606S Microcontroller Reference Manual Rev 7 1184 Freescale Semiconductor...
Страница 1213: ...System Integration Unit Lite SIUL MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 1211...
Страница 1214: ...System Integration Unit Lite SIUL MPC5606S Microcontroller Reference Manual Rev 7 1212 Freescale Semiconductor...
Страница 1238: ...Voltage Regulators and Power Supplies MPC5606S Microcontroller Reference Manual Rev 7 1236 Freescale Semiconductor...
Страница 1252: ...Wakeup Unit WKPU MPC5606S Microcontroller Reference Manual Rev 7 1250 Freescale Semiconductor...
Страница 1258: ...Registers Under Protection MPC5606S Microcontroller Reference Manual Rev 7 1256 Freescale Semiconductor...
Страница 1323: ...Register Map MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 1321...
Страница 1324: ...Register Map MPC5606S Microcontroller Reference Manual Rev 7 1322 Freescale Semiconductor...