Transmit History List Function - NEC V850ES/F 3-L Series User Manual

32-bit single-chip microcontroller
Table of Contents

Advertisement

Chapter 18

18.10.2 Transmit history list function

612
The transmit history list (THL) function records in the transmit history list the
number of the transmit message buffer from which data or remote frames have
been were sent. The THL consists of storage elements equivalent to up to
seven messages, the last out-message pointer (LOPT) with the corresponding
CnLOPT register, and the transmit history list get pointer (TGPT) with the
corresponding CnTGPT register.
The THL is undefined immediately after the transition of the CAN module from
the initialization mode to one of the operation modes.
The CnLOPT register holds the contents of the THL element indicated by the
value of the LOPT pointer minus 1. By reading the CnLOPT register, therefore,
the number of the message buffer that transmitted a data frame or remote
frame first can be checked. The LOPT pointer is utilized as a write pointer that
indicates to what part of the THL a message buffer number is recorded. Any
time a data frame or remote frame is transmitted, the corresponding message
buffer number is recorded to the THL element indicated by the LOPT pointer.
Each time recording to the THL has been completed, the LOPT pointer is
automatically incremented. In this way, the number of the message buffer that
has received and stored a frame will be recorded chronologically.
The TGPT pointer is utilized as a read pointer that reads a recorded message
buffer number from the THL. This pointer indicates the first THL element that
the CPU has not yet read. By reading the CnTGPT register by software, the
number of a message buffer that has completed transmission can be read.
Each time a message buffer number is read from the CnTGPT register, the
TGPT pointer is automatically incremented.
If the value of the TGPT pointer matches the value of the LOPT pointer, the
THPM bit (transmit history list pointer match) of the CnTGPT register is set to
1. This indicates that no message buffer numbers that have not been read
remain in the THL. If a new message buffer number is recorded, the LOPT
pointer is incremented and because its value no longer matches the value of
the TGPT pointer, the THPM bit is cleared. In other words, the numbers of the
unread message buffers exist in the THL.
If the LOPT pointer is incremented and matches the value of the TGPT pointer
minus 1, the TOVF bit (transmit history list overflow) of the CnTGPT register is
set to 1. This indicates that the THL is full of message buffer numbers that
have not been read. If a new message is received and stored, the message
buffer number recorded last is overwritten by the message buffer number that
transmitted its message afterwards. In this case, after the TOVF bit has been
set (1), therefore, the recorded message buffer numbers in the THL do not
completely reflect the chronological order. However the other transmitted
messages can be found by a CPU search applied to all transmit message
buffers unless the CPU has not overwritten a transmit object in one of these
buffers beforehand. In total up to six transmission completions can occur
without overflowing the THL.
User's Manual U18743EE1V2UM00
CAN Controller (CAN)

Advertisement

Table of Contents
loading

Table of Contents