
CHAPTER 19 CAN CONTROLLER
Preliminary User’s Manual U16541EJ1V0UM
677
19.10.2 Transmit history list function
The transmit history list (THL) function records the number of the message buffer for each transmitted message
(data frame or remote frame). The THL consists of 7 elements and two pointers, the last out-message pointer (LOPT
pointer) with the corresponding C0LOPT register and the transmit history list get pointer (TGPT pointer) with the
corresponding C0TGPT register.
After the transition from INIT mode to one of the operational modes, the THL elements contain undefined values.
The LOPT pointer is utilized as a write pointer for message buffer numbers in the THL. When a data frame or
remote frame was transmitted successfully, a message buffer number is recorded to the THL element referenced by
the LOPT pointer. When the record to the THL is completed, the LOPT pointer is incremented automatically. In this
way, message buffer numbers of transmitted messages are recorded chronologically.
The TGPT pointer is utilized as a read pointer for message buffer numbers in the THL. The TGPT pointer points to
the first THL element that CPU has not read yet. A message buffer number is read by reading the C0TGPT register.
The TGPT pointer is incremented automatically anytime a message buffer number from the C0TGPT register is read.
The transmit history list pointer match bit (THPM bit) in the C0TGPT register is set (1) whenever the TGPT pointer
matches the LOPT pointer. The THPM bit setting (1) signals to the application software that no more message frames
have been sent. When a new message is sent, the LOPT pointer is incremented, the pointers do not match anymore,
and the THPM bit is cleared (0). In other words, numbers of message buffers that have not been read yet are stored
in the THL.
The transmit history list overflow bit (TOVF bit) is set (1) from the CAN module whenever the LOPT pointer points
to the TGPT pointer-1. In this state, the THL is completely filled with message buffer numbers that have not been read
yet. When further transmission occurs, the last entry in the THL is overwritten, and a record of the message buffer
number from where the last transmission was executed is stored. Therefore, after the TOVF bit is set (1), a recorded
message buffer number in the THL does not completely reflect the chronological order.
Figure 19-37. Transmit History List
MSG # 7
MSG # 2
MSG # 9
MSG # 6
1
2
3
4
5
6
7
Transmit history
list get pointer
(TGPT)
Transmit history
list get pointer
(TGPT)
Transmit history
list get pointer
(TGPT)
Transmit history
list get pointer
(TGPT)
Transmit history list (THL)
Last on-
message poi nter
MSG # 4
MSG # 3
MSG # 7
MSG # 2
MSG # 9
1
2
3
4
5
6
7
Message buffer #6
get (read)
1
2
3
4
5
6
7
MSG # 8
MSG # 4
MSG # 3
MSG # 7
MSG # 2
MSG # 9
MSG # 7
1
2
3
4
5
6
7
Message buffer #3
transmit
THL is in the full state
TOVF is set (1).
MSG # 8
MSG # 4
MSG # 3
MSG # 7
MSG # 2
MSG # 9
MSG # 3
(LOPT)
Last on-
message poi nter
(LOPT)
Last on-
message poi nter
(LOPT)
Last on-
message poi nter
(LOPT)