Datasheet

V850ES/JG3-H, V850ES/JH3-H CHAPTER 20 CAN CONTROLLER
R01UH0042EJ0500 Rev.5.00 Page 984 of 1513
Aug 12, 2011
20.9.3 Receive history list function
The receive history list (RHL) function records in the receive history list the number of the receive message buffer in
which each data frame or remote frame was received and stored. The RHL consists of storage elements equivalent to up
to 23 messages, the last in-message pointer (LIPT) with the corresponding C0LIPT register and the receive history list get
pointer (RGPT) with the corresponding C0RGPT register.
The RHL is undefined immediately after the transition of the CAN module from the initialization mode to one of the
operation modes.
The C0LIPT register holds the contents of the RHL element indicated by the value of the LIPT pointer minus 1. By
reading the C0LIPT register, therefore, the number of the message buffer that received and stored a data frame or remote
frame first can be checked. The LIPT pointer is utilized as a write pointer that indicates to what part of the RHL a
message buffer number is recorded. Any time a data frame or remote frame is received and stored, the corresponding
message buffer number is recorded to the RHL element indicated by the LIPT pointer. Each time recording to the RHL
has been completed, the LIPT 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 RGPT pointer is utilized as a read pointer that reads a recorded message buffer number from the RHL. This
pointer indicates the first RHL element that the CPU has not read yet. By reading the C0RGPT register by software, the
number of a message buffer that has received and stored a data frame or remote frame can be read. Each time a
message buffer number is read from the C0RGPT register, the RGPT pointer is automatically incremented.
If the value of the RGPT pointer matches the value of the LIPT pointer, the C0RGPT.RHPM bit (receive history list
pointer match) is set to 1. This indicates that no message buffer number that has not been read remains in the RHL. If a
new message buffer number is recorded, the LIPT pointer is incremented and because its value no longer matches the
value of the RGPT pointer, the RHPM bit is cleared. In other words, the numbers of the unread message buffers exist in
the RHL.
If the LIPT pointer is incremented and matches the value of the RGPT pointer minus 1, the C0RGPT.ROVF bit (receive
history list overflow) is set to 1. This indicates that the RHL is full of numbers of message buffers that have not been read.
When further message reception and storing occur, the last recorded message buffer number is overwritten by the number
of the message buffer that received and stored the new message. After the ROVF bit has been set to 1, the recorded
message buffer numbers in the RHL do not completely reflect chronological order. However the messages themselves
are not lost and can be located by a CPU search in the message buffer memory with the help of the DN bit.
Caution Even if the receive history list overflows (C0RGPT.ROVF bit = 1), the receive history can be read until
no more history is left unread and the C0RGPT.RHPM bit is set (1). However, the ROVF bit is kept set
(1) (= overflow occurs) until cleared (0) by software. In this status, the RHPM bit is not cleared (0),
unless the ROVF bit is cleared (0), even if a new receive history is stored and written to the list. If
ROVF bit = 1 and RHPM bit = 1 and the receive history list overflows, therefore, the RHPM bit
indicates that no more history is left unread even if new history is received and stored.