AN2283 Freescale Semiconductor / Motorola, AN2283 Datasheet - Page 22

no-image

AN2283

Manufacturer Part Number
AN2283
Description
Scalable Controller Area Network (MSCAN)
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2283/D
Receive Interrupt
22
Motorola Scalable Controller Area Network (MSCAN) Interrupts
To enable a receive interrupt, the Receiver Full Interrupt Enable (RXFIE) bit
should be set in the MSCAN Receiver Interrupt Enable Register (CRIER). The
receive buffer full (successful message reception) event (RXF = 1 in the
CRFLG (MSCAN Receiver Flag Register)) will trigger a receive interrupt. The
receive interrupt handler would then copy the contents from the RxFG buffer
into random-access memory (RAM) and apply, as necessary, secondary
acceptance filters using software. Then, the receive interrupt handler would
release the RxFG buffer by clearing the RXF flag in the CRFLG register. The
RXF flag is cleared by writing a 1 to it while it is set.
The RXFIE bit is located in the CRIER register and the RXF bit is located in the
CRFLG register (see
RXFIE — Receiver Full Interrupt Enable
WUPIE
4. After the RxBG is copied into the RxFG buffer, the RXF flag in the
5. When both the RxBG and RxFG buffers contain correctly received and
Freescale Semiconductor, Inc.
Bit 7
For More Information On This Product,
Figure 17. MSCAN Receiver Interrupt Enable Register (CRIER)
CRFLG register is set (RXF = 1). This receive buffer full event will result
in a receive interrupt if the Receiver Full Interrupt Enable (RXFIE bit) of
the MSCAN Receiver Interrupt Enable Register (CRIER) is enabled
(RXFIE = 1). When the receive interrupt occurs, the user’s receive
handler has to read the received message from the RxFG and then clear
the RXF flag to 0 in order to acknowledge the interrupt and to release
the foreground buffer.
filtered messages, an overrun error occurs when a further message is
being received from the bus. The new message will be ignored and an
overrun error interrupt will occur if enabled. While in the overrun error
condition, the MSCAN will stay synchronized to the CAN bus and is able
to transmit messages but will ignore all incoming messages. To prevent
the overrun condition from happening, the receive handler software
must read the contents of the RxFG buffer and release it before the
RxBG buffer is filled with the next filtered message that is ready for
transfer to the RxFG buffer. For this reason, the receive interrupt
servicing must be extremely efficient and any subsequent software
filtering or other processing should be done outside the scope of the
receive interrupt service routine.
1 (set) =
0 (clear) = No interrupt will be generated from this event.
RWRNIE
Go to: www.freescale.com
6
A receiver buffer full (successful message reception) event
will result in a receive interrupt.
TWRNIE
Figure 17
5
RERRIE
and
4
Figure
TERRIE
3
18).
BOFFIE
2
OVRIE
1
MOTOROLA
RXFIE
Bit 0

Related parts for AN2283