Initial Settings - Renesas RX100 Series User Manual

32-bit mcu
Hide thumbs Also See for RX100 Series:
Table of Contents

Advertisement

RX13T Group
24.3.2

Initial Settings

Before starting data transmission and reception, initialize the RIIC according to the procedure in Figure 24.5 .
Set the ICCR1.ICE bit to 1 (internal reset) after setting the ICCR1.IICRST bit to 1 (RIIC reset) with the ICCR1.ICE bit
set to 0 (SCL0 and SDA0 pins in inactive state). This initializes the various flags and internal state of the ICSR1 register.
After that, set registers SARLy, SARUy, ICSER, ICMR1, ICBRH, and ICBRL (y = 0 to 2), and set the other registers as
necessary (for initial settings of the RIIC, see Figure 24.5 ). When the necessary register settings have been completed,
set the ICCR1.IICRST bit to 0 (releases the RIIC reset). This step is not necessary if initialization of the RIIC has already
been completed.
Set registers SARLy and SARUy.
Set ICMR1.CKS[2:0] bits and
Set registers ICMR2 and ICMR3
y = 0 to 2
Note 1. When the RIIC is used only in slave mode, set the ICBRL register to a value
longer than the data setup time.
Note 2. Set these registers as necessary.
Figure 24.5
Example of RIIC Initialization Flowchart
R01UH0822EJ0100 Rev.1.00
Jul 31, 2019
Initial settings
Set ICCR1.ICE bit to 0
Set ICCR1.IICRST bit to 1
Set ICCR1.ICE bit to 1
Set ICSER register
ICBRL/ICBRH registers
Set ICFER register
Set ICIER register
Set ICCR1.IICRST bit to 0
End
SCL0 and SDA0 pins not driven
RIIC reset
Internal reset, SCL0 and SDA0 pins in active state
Set slave address format and slave address
*
1
Set transfer bit rate
*
2
Set interrupt enable
Release from the internal reset state
2
24. I
C-bus Interface (RIICa)
Page 757 of 1041

Advertisement

Table of Contents
loading

Table of Contents