upd70f3402 Renesas Electronics Corporation., upd70f3402 Datasheet - Page 638

no-image

upd70f3402

Manufacturer Part Number
upd70f3402
Description
32-/16-bit Single-chip Microcontroller With Can Interface
Manufacturer
Renesas Electronics Corporation.
Datasheet
16.10.2 Transmit history list function
The transmit history list (THL) function records in the transmit history list the number of the transmit
message buffer in which each data frame or remote frame was received and stored. 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 CnT-
GPT 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 auto-
matically 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
(receive 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 mes-
sage buffer number recorded last is overwritten by the number of the message buffer that received and
stored the new message. 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 transmitted messages can be found by a CPU search applied to all transmit message buff-
ers 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.
Remark:
638
n = 0, 1
m = 0-31
Chapter 16 FCAN Controller
User’s Manual U16702EE3V2UD00

Related parts for upd70f3402