Добавил:
ИВТ (советую зайти в "Несортированное") Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
interfeysy_1 / ИДЗ_машинка / даташиты / esp32_technical_reference_manual_en.pdf
Скачиваний:
6
Добавлен:
26.01.2024
Размер:
9.62 Mб
Скачать

30 ULP Coprocessor (ULP)

Operand

Description - see Figure 30-16

Sub-addr

Slave register address

Data

Data to write in I2C_WR operation (not used in I2C_RD operation)

Low

High part of bit mask

High

Low part of bit mask

I2C Sel

Select register n of SENS_I2C_SLAVE_ADDRn (n: 0-7), which contains the I²C slave address.

R/W

I²C communication direction:

 

1

- I²C write

 

0

- I²C read

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

23

22

18

 

9

0

 

 

4’d2

 

High

 

Low

 

 

Addr

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 30­17. Instruction Type — REG_RD

 

Operand

Description - see Figure 30-17

 

 

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:

R0 = REG[Addr][High:Low]

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:

addr_ulp = (addr_dport - DR_REG_RTCCNTL_BASE)/4

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.

Espressif Systems

665

ESP32 TRM (Version 5.0)

Submit Documentation Feedback

Соседние файлы в папке даташиты