30 ULP Coprocessor (ULP)
Description
Communicate (read/write) with external I²C slave devices. Details on using the RTC I²C peripheral are provided
in section 30.6.
Note:
When working in master mode, RTC_I2C samples the SDA input on the negative edge of SCL.
30.4.13 REG_RD – Read from Peripheral Register
31
28
27
4'd2
Operand
Description - see Figure
Addr
Register address, expressed in 32-bit words
High
Register end bit number
Low
Register start bit number
Description
The instruction prompts a read of up to 16 bits from a peripheral register into a general-purpose register
R0:
In case of more than 16 bits being requested, i.e. High - Low + 1 > 16, then the instruction will return
[Low+15:Low].
Note:
• This instruction can access registers in RTC_CNTL, RTC_IO, SENS and RTC_I2C peripherals. The address
of the register, as seen from the ULP coprocessor, can be calculated from the address of the same
register on the DPORT bus, as follows:
• The addr_ulp is expressed in 32-bit words (not in bytes), and value 0 maps onto the
DR_REG_RTCCNTL_BASE (as seen from the main CPUs). Thus, 10 bits of address cover a 4096-byte
range of peripheral register space, including regions DR_REG_RTCCNTL_BASE, DR_REG_RTCIO_BASE,
DR_REG_SENS_BASE and DR_REG_RTC_I2C_BASE.
30.4.14 REG_WR – Write to Peripheral Register
31
28
27
4'd1
Operand
Description - see Figure
Addr
Register address, expressed in 32-bit words
High
Register end bit number
Low
Register start bit number
Data
Value to write, 8 bits
Description
Espressif Systems
23
22
18
High
Low
Figure 30-17. Instruction Type — REG_RD
30-17
R0 = REG[Addr][High:Low]
addr_ulp = (addr_dport - DR_REG_RTCCNTL_BASE)/4
23
22
18
High
Low
Figure 30-18. Instruction Type — REG_WR
30-18
Submit Documentation Feedback
9
17
10
9
Data
674
0
Addr
0
Addr
ESP32 TRM (Version 5.2)
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?