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

30 ULP Coprocessor (ULP)

The instruction loads the lower 16-bit half-word from memory with address Rsrc + offset into the destination register Rdst:

Rdst[15:0] = Mem[ Rsrc + Offset ][15:0]

Note:

This instruction can only access 32-bit memory words.

In any case, it is always the lower 16 bits of a memory word that are loaded. Differently put, it is not possible to read the upper 16 bits.

The ”Mem” loaded is the RTC_SLOW_MEM memory. Address 0, as seen by the ULP coprocessor, corresponds to address 0x50000000, as seen by the main CPUs.

30.4.4 JUMP – Jump to an Absolute Address

31

28

27

25

24

22

21

12

2

1

0

4’d8

3’b0

Type

 

 

 

Sel

ImmAddr Rdst

 

 

Figure 30­8. Instruction Type — JUMP

Operand

Description - see Figure 30-8

Rdst

Register R[0-3], address to jump to

ImmAddr

11-bit address, expressed in 32-bit words

Sel

Selects the address to jump to:

 

0

- jump to the address contained in ImmAddr

 

1

- jump to the address contained in Rdst

Type

Jump type:

 

0

- make an unconditional jump

 

1

- jump only if the last ALU operation has set the zero flag

 

2

- jump only if the last ALU operation has set the overflow flag

Description

The instruction prompts a jump to the specified address. The jump can be either unconditional or based on the ALU flag.

Note:

All jump addresses are expressed in 32-bit words.

30.4.5 JUMPR – Jump to a Relative Offset (Conditional upon R0)

31

28

27

25

24

4’d8

 

3’b1

Step

 

 

 

 

 

17 16 15

Cond

0

Threshold

Figure 30­9. Instruction Type — JUMPR

Espressif Systems

661

ESP32 TRM (Version 5.0)

Submit Documentation Feedback

30 ULP Coprocessor (ULP)

Operand

Description - see Figure 30-9

Step

Relative shift from current position, expressed in 32-bit words:

 

if Step[7] = 0 then PC = PC + Step[6:0]

 

if Step[7] = 1 then PC = PC - Step[6:0]

Threshold

Threshold value for condition (see Cond below) to jump

Cond

Condition to jump:

 

0 - jump if R0

< Threshold

 

1 - jump if R0

>= Threshold

Description

The instruction prompts a jump to a relative address, if the above-mentioned condition is true. The condition itself is the result of comparing the R0 register value and the Threshold value.

Note:

All jump addresses are expressed in 32-bit words.

30.4.6 JUMPS – Jump to a Relative Address (Conditional upon Stage Count Regis­ ter)

31

28

27

25

24

17

16

15

 

7

0

 

 

4’d8

3’d2

 

Step

Cond

 

 

Threshold

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 30­10. Instruction Type — JUMP

 

 

Operand

Description - see Figure 30-10

 

 

 

 

 

Step

Relative shift from current position, expressed in 32-bit words:

 

 

 

 

if Step[7] = 0, then PC = PC + Step[6:0]

 

 

 

 

 

 

 

if Step[7] = 1, then PC = PC - Step[6:0]

 

 

 

 

 

Threshold

Threshold value for condition (see Cond below) to jump

 

 

Cond

Condition of jump:

 

 

 

 

 

 

 

 

1X - jump if Stage_cnt <= Threshold

 

 

 

 

 

 

 

00 - jump if Stage_cnt < Threshold

 

 

 

 

 

 

 

01 - jump if Stage_cnt >= Threshold

 

 

 

 

 

Note:

A description of how to set the stage count register is provided in section 30.4.1.3.

All jump addresses are expressed in 32-bit words.

Description

The instruction prompts a jump to a relative address if the above-mentioned condition is true. The condition itself is the result of comparing the value of Stage_cnt (stage count register) and the Threshold value.

30.4.7 HALT – End the Program

31

28

0

4’d11

Figure 30­11. Instruction Type — HALT

Description

Espressif Systems

662

ESP32 TRM (Version 5.0)

Submit Documentation Feedback

30 ULP Coprocessor (ULP)

The instruction ends the operation of the processor and puts it into power-down mode.

Note:

After executing this instruction, the ULP coprocessor timer gets started.

30.4.8 WAKE – Wake up the Chip

31

28

27

25

4’d9 3’b0

Figure 30­12. Instruction Type — WAKE

0

1’b1

Description

This instruction sends an interrupt from the ULP coprocessor to the RTC controller.

If the SoC is in Deep-sleep mode, and the ULP wake-up is enabled, the above-mentioned interrupt will wake up the SoC.

If the SoC is not in Deep-sleep mode, and the ULP interrupt bit (RTC_CNTL_ULP_CP_INT_ENA) is set in register RTC_CNTL_INT_ENA_REG, a RTC interrupt will be triggered.

30.4.9 Sleep – Set the ULP Timer’s Wake­up Period

31

28

27

25

 

3

0

 

 

4’d9

3’b1

 

sleep_reg

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 30­13. Instruction Type — SLEEP

 

 

Operand

Description - see Figure 30-13

 

 

sleep_reg Selects one of five SENS_ULP_CP_SLEEP_CYCn_REG (n: 0-4) as the wake-up period

 

 

 

of the ULP coprocessor

 

 

Description

The instruction selects which one of the SENS_ULP_CP_SLEEP_CYCn_REG (n: 0-4) register values is to be used by the ULP timer as the wake-up period. By default, the value of SENS_ULP_CP_SLEEP_CYC0_REG is used.

30.4.10 WAIT – Wait for a Number of Cycles

31

28

15

0

 

 

4’d4

 

 

Cycles

 

 

 

 

 

 

 

 

 

Figure 30­14. Instruction Type — WAIT

 

Operand

Description - see Figure 30-14

 

Cycles

the number of cycles to wait between sleeps

 

Description

The instruction will delay the ULP coprocessor from getting into sleep for a certain number of Cycles.

Espressif Systems

663

ESP32 TRM (Version 5.0)

Submit Documentation Feedback

30 ULP Coprocessor (ULP)

30.4.11 ADC – Take Measurement with ADC

31

28

6

5

2

1

0

4’d5

Sel

Figure 30­15. Instruction Type — ADC

Sar Mux Rdst

Operand

Description - see Figure 30-15

Rdst

Destination Register R[0-3], results will be stored in this register.

Sel

Selected ADC: 0 = SAR ADC1, 1 = SAR ADC2, see Table 30-4.

Sar Mux SARADC Pad [Sar_Mux - 1] is enabled, see Table 30-4.

Table 30­4. Input Signals Measured Using the ADC Instruction

Pad Name/Signal/GPIO

Sar_Mux

Processed by /Sel

SENSOR_VP (GPIO36)

1

 

 

 

 

SENSOR_CAPP (GPIO37)

2

 

 

 

 

SENSOR_CAPN (GPIO38)

3

 

 

 

 

SENSOR_VN (GPIO39)

4

SAR ADC1/Sel = 0

 

 

32K_XP (GPIO33)

5

 

 

 

 

32K_XN (GPIO32)

6

 

 

 

 

VDET_1 (GPIO34)

7

 

 

 

 

VDET_2 (GPIO35)

8

 

 

 

 

GPIO4

1

 

 

 

 

GPIO0

2

 

 

 

 

GPIO2

3

 

 

 

 

MTDO (GPIO15)

4

 

 

 

 

MTCK (GPIO13)

5

SAR ADC2/Sel = 1

 

 

MTDI (GPIO12)

6

 

 

 

 

MTMS (GPIO14)

7

 

 

 

 

GPIO27

8

 

 

 

 

GPIO25

9

 

 

 

 

GPIO26

10

 

 

 

 

Description

The instruction prompts the taking of measurements with the use of ADC. Pads/signals available for ADC measurement are provided in Table 30-4.

30.4.12 I2C_RD/I2C_WR – Read/Write I²C

31

4’d3

2827

R/W

25

22

21

19

18

16

15

8

7

0

I2C Sel

 

High

 

Low

 

Data

 

Sub-addr

 

 

 

 

 

 

 

 

 

 

Figure 30­16. Instruction Type — I²C

Espressif Systems

664

ESP32 TRM (Version 5.0)

Submit Documentation Feedback

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