Skip to main content
Knowledgebase
Home
Renesas Singapore - Knowledgebase

r_riic Module Guide Resources

Last Updated:03/12/2018

Question:

Where can I find the references to module guide resources for the I2C Master HAL module on r_riic?

Answer:

Information on the module guide itself and the associated resources and known issues are available here.

Introduction

The I2C Master on RIIC HAL module is a high-level API for I2C Master applications and is implemented on r_riic. The I2C Master RIIC module uses the IIC peripheral on the Synergy MCU. Callbacks are provided for transmit complete and receive complete.

This module supports selecting the following features:

  • Support for I2C RIIC operations
    • I2C fast-mode (400 kHz)
    • I2C fast-mode plus (1 MHz on channel 0 of S7G2 and S5D9 MCU families)
  • Initialization of the module
  • Read from a slave device
  • Write to a slave device
  • Reset the I2C peripheral
  • Set the address of the slave device
  • Callback support
    • Transfer aborted
    • Transmit complete (number of bytes transmitted provided)
    • Receive complete (number of bytes received provided)

Module Guide

The I2C Master HAL module guide is targeted for SSP 1.2.0 and above and the SK-S7G2 Kit.

The most recent versions of the I2C Master HAL module guide application note, application project and import guide are available here.

 

Module Guide Errata

Section 1: Edit to Module Features

  • Support for I2C RIIC operations
    • Standard (up to 100 kHz)
    • I2C fast-mode (up to 400 kHz)
    • I2C fast-mode plus ( up to 1 MHz on channel 0 (SCL0-A, SDA0-A) of S7G2 and S5D9 MCU families)
  • Initialization of the RIIC module
  • Read from a slave device
  • Write to a slave device
  • Reset the I2C peripheral
  • Set the address of the slave device
  • Callback support
    • Transfer aborted
    • Transmit complete (number of bytes transmitted provided)
    • Receive complete (number of bytes received provided)

 

Section 3.1.1: Multiple Edits to Module Operational Notes

Interrupts

  • The RIIC error (EEI), receive buffer full (RXI), transmit buffer empty (TXI), and transmit end (TEI) interrupts for the selected channel used must be enabled in the properties of the selected device irrespective of whether the user wants to use callbacks.
  • Set equal priority levels for all the interrupts mentioned above. Setting the interrupts to different priority levels could result in improper operation.

IIC Rate Calculation

  • The I2C Master module calculates the internal baud-rate setting based on the configured transfer rate and passed to open. The closest possible baud-rate that can be achieved (less than or equal to the requested rate) at the current PCLKB settings is calculated and used.
  • If a valid clock rate could not be calculated, an error is returned.

Triggering DMAC/DTC with the IIC

  • DTC transfer support added by default in the configurator. This can be removed for CPU transfer cases. The DTC is configured in the module. No user configuration is required for this.
  • DMA transfer is not supported.

Triggering ELC Events with the IIC

  • The I2C Master module can trigger the start of other peripherals. See events and peripheral definitions in the ELC User Guide for further information.

Multiple Devices on the Bus

  • If multiple devices are connected on the same bus, only one device can be opened at a time.

Usage of Restart Condition

  • Passing value ‘true’ to the restart parameter of write/read API will generate restart condition after specified number (length) of bytes. Master will continue to hold the bus busy (low) without timeout so that current master can trigger next write/read API.

Multi-master Support

  • If multiple masters are connected on the same bus, the I2C Master is capable of detecting bus busy state before initiating the communication.

 

Section 3.1.1: Edit to to Module Limitations

  • Any of the supported IIC channel can be configured for either Master or Slave mode operation but not for both.
  • Refer to the most recent SSP Release Notes for any additional operational limitations for this module.

 

Module Guide Resources

The following application projects are available from the Renesas web site at the referenced url.

  • Getting Started with the Weather Panel Application - Application Project here.
  • SSP Project Template DK-S124 Out-of-Box Programming Guide here.

Known issues

  • Refer to the most recent SSP release notes for known issues, available here.

 

Suitable Products
SSP
  • Was this article helpful?