AN2283 Freescale Semiconductor / Motorola, AN2283 Datasheet - Page 33

no-image

AN2283

Manufacturer Part Number
AN2283
Description
Scalable Controller Area Network (MSCAN)
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Separate Routine
using the Polling
Method
Transmitter
Warning/Transmitter
Error Passive
Interrupts
MOTOROLA
Motorola Scalable Controller Area Network (MSCAN) Interrupts
No interrupts are generated when the MSCAN goes from the receiver warning
state to the No Error/Warning State where REC < 96. As seen from
the RWRNIE bit of CRIER is disabled in the Receiver Warning Interrupt
Routine. A separate polling routine can be used to determine when to re-enable
the RWRNIE bit:
Figure 24
Transmit Error Passive, and Bus Off Interrupts by the MSCAN based on the
value of the TEC count. The flowchart describes the minimal steps in the
interrupt service routines. Also shown is a separate routine where the polling
method is utilized to make sure the interrupts wanted by the user are enabled.
As seen at the beginning of the flowchart the REC and TEC of the MSCAN are
set to 0 out of reset. The user will determine which interrupts should be enabled
based on their applications. In this case, the Transmitter Warning, Transmitter
Error, and Bus Off Interrupts are enabled to show examples of all three
scenarios. The MSCAN adjusts the TEC value when transmit errors are
detected and when messages are transmitted successfully.
2. Next, set the Receiver Warning Interrupt Enable (RWRNIE) bit in
3. Clear the RERRIE bit in CRIER so that another Receiver Error Passive
4. Any additional interrupt handling code
1. Clear the Receiver Warning Interrupt Flag (RWRNIF) by writing a 1 to it.
2. Read the RWRNIF bit in CRFLG.
Freescale Semiconductor, Inc.
For More Information On This Product,
CRIER. The RWRNIE bit is cleared in the Receiver Warning Interrupt
routine when the MSCAN transitions to the Receiver Warning State.
Interrupt will not execute repeatedly for the duration in this state
(Receiver Error Passive State). This is due to the fact that interrupt flags
remain set in a level sensitive manner as long as the setting condition
remains.
(CRFLG utilizes the exclusive OR operation.)
a.
b.
is a flowchart example illustrating generation of Transmit Warning,
If RWRNIF = 0, then REC < 96, so set the Receiver Warning
Interrupt Enable (RWRNIE) bit in CRIER to re-enable the Receiver
Warning Interrupt.
If RWRNIF = 1, then the node is still in the Receiver Warning State
(REC >= 96).
Go to: www.freescale.com
Error Interrupts Overview
Figure
AN2283/D
23,
33

Related parts for AN2283