RX610 Group
5. I/O Registers
R01UH0032EJ0120 Rev.1.20
Page 103 of 1006
Feb 20, 2013
[Instruction examples]
•
Byte-size I/O registers
MOV.L
#SFR_ADDR, R1
MOV.B
#SFR_DATA, [R1]
CMP
[R1].UB, R1
;; Next process
•
Word-size I/O registers
MOV.L
#SFR_ADDR, R1
MOV.W
#SFR_DATA, [R1]
CMP
[R1].W, R1
;; Next process
•
Longword-size I/O registers
MOV.L
#SFR_ADDR, R1
MOV.L
#SFR_DATA, [R1]
CMP
[R1].L, R1
;; Next process
If multiple registers are written to and a subsequent instruction should be executed after the write operations are entirely
completed, only read the I/O register that was last written to and execute the operation using the value; it is not necessary
to read or execute operation for al the registers that were written to.
4. Number of Access Cycles to I/O Registers
The number of access cycles to I/O registers is obtained by following equation.*
Number of access cycles to I/O registers = Number of bus cycles for internal main bus 1 +
Number of divided cycles for clock synchroni
Number of bus cycles for internal peripheral bus 1 (or 2)
The number of bus cycles of internal peripheral bus 1 (or 2) differs according to the register to be accessed. For the
number of access cycles to each I/O register, see table 5.1, List of I/O Registers.
When peripheral functions connected to internal peripheral bus 2 or registers for the external bus control unit (except for
bus error related registers) are accessed, the number of divided cycles for clock synchronization is added.
Although the number of divided cycles for clock synchronization differs depending on the number of frequency ratio or
bus access timing, the sum of the number of bus cycles for internal main bus 1 and the number of divided cycles for
clock synchronization will be one PCLK (or BCLK) at a maximum. Therefore, one PCLK (or BCLK) is added to the
number of access cycles shown in table 5.1.
Note: * This applies to the number of cycles when the access from the CPU does not conflict with the instruction fetching
to the external memory or bus access from the different bus master (DMAC or DTC).