APPLICATION NOTE
RX600 Series
R01AN0339EU0203
Rev. 2.03
CAN Application Programming Interface
Mar 23, 2013
Introduction
This application note introduces the Renesas CAN Application Programming Interface and explains how to use it to
send, receive, and monitor data on the CAN bus. It also explains briefly some features of the CAN peripheral.
Bundled with this application note comes the CAN API driver source code files config_r_can_rapi.h, r_can_api.h, and
r_can_api.c. Note that there are alternative ways to write the driver functions. For example you may want to write your
own driver functions to tailor a specific behavior.
The RX CAN peripheral has 32 CAN mailboxes to read from and write to in order to communicate over CAN. These
mailboxes are message 'buffers' and will hold the CAN data frame until it is overwritten by another incoming frame, or
rewritten by the application. Each mailbox can be configured dynamically to transmit or receive. Usually, most are
configured to receive and a few to transmit.
A CAN API is also available from Renesas for the CAN equipped MCUs in the families R32C, M32C, M16C, R8C, for
SH RCAN-ET MCUs SH7286, SH7137, and for the SH7216. Most, if not all, CAN MCUs are available on Renesas
Starter Kit boards. Demonstration source code for the API is available for all these devices and runs the same demo
across all of these devices so that they can be connected and run together.
The term 'mailbox', or in some literature 'message box' or 'message buffer' refers to the physical location where
messages are stored inside the MCU's CAN peripheral. In this document we will use the term 'mailbox'.
Target Device
RX600 Series of MCUs with CAN.
R01AN0339EU0203 Rev. 2.03
Page 1 of 29
Mar 23, 2013