Figure 13-52: Example For Event Processing Of Elisa - NEC V850E/CA1 ATOMIC Preliminary User's Manual

32-/16-bit single-chip microcontroller
Table of Contents

Advertisement

(2)
Example
As an example for message event processing please look at the Figure 13-52 below. A message
requires event processing of ELISA. Therefore a set of commands for that event processing is defined
in the command list section, and the event pointer of the message contains the number of the first com-
mand ELISA should execute whenever the event processing for the message is requested.
Event Pointer
of message buffer m
MEVTm0
value
value: ?
MEVTm1
Don't care
MEVTm2
value: 0
MEVTm3
When ELISA detects a request for event processing of the message (ERQ flag = 1), ELISA loads the
event pointer of the message buffer first (in the figure above it is M_EVTm0). ELISA then adds the value
of M_EVTm3 to determine the first command where it starts its execution. Under normal conditions
M_EVTm3 is 0, so ELISA starts at the command given by the event pointer.
After execution of a command where an END flag is set, ELISA ends the processing by saving the data,
writing 0 to M_EVTm3 and clearing the ERQ flag of the message.
M_EVTm3 is basically desired for error recovery, but it can also be used by the application for special
conditions. Whenever an error occurs, ELISA does not write back a 0 to M_EVTm3, but the offset of the
command that caused the error. If for example the second command (in the figure above it is command
m+1) caused an error, ELISA writes a 1 to M_EVTm3.
By an Error Handling bit (EHDL bit in each command) the termination of an erroneous command can
be determined. It is selectable that the event request flag ERQ is not cleared at an error.
When ELISA recognises a further event request and starts the event processing for the message again,
it will not start its operation at the first command, but at the command which caused the error.
462
Chapter 13 FCAN Interface Function

Figure 13-52: Example for Event Processing of ELISA

Preliminary User's Manual U14913EE1V0UM00
COMMAND LIST
command 1
command 2
command 3
command
command 1 +1
command 2 +2
command with
"end" bit set
command n
command n+1
command n+2
list of commands
for event processing
of message
next sequence

Advertisement

Table of Contents
loading

Table of Contents