
Chapter 25 FlexCAN
MPC5606BK Microcontroller Reference Manual, Rev. 2
568
Freescale Semiconductor
for increasing and decreasing these counters are described in the CAN protocol and are completely
implemented in the FlexCAN module. Both counters are read only except in Freeze Mode, where they can
be written by the CPU.
Writing to the Error Counter Register while in Freeze Mode is an indirect operation. The data is first
written to an auxiliary register and then an internal request/acknowledge procedure across clock domains
is executed. All this is transparent to the user, except for the fact that the data will take some time to be
actually written to the register. If desired, software can poll the register to discover when the data was
actually written.
FlexCAN responds to any bus state as described in the protocol, e.g., transmit Error Active or Error Passive
flag, delay its transmission start time (Error Passive) and avoid any influence on the bus when in Bus Off
state. The following are the basic rules for FlexCAN bus state transitions.
•
If the value of TX_ERR_COUNTER or RX_ERR_COUNTER increases to be greater than or
equal to 128, the FLT_CONF field in the Error and Status Register is updated to reflect Error
Passive state.
•
If the FlexCAN state is Error Passive, and either TX_ERR_COUNTER or RX_ERR_COUNTER
decrements to a value less than or equal to 127 while the other already satisfies this condition, the
FLT_CONF field in the Error and Status Register is updated to reflect Error Active state.
•
If the value of TX_ERR_COUNTER increases to be greater than 255, the FLT_CONF field in the
Error and Status Register is updated to reflect Bus Off state, and an interrupt may be issued. The
value of TX_ERR_COUNTER is then reset to zero.
•
If the FlexCAN is in Bus Off state, then Tx_Err_Counter is cascaded together with another internal
counter to count the 128th occurrences of 11 consecutive recessive bits on the bus. Hence,
TX_ERR_COUNTER is reset to 0 and counts in a manner where the internal counter counts 11
such bits and then wraps around while incrementing the TX_ERR_COUNTER. When
TX_ERR_COUNTER reaches the value of 128, the FLT_CONF field in the Error and Status
Register is updated to be Error Active and both error counters are reset to 0. At any instance of
dominant bit following a stream of less than 11 consecutive recessive bits, the internal counter
resets itself to 0 without affecting the TX_ERR_COUNTER value.
•
If during system start-up, only one node is operating, then its TX_ERR_COUNTER increases in
each message it is trying to transmit, as a result of acknowledge errors (indicated by the ACK_ERR
bit in the Error and Status Register). After the transition to Error Passive state, the
TX_ERR_COUNTER does not increment anymore by acknowledge errors. Therefore the device
never goes to the Bus Off state.
•
If the RX_ERR_COUNTER increases to a value greater than 127, it is not incremented further,
even if more errors are detected while being a receiver. At the next successful message reception,
the counter is set to a value between 119 and 127 to resume to Error Active state.
Содержание 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...