Espressif ESP32-S2 Programming Manual page 1499

Table of Contents

Advertisement

Chapter 4. API Guides
STAGE_INC –Increment stage count register
Syntax STAGE_INC Value
Operands
• Value –8 bits value
Cycles 2 cycles to execute, 4 cycles to fetch next instruction
Description The instruction increments stage count register by given value.
Examples:
1:
STAGE_INC
2:
//
Up counting loop example:
STAGE_RST
label:
STAGE_INC
NOP
JUMPS
STAGE_DEC –Decrement stage count register
Syntax STAGE_DEC Value
Operands
• Value –8 bits value
Cycles 2 cycles to execute, 4 cycles to fetch next instruction
Description The instruction decrements stage count register by given value.
Examples:
1:
STAGE_DEC
2:
//
Down counting loop exaple
STAGE_RST
STAGE_INC
label:
STAGE_DEC
NOP
JUMPS
HALT –End the program
Syntax HALT
Operands No operands
Cycles 2 cycles to execute
Description The instruction halts the ULP coprocessor and restarts ULP wakeup timer, if it is enabled.
Examples:
1:
HALT
//
WAKE –Wake up the chip
Syntax WAKE
Operands No operands
Cycles 2 cycles to execute, 4 cycles to fetch next instruction
Description The instruction sends an interrupt from ULP to RTC controller.
• If the SoC is in deep sleep mode, and ULP wakeup is enabled, this causes the SoC to wake up.
• If the SoC is not in deep sleep mode, and ULP interrupt bit (RTC_CNTL_ULP_CP_INT_ENA) is set
in RTC_CNTL_INT_ENA_REG register, RTC interrupt will be triggered.
Espressif Systems
10
//
stage_cnt
//
set
1
// stage_cnt++
//
do something
label, 16, LT
//
jump to label
10
//
stage_cnt
//
set
16
//
increment stage_cnt to
1
//
stage_cnt--;
//
do something
label, 0, GT
//
jump to label
Halt the coprocessor
1488
Submit Document Feedback
+=
10
stage_cnt to
0
if
stage_cnt
-=
10;
stage_cnt to
0
16
if
stage_cnt
<
16
>
0
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Table of Contents

Save PDF