Esp32-S3 Technical Reference Manual en PDF
Esp32-S3 Technical Reference Manual en PDF
Version 1.1
Espressif Systems
Copyright © 2022
www.espressif.com
About This Document
The ESP32S3 is targeted at developers working on low level software projects that use the ESP32-S3 SoC. It
describes the hardware modules listed below for the ESP32-S3 SoC and other products in ESP32-S3 series.
The modules detailed in this document provide an overview, list of features, hardware architecture details, any
necessary programming procedures, as well as register descriptions.
• Release Status at a Glance on the very next page is a minimal list of all chapters from where you can
directly jump to a specific chapter.
• Use the Bookmarks on the side bar to jump to any specific chapters or sections from anywhere in the
document. Note this PDF document is configured to automatically display Bookmarks when open, which
is necessary for an extensive document like this one. However, some PDF viewers or browsers ignore this
setting, so if you don’t see the Bookmarks by default, try one or more of the following methods:
– Download this document, and view it with your local PDF viewer;
– Set your PDF viewer to always automatically display the Bookmarks on the left side bar when open.
• Use the native Navigation function of your PDF viewer to navigate through the documents. Most PDF
viewers support to go Up, Down, Previous, Next, Back, Forward and Page with buttons, menu or hot
keys.
• You can also use the built-in GoBack button on the upper right corner on each and every page to go back
to the previous place before you click a link within the document. Note this feature may only work with
some Acrobat-specific PDF viewers (for example, Acrobat Reader and Adobe DC) and browsers with
built-in Acrobat-specific PDF viewers or extensions (for example, Firefox).
Release Status at a Glance
Note:
Check the link or the QR code to make sure that you use the latest version of this document:
https://www.espressif.com/documentation/esp32-s3_technical_reference_manual_en.pdf
Contents GoBack
Contents
27.5.1 I2Cmaster Writes to I2Cslave with a 7-bit Address in One Command Sequence 963
27.5.1.1 Introduction 963
27.5.1.2 Configuration Example 964
27.5.2 I2Cmaster Writes to I2Cslave with a 10-bit Address in One Command Sequence 965
27.5.2.1 Introduction 965
27.5.2.2 Configuration Example 965
27.5.3 I2Cmaster Writes to I2Cslave with Two 7-bit Addresses in One Command Sequence 966
27.5.3.1 Introduction 967
27.5.3.2 Configuration Example 967
27.5.4 I2Cmaster Writes to I2Cslave with a 7-bit Address in Multiple Command Sequences 968
27.5.4.1 Introduction 969
27.5.4.2 Configuration Example 970
27.5.5 I2Cmaster Reads I2Cslave with a 7-bit Address in One Command Sequence 971
27.5.5.1 Introduction 971
27.5.5.2 Configuration Example 972
27.5.6 I2Cmaster Reads I2Cslave with a 10-bit Address in One Command Sequence 973
27.5.6.1 Introduction 973
27.5.6.2 Configuration Example 974
27.5.7 I2Cmaster Reads I2Cslave with Two 7-bit Addresses in One Command Sequence 975
27.5.7.1 Introduction 975
27.5.7.2 Configuration Example 976
27.5.8 I2Cmaster Reads I2Cslave with a 7-bit Address in Multiple Command Sequences 977
27.5.8.1 Introduction 978
27.5.8.2 Configuration Example 979
27.6 Interrupts 980
27.7 Register Summary 982
27.8 Registers 984
Glossary 1468
Abbreviations for Peripherals 1468
Abbreviations Related to Registers 1468
Access Types for Registers 1470
List of Tables
1-1 Instruction Field Names and Descriptions 41
1-2 Register List of ESP32-S3 Extended Instruction Set 42
1-3 Data Format and Alignment 45
1-4 Extended Instruction List 48
1-5 Read Instructions 50
1-6 Write Instructions 51
1-7 Data Exchange Instructions 51
1-8 Vector Addition Instructions 52
1-9 Vector Multiplication Instructions 53
1-10 Vector Complex Multiplication Instructions 53
1-11 Vector Multiplication Accumulation Instructions 54
1-12 Vector and Scalar Multiplication Accumulation Instructions 56
1-13 Other Instructions 56
1-14 Comparison Instructions 56
1-15 Bitwise Logical Instructions 57
1-16 Shift Instructions 57
1-17 Butterfly Computation Instructions 58
1-18 Bit Reverse Instruction 58
1-19 Real Number FFT Instructions 59
1-20 GPIO Control Instructions 59
1-21 Five-Stage Pipeline of Xtensa Processor 61
1-22 Extended Instruction Pipeline Stages 62
2-1 Comparison of the Two Coprocessors 297
2-2 ALU Operations Among Registers 302
2-3 ALU Operations with Immediate Value 303
2-4 ALU Operations with Stage Count Register 303
2-5 Data Storage Type - Automatic Storage Mode 305
2-6 Data Storage - Manual Storage Mode 306
2-7 Input Signals Measured Using the ADC Instruction 310
2-8 Instruction Efficiency 312
2-9 ULP-RISC-V Interrupt Sources 313
2-10 ULP-RISC-V Interrupt Registers 314
2-11 ULP-RISC-V Interrupt List 316
2-12 Address Mapping 320
2-13 Description of Registers for Peripherals Accessible by ULP Coprocessors 320
3-1 Selecting Peripherals via Register Configuration 348
3-2 Descriptor Field Alignment Requirements for Accessing Internal RAM 351
3-3 Descriptor Field Alignment Requirements for Accessing External RAM 351
3-4 Relationship Between Configuration Register, Block Size and Alignment 352
4-1 Internal Memory Address Mapping 388
4-2 External Memory Address Mapping 390
4-3 Module/Peripheral Address Mapping 393
5-1 Parameters in eFuse BLOCK0 397
List of Figures
1-1 PIE Internal Structure (MAC) 37
1-2 EE.ZERO.QACC in Little-Endian Bit Order 39
1-3 EE.ZERO.QACC in Big-Endian Bit Order 39
1-4 EE.ZERO.QACC in Little-Endian Byte Order 39
1-5 EE.ZERO.QACC in Big-Enidan Byte Order 40
1-6 Interlock Caused by Instruction Operand Dependency 62
1-7 Hardware Resource Hazard 70
1-8 Control Hazard 71
2-1 ULP Coprocessor Overview 296
2-2 ULP Coprocessor Diagram 297
2-3 Programming Workflow 298
2-4 ULP Sleep and Wakeup Sequence 299
2-5 Control of ULP Program Execution 300
2-6 ULP-FSM Instruction Format 301
2-7 Instruction Type — ALU for Operations Among Registers 301
2-8 Instruction Type — ALU for Operations with Immediate Value 302
2-9 Instruction Type — ALU for Operations with Stage Count Register 303
2-10 Instruction Type - ST 303
2-11 Instruction Type - Offset in Automatic Storage Mode (ST-OFFSET) 304
2-12 Instruction Type - Data Storage in Automatic Storage Mode (ST-AUTO-DATA) 304
2-13 Data Structure of RTC_SLOW_MEM[Rdst + Offset] 305
2-14 Instruction Type - Data Storage in Manual Storage Mode 305
2-15 Instruction Type - LD 306
2-16 Instruction Type - JUMP 307
2-17 Instruction Type - JUMPR 307
2-18 Instruction Type - JUMPS 308
2-19 Instruction Type - HALT 309
2-20 Instruction Type - WAKE 309
2-21 Instruction Type - WAIT 309
2-22 Instruction Type - TSENS 310
2-23 Instruction Type - ADC 310
2-24 Instruction Type - REG_RD 311
2-25 Instruction Type - REG_WR 312
2-26 Standard R-type Instruction Format 314
2-27 Interrupt Instruction - getq rd, qs 314
2-28 Interrupt Instruction - setq qd,rs 315
2-29 Interrupt Instruction - retirq 315
2-30 Interrupt Instruction — Maskirq rd rs 315
2-31 I2C Read Operation 318
2-32 I2C Write Operation 319
3-1 Modules with GDMA Feature and GDMA Channels 345
3-2 GDMA Engine Architecture 346
3-3 Structure of a Linked List 347
1.1 Overview
The ESP32-S3 adds a series of extended instruction set in order to improve the operation efficiency of specific AI
and DSP (Digital Signal Processing) algorithms. This instruction set is designed from the TIE (Tensilica Instruction
Extension) language, and adds general-purpose registers with large bit width, various special registers and
processor ports. Based on the SIMD (Single Instruction Multiple Data) concept, this instruction set supports
8-bit, 16-bit, and 32-bit vector operations, which greatly increases data operation efficiency. In addition, the
arithmetic instructions, such as multiplication, shifting, and accumulation, can perform data operations and
transfer data at the same time, thus further increasing execution efficiency of a single instruction.
1.2 Features
The PIE (Processor Instruction Extensions) has the following features:
• 128-bit vector operations, e.g., multiplication, addition, subtraction, accumulation, shifting, comparison,
etc.
The internal structure of PIE for multiplication-accumulation (MAC) instructions overview could be described as
shown below:
The diagram above shows the data flow paths and PIE components.
1.3.2 ALU
Arithmetic logic unit (ALU) could work for 8-bit input data, as 8-bit ALU, for 16-bit input data, as 16-bit ALU, or
for 32-bit input data, as 32-bit ALU. 8-bit multiplication ALU contains 16 multipliers and is able to make up to 16
multiplications and accumulation in one instruction. With multiplication almost any other combinations of
arithmetic operation are possible. For example, FFT instructions include multiplication, addition, and subtraction
operations in one instruction. Also, ALU includes logic operations like AND, OR, shift, and so on.
The input for ALU operation comes from QR registers. The result of operations could be saved to the QR
registers or special accumulator registers (ACCX, QACC).
• Little-endian bit order: the instruction is encoded in bit order, with the least significant bit on the right.
• Big-endian bit order: the instruction is encoded in bit order, with the least significant bit on the left.
• Little-endian byte order: the instruction is encoded in byte order, with the least significant byte on the right.
• Big-endian byte order: the instruction is encoded in byte order, with the least significant byte on the left.
Among them, the instruction encoding bit sequences obtained using little-endian byte order and little-endian bit
order are identical. Taking the 24-bit instruction EE.ZERO.QACC as an example, Figure 1-2, Figure 1-3, Figure
1-4 and Figure 1-5 show the code of this instruction in little-endian bit order, big-endian bit order, little-endian
byte order and big-endian byte order, respectively.
Please note that all instructions and register descriptions appear in this chapter use little-endian bit order, which
means the least significant bit is stored in the lowest addresses.
Name Description
In-out type (used as input/output operand). Stores address
as information for read/write operations, which is updated after
such operations are completed.
In-out type. Temporarily stores operation results to the
a* 32-bit general-purpose registers
at EE.FFT.AMS.S16.ST.INCP instruction, which will be part of
the data to be written to memory.
In type (used as input operand). Stores data used to update
ad
address information.
av In type. Stores data to be written to memory.
In type. Stores data involved in arithmetic operations, e.g.,
ax,ay
shifting amounts, multipliers and etc.
Out type (used as output operand). Stores results of
au
instruction operations.
In type. Stores 128-bit data used for concatenation
qs
operations.
qa,qx,qy,qm In type. Stores data used for vector operations.
q* 128-bit general-purpose registers
qz Out type. Stores results of vector operations.
qu Out type. Stores data read from memory.
qv In type. Stores data to be written to memory.
32-bit general-purpose floating-point register. Stores
fu
floating-point data read from memory.
32-bit general-purpose floating-point register. Stores
fv
floating-point data to be written to memory.
1-bit immediate value ranging from 0 to 1. Used to select
sel2
signals.
2-bit immediate value ranging from 0 to 3. Used to select
sel4,upd4
signals.
3-bit immediate value ranging from 0 to 7. Used to select
sel8
signals.
4-bit immediate value ranging from 0 to 15. Used to select
sel16
signals.
1-bit immediate value ranging from 0 to 1. Represents
sar2
shifting numbers.
2-bit immediate value ranging from 0 to 3. Represents
sar4
shifting numbers.
4-bit immediate value ranging from 0 to 15. Represents
sar16
shifting numbers.
7-bit unsigned immediate value ranging from 0 to 127 with
imm1 an interval of 1. This is used to show the size of the
updated read/write operation address value.
Cont’d on next page
Some instructions have multiple operands with the same function. Those operands are distinguished by adding
numbers after field names. For example, the EE.LDF.128.IP instruction has four fu registers, fu0 ~ 3. They are
used to store 128-bit data read from memory.
When using general-purpose register as operands in instructions, you need to explicitly declare the number of the
assigned register. For example:
This instruction uses No.0 and No.1 QR registers as input vectors and stores the vector addition result in the
No.2 QR register.
AR
Each AR register operand in the instruction will occupy a 4-bit code length. You can select any of the 16 AR
registers as operands, and the 4-bit code value indicates the number to declare. The row ”a*” in table 1-1 lists
various purposes of AR registers in the extended instruction set, including address storage and data
storage.
FR
Each FR register operand in the instruction will occupy a 4-bit code length. You can select any of the 16 FR
registers as operands, and the 4-bit code value indicates the number to declare. In ESP32-S3 extended
instruction set, there are only read and write instructions for floating-point data. They are 4 times more efficient
than the 32-bit floating-point data R/W instructions that are native to the Xtensa processor, thanks to the 128-bit
access bandwidth.
QR
In order to improve the execution efficiency of the program, operands are usually stored in general-purpose
registers to save time spent in reading from memory. The AR registers native to Xtensa only have 32-bit width,
while ESP32-S3 can access 128-bit data at a time, so they can only use 1/4 bandwidth capacity of the existing
data bus. For this reason, ESP32-S3 has added eight 128-bit customized general-purpose registers, i.e., QR
registers. QR registers are mainly used to store the data acquired/used by the 128-bit data bus to read or write
memory, as well as to temporarily store the operation results generated from 128-bit data operations.
As the processor executes instructions, an individual QR register is treated as 16 8-bit or 8 16-bit or 4 32-bit
operands depending on the vector operation bit width defined by the instruction, thus enabling a single
instruction to perform operations on multiple operands.
Different from general-purpose registers, special registers are implicitly called in specific instructions. You do not
need to and cannot specify a certain special register when executing instructions. For example:
This vector multiplication instruction uses q0 and q1 general-purpose registers as inputs. During the internal
operation, the intermediate 32-bit multiplication result is shifted to the right, and then the lower 16-bit of the result
is retained to form a 128-bit output to q2. The shift amount in the process is determined by the value in the Shift
Amount Register (SAR) and this SAR register will not appear in the instruction operand list.
SAR
The Shift Amount Register (SAR) stores the shift value in bits. There are two types of instructions in ESP32-S3’s
extended instruction set that use SAR. One is the type of instructions to shift vector data, including EE.VSR.32
and EE.VSL.32. The former uses the lower 5 bits of SAR as the right-shift value, and the latter uses the lower 5
bits of SAR as the left-shift value. The other type is multiplication instructions, including EE.VMUL.*, EE.CMUL.*,
EE.FFT.AMS.* and EE.FFT.CMUL.*. This type of instructions uses the value in SAR as the value for the right shift
of the intermediate multiplication result, which determines the accuracy of the final result.
SAR_BYTE
The SAR_BYTE stores the shift value in bytes. This special register is designed to handle the non-aligned 128-bit
data (see Section 1.5.3). For vector arithmetic instructions, the data read or stored by extended instructions are
forced to be 16-byte aligned, but in practice, there is no guarantee that the data addresses used are always
16-byte aligned.
EE.LD.128.USAR.IP and EE.LD.128.USAR.XP instructions write the lower 4-bit values of the memory access
register that represent non-aligned data to SAR_BYTE while reading 128-bit data from memory.
There are two types of instruction in ESP32-S3’s extended instruction set that use SAR_BYTE. One is dedicated
to handling non-aligned data in QR registers, including EE.SRCQ.* and EE.SRC.Q*. This type of instruction will
read two 16-byte data from two aligned addresses, before and after the non-aligned address, put them together,
and then shift it by the byte size of SAR_BYTE to get a 128-bit data from the non-aligned address. The other
type of instruction handles non-aligned data while executing arithmetic operations, which usually has a suffix of
”.QUP”.
ACCX
Multiplier-accumulator. Instructions such as EE.VMULAS.*.ACCX* and EE.SRS.ACCX use this register during
operations. The former uses ACCX to accumulate all vector multiplication results of two QR registers, and the
latter right shifts the ACCX register.
QACC_H,QACC_L
FFT_BIT_WIDTH
This special register is dedicated to the EE.BITREV instruction. The value inside this register is used to indicate
the operating mode of EE.BITREV. Its range is 0 ~ 7, indicating 3-bit ~ 10-bit operating mode respectively. For
more details, please refer to instruction EE.BITREV.
UA_STATE
This special register is dedicated to the EE.FFT.AMS.S16.LD.INCP.UAUP instruction. This register is used to
store the non-aligned 128-bit data read from memory. Next time when this instruction is called, the data in this
register is concatenated to the newly read non-aligned data and then the result is shifted to obtain the 128-bit
aligned data.
1.5.2.1 GPIO_OUT
An 8-bit processor output interface. Firstly, configure the 8-bit port signals to specified pins via GPIO Matrix. For
core0, their names are pro_alonegpio_out0~7. For core1, their names are core1_gpio_out0~7. Then you can set
certain bits of GPIO_OUT to 1 via instructions EE.WR_MASK_GPIO_OUT and EE.SET_BIT_GPIO_OUT, or set
certain bits to 0 via instruction EE.CLR_BIT_GPIO_OUT, so as to pull certain pins to high level or low level. Using
this method, you can get faster response than pulling pins through register configurations.
1.5.2.2 GPIO_IN
An 8-bit processor input interface. Firstly, configure the 8-bit port signals to specified pins via GPIO Matrix. For
core0, their names are pro_alonegpio_in0~7. For core1, their names are core1_gpio_in0~7. Then you can read
the eight GPIO pin levels and store them to the AR register through instruction EE.GET_GPIO_IN. Using this
method, you can get and handle the level changes on GPIO pins faster than reading registers to get pin level
status.
The table 1-3 lists bit length and alignment information for common data format (’x’ indicates that the bit is either
0 and 1). The Xtensa processor uses byte as the smallest unit for addresses stored in memory in all data formats.
And little-endian byte order is used, with byte 0 stored in the lowest bit (the right side), as shown in Figure
1-4.
However, if data is stored in memory at a non-aligned address, direct access to this address may cause it being
split into two accesses, which in turn affects the performance of the code. For example, if you expect to read a
16-byte data from memory, as shown in Table 1-3, the data is stored in memory at 0000 when the data is
aligned. But actually the data is not aligned, so the low nibble of its address may be any one between 0000 ~
1111 (binary). Assuming the lowest bit of its address is 0_0100, the processor will split the one-time access to
this data into two accesses, i.e., to 0_0000 and 1_0000 respectively. The processor then put together the
obtained two 16-byte data to get the required 16-byte data.
To avoid performance degradation caused by the above non-aligned access operations, all access addresses in
the extended instruction set are forced to be aligned, i.e., the lowest bits will be replaced by 0. For example, if a
read operation is initiated for 128-bit data at 0x3fc8_0024, the lowest 4-bit of this access address will be forced
to be set to 0. Eventually, the 128-bit data stored at 0x3fc8_0020 will be read. Similarly, the lowest 3-bit of the
access address for 64-bit data will be set to 0; the lowest 2-bit of the access address for 32-bit data will be set to
0; the lowest 1-bit of the access address for 16-bit data will be set to 0.
The above design requires aligned addresses of the access operations initiated. Otherwise, the data read will not
be what you expected. In application code, you need to explicitly declare the alignment of the variable or array in
memory. 16-byte alignment can meet the needs of most application scenarios.
The aligned(16) parameter declares that the variable is stored in a 16-byte aligned memory address. You can
also request a data space with its starting address 16-byte aligned via heap_caps_aligned_alloc.
Since the memory address of the data involved in some operations is uncertain in specific application scenarios,
this extended instruction set provides a special register SAR_BYTE and related instructions such as
EE.LD.128.USAR.* and EE.SRC.*, to handle non-aligned data.
Assume that the 128-bit non-aligned data address is stored in the general-purpose register a8. This 128-bit data
can be read into the specified QR register (q2 in the following example) by the following code:
EE.LD.128.U SAR.IP q0, a8, 16
EE.V LD.128.IP q1, a8, 16
EE.SRC.Q q2, q0, q1
In the design of the ESP32-S3’s instruction extensions, there are two ways to handle data overflow, namely
taking saturation and truncating the least significant bit. The former controls the calculation result according the
range of values that can be stored in the result register. If the result exceeds the maximum value of the result
register, take the maximum value; if the result is smaller than the minimum value of the result register, take the
minimum value. This approach will be explicitly indicated in the instruction descriptions. For example, the
EE.VADDS.* instructions perform saturation to the results of addition operations. Regarding the data overflow
handling for more instructions of their internal calculation results, the wraparound approach is used, i.e., only the
lower bit of the result that is consistent with the bit width of the result register will be retained and stored in the
result register.
Please note that for instructions that do not mention saturation handling method, the wraparound approach will
be used.
Reference
Instruction Type Instruction1
Section
EE.VLD.128.[XP/IP]
EE.VLD.[H/L].64.[XP/IP]
EE.VLDBC.[8/16/32].[-/XP/IP]
EE.VLDHBC.16.INCP
EE.LDF.[64/128].[XP/IP]
Read instructions EE.LD.128.USAR.[XP/IP] 1.6.1
EE.LDQA.[U/S][8/16].128.[XP/IP]
EE.LD.QACC_[H/L].[H.32/L.128].IP
EE.LD.ACCX.IP
EE.LD.UA_STATE.IP
EE.LDXQ.32
EE.VST.128.[XP/IP]
EE.VST.[H/L].64.[XP/IP]
EE.STF.[64/128].[XP/IP]
Write instructions EE.ST.QACC_[H/L].[H.32/L.128].IP 1.6.2
EE.ST.ACCX.IP
EE.ST.UA_STATE.IP
EE.STXQ.32
EE.VADDS.S[8/16/32].[-/LD.INCP/ST.INCP]
EE.VSUBS.S[8/16/32].[-/LD.INCP/ST.INCP]
EE.VMUL.[U/S][8/16].[-/LD.INCP/ST.INCP]
EE.CMUL.S16.[-/LD.INCP/ST.INCP]
EE.VMULAS.[U/S][8/16].ACCX.[-/LD.IP/LD.XP]
Arithmetic instructions EE.VMULAS.[U/S][8/16].QACC.[-/LD.IP/LD.XP/LDBC.INCP] 1.6.4
EE.VMULAS.[U/S][8/16].ACCX.[LD.IP/LD.XP].QUP
EE.VMULAS.[U/S][8/16].QACC.[LD.IP/LD.XP/LDBC.INCP].QUP
EE.VSMULAS.S[8/16].QACC.[-/LD.INCP]
EE.SRCMB.S[8/16].QACC
EE.SRS.ACCX
EE.VRELU.S[8/16]
EE.VPRELU.S[8/16]
EE.VMAX.S[8/16/32].[-/LD.INCP/ST.INCP]
Comparison instructions EE.VMIN.S[8/16/32].[-/LD.INCP/ST.INCP] 1.6.5
EE.VCMP.[EQ/LT/GT].S[8/16/32]
EE.ORQ
EE.XORQ
Bitwise logic instructions 1.6.6
EE.ANDQ
EE.NOTQ
Con’t on next page
EE.FFT.AMS.S16.[LD.INCP.UAUP/LD.INCP/LD.R32.DECP/ST.INCP]
EE.FFT.VST.R32.DECP
EE.WR_MASK_GPIO_OUT
EE.SET_BIT_GPIO_OUT
GPIO control instructions 1.6.9
EE.CLR_BIT_GPIO_OUT
EE.GET_GPIO_IN
RSR.*
WSR.*
Processor control instructions XSR.* 1.6.10
RUR.*
WUR.*
1
For detailed information of these instructions, please refer to Section 1.8.
Since access to non-aligned addresses will cause slower response, all virtual addresses issued by read
instructions in the extended instruction set are forced to be aligned according to data formats. Depending on the
size of the access data format, corresponding length of data will be returned by memory as 1-byte, 2-byte,
4-byte, 8-byte or 16-byte. When the data read after forced alignment is not as expected, the desired data can be
extracted from multiple QR registers using instructions such as EE.SRC.Q.
The table below briefly describes the access operations performed by read instructions. For detailed information
about read instructions, please see Section 1.8.
Instructions Description
Read the 16-byte data, then add the value stored in the AR register to the access
EE.VLD.128.XP
address.
EE.VLD.128.IP Read the 16-byte data, then add the immediate value to the access address.
Read the 8-byte data, then add the value stored in the AR register to the access
EE.VLD.[H/L].64.XP
address.
EE.VLD.[H/L].64.IP Read the 8-byte data, then add the immediate value to the access address.
EE.VLDBC.[8/16/32] Read the 1-byte/2-byte/4-byte data.
Read the 1-byte/2-byte/4-byte data, then add the value stored in the AR register
EE.VLDBC.[8/16/32].XP
to the access address.
Read the 1-byte/2-byte/4-byte data, then add the immediate value to the access
EE.VLDBC.[8/16/32].IP
address.
EE.VLDHBC.16.INCP Read the 16-byte data, then add 16 to the access address.
Read the 8-byte/16-byte data, then add the value stored in the AR register to the
EE.LDF.[64/128].XP
access address.
Read the 8-byte/16-byte data, then add the immediate value to the access ad-
EE.LDF.[64/128].IP
dress.
Read the 16-byte data, then add the value stored in the AR register to the access
EE.LD.128.USAR.XP
address.
EE.LD.128.USAR.IP Read the 16-byte data, then add the immediate value to the access address.
Read the 16-byte data and slice it by 1-byte, and zero-extend it to 20-bit data,
EE.LDQA.U8.128.[XP/IP] which then will be written to register QACC_H and QACC_L, and finally add the
value stored in the AR register or the immediate value to the access address.
Read the 16-byte data and slice it by 2-byte, and zero-extend it to 40-bit data,
EE.LDQA.U16.128.XP which then will be written to register QACC_H and QACC_L, and finally add the
value stored in the AR register or the immediate value to the access address.
Read the 16-byte data and slice it by 1-byte, then sign-extend it to 20-bit data,
EE.LDQA.S8.128.XP which then will be written to register QACC_H and QACC_L, and finally add the
value stored in the AR register or the immediate value to the access address.
Read the 16-byte data and slice it by 1-byte, then sign-extend it to 40-bit data,
EE.LDQA.S16.128.XP which then will be written to register QACC_H and QACC_L, and finally add the
value stored in the AR register or the immediate value to the access address.
EE.LD.QACC_[H/L].H.32.IP Read the 4-byte data, then add the immediate value to the access address.
EE.LD.QACC_[H/L].L.128.IP Read the 16-byte data, then add the immediate value to the access address.
EE.LD.ACCX.IP Read the 8-byte data, then add the immediate value to the access address.
EE.LD.UA_STATE.IP Read the 16-byte data, then add the immediate value to the access address.
EE.LDXQ.32 Update access address first, then read the 4-byte data.
Since access to non-aligned addresses will cause slower response, all virtual addresses issued by write
instructions in the extended instruction set are forced to be aligned according to data format. Depending on the
size of the access data format, corresponding length of data will be written to memory as 1-byte, 2-byte, 4-byte,
8-byte or 16-byte. When the data length to be written to memory is less than the access bit length, it is
necessary to perform zero extension or sign extension on this data.
The table below briefly describes the access operations performed by write instructions. For detailed information,
please refer to Section 1.8.
Instructions Description
Write the 16-byte data to memory, then add the value stored in the AR
EE.VST.128.XP
register to the access address.
Write the 16-byte data to memory, then add the immediate value to the
EE.VST.128.IP
access address.
Write the 8-byte data to memory, then add the value stored in the AR
EE.VST.[H/L].64.XP
register to the access address.
Write the 8-byte data to memory, then add the immediate value to the
EE.VST.[H/L].64.IP
access address.
Write the 8-byte/16-byte data to memory, then add the value stored in the
EE.STF.[64/128].XP
AR register to the access address.
Write the 8-byte/16-byte data to memory, then add the immediate value
EE.STF.[64/128].IP
to the access address.
Write the 4-byte data to memory, then add the immediate value to the
EE.ST.QACC_[H/L].H.32.IP
access address.
Write the 16-byte data to memory, then add the immediate value to the
EE.ST.QACC_[H/L].L.128.IP
access address.
Zero-extend the value in the ACCX register to 8-byte data and write it to
EE.ST.ACCX.IP
memory, then add the immediate value to the access address.
Write the 16-byte data to memory, then add the immediate value to the
EE.ST.UA_STATE.IP
access address.
EE.STXQ.32 Update the access address first, then write the 4-byte data to memory.
For detailed information about data exchange instructions, please refer to Section 1.8.
Instructions Description
EE.MOVI.32.A Assign a piece of 32-bit data from the QR register to the AR register.
Instructions Description
Assign the data stored in the AR register to a piece of 32-bit data space
EE.MOVI.32.Q
in the QR register.
EE.VZIP.[8/16/32] Encoding the two QR registers in 1-byte/2-byte/4-byte unit.
EE.VUNZIP.[8/16/32] Decoding the two QR registers in 1-byte/2-byte/4-byte unit.
EE.ZERO.Q Clear a specified QR register.
EE.ZERO.QACC Clear QACC_H and QACC_L registers.
EE.ZERO.ACCX Clear a specified ACCX register.
Slice the QR register by 1-byte, and sign-extend it to 20-bit data, then
EE.MOV.S8.QACC
assign this value to QACC_H and QACC_L registers.
Slice the QR register by 2-byte, and sign-extend it to 40-bit data, then
EE.MOV.S16.QACC
assign this value to QACC_H and QACC_L registers.
Slice the QR register by 1-byte, and zero-extend it to 20-bit, then assign
EE.MOV.U8.QACC
this value to QACC_H and QACC_L registers.
Slice the QR register by 2-byte, and zero-extend it to 40-bit data, then
EE.MOV.U16.QACC
assign this value to QACC_H and QACC_L registers.
ESP32-S3 provides vector addition and subtraction instructions for data in 1-byte, 2-byte and 4-byte
units.
Considering that the input and output operands required for vector operations are stored in memory, in order to
reduce extra operations as reading memory and to improve the speed of code execution, vector addition
instructions are designed to perform the addition and the 16-byte access at the same time, and the value in the
address register is increased by 16 after the access, thus directly pointing to the next continuous 16-byte
memory address. You can select the appropriate instruction according to the actual algorithm needs.
In addition, vector addition instructions also saturate the result of addition and subtraction to ensure the accuracy
of arithmetic operations.
Instructions Description
EE.VADDS.S[8/16/32] Perform vector addition operation on 1-byte/2-byte/4-byte data.
Perform vector addition operation on 1-byte/2-byte/4-byte data,
EE.VADDS.S[8/16/32].LD.INCP
and read 16-byte data from memory at the same time.
Perform vector addition operation on 1-byte/2-byte/4-byte data,
EE.VADDS.S[8/16/32].ST.INCP
and write 16-byte data to memory at the same time.
EE.VSUBS.S[8/16/32] Perform vector subtraction operation on 1-byte/2-byte/4-byte data.
Perform vector subtraction operation on 1-byte/2-byte/4-byte data,
EE.VSUBS.S[8/16/32].LD.INCP
and read 16-byte data from memory at the same time.
Instructions Description
Perform vector subtraction operation on 1-byte/2-byte/4-byte data,
EE.VSUBS.S[8/16/32].ST.INCP
and write 16-byte data to memory at the same time.
ESP32-S3 provides vector multiplication instructions for data in 1-byte and 2-byte units, and supports unsigned
and signed vector multiplication.
Considering that the input and output operands required for vector operations are stored in memory, in order to
reduce extra operations as reading memory and improve the speed of code execution, vector multiplication
instructions are designed to perform the multiplication and access 16 bytes at the same time, and the access
address is increased by 16 after the access, thus directly pointing to the next 16-byte memory address. You can
select the appropriate instruction according to the actual algorithm needs.
Instructions Description
EE.VMUL.U[8/16] Perform vector multiplication operation on unsigned 1-byte/2-byte data.
EE.VMUL.S[8/16] Perform vector multiplication operation on signed 1-byte/2-byte data.
Perform vector multiplication operation on unsigned 1-byte/2-byte data,
EE.VMUL.U[8/16].LD.INCP
and read 16-byte data from memory at the same time.
Perform vector multiplication operation on signed 1-byte/2-byte data, and
EE.VMUL.S[8/16].LD.INCP
read 16-byte data from memory at the same time.
Perform vector multiplication operation on unsigned 1-byte/2-byte data,
EE.VMUL.U[8/16].ST.INCP
and write 16-byte data to memory at the same time.
Perform vector multiplication operation on signed 1-byte/2-byte data, and
EE.VMUL.S[8/16].ST.INCP
write 16-byte data to memory at the same time.
ESP32-S3 provides vector complex multiplication instructions for data in 2-byte unit. The instruction operands
are executed as signed data.
Considering that the input and output operands required for vector operations are stored in memory, in order to
reduce extra operations as reading memory and improve the speed of code execution, vector complex
multiplication instructions are designed to perform the multiplication and access 16 bytes at the same time, and
the access address is increased by 16 after the access, thus directly pointing to the next 16-byte memory
address. You can select the appropriate instruction according to the actual algorithm needs.
Instructions Description
EE.CMUL.S16 Perform vector complex multiplication operation to 2-byte data.
Perform vector complex multiplication operation to 2-byte data, and
EE.CMUL.S16.LD.INCP
read 16-byte data from memory at the same time.
Perform vector complex multiplication operation to 2-byte data, and
EE.CMUL.S16.ST.INCP
write 16-byte data to memory at the same time.
ESP32-S3 provides two types of vector multiplication accumulation instructions: one is based on the ACCX
register, accumulating multiple vector multiplication results to a 40-bit ACCX register; and the other is based on
QACC_H and QACC_L registers, accumulating vector multiplication results to the corresponding bit segments of
QACC_H and QACC_L registers respectively. Both types of above-mentioned instructions support multiplication
accumulation on 1-byte and 2-byte segments.
In order to reduce extra operations as reading memory and improve the speed of code execution, vector
multiplication accumulation instructions are designed to perform the multiplication accumulation and access 16
bytes at the same time, and the access address is increased by the value in the AR register or by the immediate
value after the access.
In addition, instructions with the ”QUP” suffix in the vector multiplication accumulation instructions also support
extracting 16-byte aligned data from the unaligned address.
Instructions Description
Perform vector multiplication accumulation to signed/un-
EE.VMULAS.[U/S][8/16].ACCX signed data in 1-byte/2-byte segment, and store the result
to the ACCX register temporarily.
Perform vector multiplication accumulation to signed/un-
signed data in 1-byte/2-byte segment, and store the result to
EE.VMULAS.[U/S][8/16].ACCX.LD.IP
the ACCX register temporarily, then read 16-byte data from
memory. Add immediate to address register.
Perform vector multiplication accumulation to signed/un-
signed data in 1-byte/2-byte segment, and store the result to
EE.VMULAS.[U/S][8/16].ACCX.LD.XP
the ACCX register temporarily, then read 16-byte data from
memory. Add the value of AR register to address register.
Perform vector multiplication accumulation to signed/un-
signed data in 1-byte/2-byte segment, and store the result to
EE.VMULAS.[U/S][8/16].ACCX.LD.IP.QUP the ACCX register temporarily. Then read 16-byte data from
memory and output a 16-byte aligned data. Add immediate
to address register.
Perform vector multiplication accumulation to signed/un-
signed data in 1-byte/2-byte segment, and store the result to
EE.VMULAS.[U/S][8/16].ACCX.LD.XP.QUP the ACCX register temporarily. Then read 16-byte data from
memory and output a 16-byte aligned data. Add the value
of AR register to address register.
Perform vector multiplication operation on signed/unsigned
data in 1-byte/2-byte segment, and accumulate the results
EE.VMULAS.[U/S][8/16].QACC
to corresponding bit segments in QACC_H and QACC_L
registers.
Instructions Description
Perform vector multiplication operation on signed/unsigned
data in 1-byte/2-byte segment, and accumulate the results
EE.VMULAS.[U/S][8/16].QACC.LD.IP to corresponding bit segments in QACC_H and QACC_L
registers, then read 16-byte data from memory. Add imme-
diate to address register.
Perform vector multiplication operation on signed/unsigned
data in 1-byte/2-byte segment, and accumulate the results
EE.VMULAS.[U/S][8/16].QACC.LD.XP to corresponding bit segments in QACC_H and QACC_L
registers, then read 16-byte data from memory. Add the
value of AR register to address register.
Perform vector multiplication operation on signed/unsigned
data in 1-byte/2-byte segment, and accumulate the results
to corresponding bit segments in QACC_H and QACC_L
EE.VMULAS.[U/S][8/16].QACC.LDBC.INCP
registers. Then read 1-byte/2-byte data from memory and
broadcast it to the 128-bit QR register. Add 16 to address
register.
Perform vector multiplication operation on signed/unsigned
data in 1-byte/2-byte segment, and accumulate the results
to the corresponding bit segments in QACC_H and QACC_L
EE.VMULAS.[U/S][8/16].QACC.LD.IP.QUP
registers. At the same time, read 16-byte data from mem-
ory and output a 16-byte aligned data. Add immediate to
address register.
Perform vector multiplication operation on signed/unsigned
data in 1-byte/2-byte segment, and accumulate the results
to the corresponding bit segments in QACC_H and QACC_L
EE.VMULAS.[U/S][8/16].QACC.LD.XP.QUP
registers. At the same time, read 16-byte data from mem-
ory and output a 16-byte aligned data. Add the value of AR
register to address register.
Perform vector multiplication operation on signed/unsigned
data in 1-byte/2-byte segment, and accumulate the results
to the corresponding bit segments in QACC_H and QACC_L
EE.VMULAS.[U/S][8/16].QACC.LDBC.INCP.QUP
registers. At the same time, read 1-byte/2-byte data from
memory and broadcast it to the 128-bit QR register, then
output a 16-byte aligned data. Add 16 to address register.
The function of this type of instructions is similar to that of the vector multiplication accumulation instructions
based on QACC_H and QACC_L registers, except that one of the binocular operands is a vector and the other is
a scalar. It also contains instructions that can execute access operation while vector operations are
performed.
Instructions Description
Perform vector and scalar multiplication accumulation on signed
EE.VSMULAS.S[8/16].QACC
data in 1-byte/2-byte segment.
Perform vector and scalar multiplication accumulation on signed
EE.VSMULAS.S[8/16].QACC.LD.INCP data in 1-byte/2-byte segment, and read 16-byte data from mem-
ory at the same time. Add 16 to address register.
Other Instructions
This section contains instructions that perform arithmetic right-shifting on multiplication accumulation results in
QACC_H, QACC_L and ACCX. You can set the shifting value to obtain the multiplication accumulation results
within the expected accuracy range.
Instructions Description
Perform signed right-shifting on data in QACC_H and QACC_L registers
EE.SRCMB.S[8/16].QACC
in segment unit.
EE.SRS.ACCX Perform signed right-shifting on data in the ACCX register.
EE.VRELU.S[8/16] Perform vector and scalar multiplication based on enabling conditions.
EE.VPRELU.S[8/16] Perform vector-to-vector multiplication based on enabling conditions.
Considering that the input and output operands required for vector operations are stored in memory, in order to
reduce extra operations as reading memory and improve the speed of code execution, access instructions to
16-byte addresses are performed at the same time as vector operations, and the access address is increased by
16 after the access, thus directly pointing to the next 16-byte memory address. You can select the appropriate
instruction according to the actual algorithm needs.
Instructions Description
EE.VMAX.S[8/16/32] Take the larger value between the two 1-byte/2-byte/4-byte values.
Take the larger value between the two 1-byte/2-byte/4-byte values, and
EE.VMAX.S[8/16/32].LD.INCP
read 16-byte data from memory at the same time.
Take the larger value between the two 1-byte/2-byte/4-byte values, and
EE.VMAX.S[8/16/32].ST.INCP
write 16-byte data to memory at the same time.
Instructions Description
EE.VMIN.S[8/16/32] Take the smaller value between the two 1-byte/2-byte/4-byte values.
Take the smaller value between the two 1-byte/2-byte/4-byte values, and
EE.VMIN.S[8/16/32].LD.INCP
read 16-byte data from memory at the same time.
Take the smaller value between the two 1-byte/2-byte/4-byte values, and
EE.VMIN.S[8/16/32].ST.INCP
write 16-byte data to memory at the same time.
Compare two 1-byte/2-byte/4-byte values, set all bits to 1 when the two
EE.VCMP.EQ.S[8/16/32]
values are equal, or set all bits to 0 when they are not equal.
Compare two 1-byte/2-byte/4-byte values, set all bits to 1 when the former
EE.VCMP.LT.S[8/16/32]
value is smaller than the latter one, or set them to 0 otherwise.
Compare two 1-byte/2-byte/4-byte values, set all bits to 1 when the former
EE.VCMP.GT.S[8/16/32]
value is larger than the latter one, or set them to 0 otherwise.
Instructions Description
EE.ORQ Bitwise logical OR qa = qx|qy
EE.XORQ Bitwise logical XOR qa = qx ^ qy
EE.ANDQ Bitwise logical AND qa = qx&qy
EE.NOTQ Bitwise NOTqa = ~qx
All the shift instructions mentioned above are performed based on signed bits.
Instructions Description
Perform logical right-shift on the spliced 16-byte data, and the shift value
EE.SRC.Q
is determined by the SAR_BYTE register.
Perform logical right-shift on the spliced 16-byte data, and the shift value
EE.SRC.Q.QUP is determined by the SAR_BYTE register. Meanwhile, the higher 8-byte
data is saved.
Perform logical right-shift on the spliced 16-byte data, and the shift value
EE.SRC.Q.LD.XP is determined by the SAR_BYTE register. At the same time, read 16-byte
data from memory and add a register value to the read address.
Instructions Description
Perform logical right-shift on the spliced 16-byte data, and the shift value
EE.SRC.Q.LD.IP is determined by the SAR_BYTE register. At the same time, read 16-byte
data from memory and add an immediate number to the read address.
Perform logical left-shift on the spliced 16-byte data, and the shift value is
EE.SLCI.2Q
determined by the immediate value.
Perform logical left-shift on the spliced 16-byte data, and the shift value is
EE.SLCXXP.2Q
determined by the value in the AR register.
Perform logical right-shift on the spliced 16-byte data, and the shift value
EE.SRCI.2Q
is determined by the immediate value.
Perform logical right-shift on the spliced 16-byte data, and the shift value
EE.SRCXXP.2Q
is determined by the value in the AR register.
Perform logical right-shift on the spliced 16-byte data, which will be written
EE.SRCQ.128.ST.INCP
to memory after the shift.
EE.VSR.32 Perform vector arithmetic right-shift on the 4-byte data.
EE.VSL.32 Perform vector arithmetic left-shift on the 4-byte data.
Instructions Description
EE.FFT.R2BF.S16. Perform radix-2 butterfly computation.
Perform radix-2 butterfly computation, and write the 16-byte result
EE.FFT.R2BF.S16.ST.INCP
to memory at the same time.
Perform radix-2 complex butterfly computation, and read 16-byte
EE.FFT.CMUL.S16.LD.XP
data from memory at the same time.
Perform radix-2 complex butterfly computation, and write the 16-
EE.FFT.CMUL.S16.ST.XP byte data (consists of the result and partial data segments in QR
register) to memory at the same time.
The reverse bit width of this instruction is determined by the value in the FFT_BIT_WIDTH register.
Instruction Description
EE.BITREV Bit reverse instruction.
A single real number FFT instruction can perform a series of complex calculations including addition,
multiplication, shifting, etc.
Instructions Description
Perform complex calculations and read 16-byte data from memory
EE.FFT.AMS.S16.LD.INCP.UAUP
at the same time, then output 16-byte aligned data.
Perform complex calculations and read 16-byte data from memory
EE.FFT.AMS.S16.LD.INCP
at the same time. Add 16 to address register.
Perform complex calculations and read 16-byte data from memory
EE.FFT.AMS.S16.LD.R32.DECP at the same time. Reverse the word order of read data. Add 16 to
address register.
Perform complex calculation and write 16-byte data (consists of the
EE.FFT.AMS.S16.ST.INCP data in AR and partial data segments in QR) to memory at the same
time.
Splice the QR register in 2-byte unit, shift the result and write this
EE.FFT.VST.R32.DECP
16-byte data to memory.
Instruction Description
EE.WR_MASK_GPIO_OUT Set GPIO_OUT by mask.
EE.SET_BIT_GPIO_OUT Set GPIO_OUT.
EE.CLR_BIT_GPIO_OUT Clear GPIO_OUT.
EE.GET_GPIO_IN Get the status of GPIO_IN.
The processor cannot issue an instruction to the pipeline until all the operands and hardware resources required
for the operation are ready. However, there are the following hazards in the actual program running process,
which can cause stopped pipeline and delayed implementation of instructions.
Data dependencies between instructions are determined by the dependencies between operands and the
pipeline stage at which reads and writes happen. Table 1-22 lists all operands of the ESP32-S3 extended
instructions, including implicit special register write (def) and read (use) pipeline stage information.
EE.MOVI.32.Q as 1 qu 1 — —
EE.NOTQ qx 1 qa 1 — —
EE.ORQ qx 1, qy 1 qa 1 — —
EE.SET_BIT_GPIO_OUT — — GPIO_OUT 1 GPIO_OUT 1
EE.SLCI.2Q qs1 1, qs0 1 qs1 1, qs0 1 — —
qs1 1, qs0 1, as qs1 1, qs0 1, as
EE.SLCXXP.2Q — —
1, ad 1 1
EE.SRC.Q qs0 1, qs1 1 qa 1 SAR_BYTE 1 —
as 1, qs0 1, qs1
EE.SRC.Q.LD.IP qu 2, as 1, qs0 1 SAR_BYTE 1 —
1
as 1, ad 1, qs0
EE.SRC.Q.LD.XP qu 2, as 1, qs0 1 SAR_BYTE 1 —
1, qs1 1
EE.SRC.Q.QUP qs0 1, qs1 1 qa 1, qs0 1 SAR_BYTE 1 —
EE.SRCI.2Q qs1 1, qs0 1 qs1 1, qs0 1 — —
QACC_H 1, QACC_H 1,
EE.SRCMB.S16.QACC as 1 qu 1
QACC_L 1 QACC_L 1
QACC_H 1, QACC_H 1,
EE.SRCMB.S8.QACC as 1 qu 1
QACC_L 1 QACC_L 1
qs0 1, qs1 1, as
EE.SRCQ.128.ST.INCP as 1 SAR_BYTE 1 —
1
qs1 1, qs0 1, as qs1 1, qs0 1, as
EE.SRCXXP.2Q — —
1, ad 1 1
EE.SRS.ACCX as 1 au 1 ACCX 1 ACCX 1
EE.ST.ACCX.IP as 1 as 1 ACCX 1 —
EE.ST.QACC_H.H.32.IP as 1 as 1 QACC_H 1 —
EE.ST.QACC_H.L.128.IP as 1 as 1 QACC_H 1 —
EE.ST.QACC_L.H.32.IP as 1 as 1 QACC_L 1 —
EE.ST.QACC_L.L.128.IP as 1 as 1 QACC_L 1 —
EE.ST.UA_STATE.IP as 1 as 1 UA_STATE 1 —
fv3 1, fv2 1, fv1
EE.STF.128.IP as 1 — —
1, fv0 1, as 1
fv3 1, fv2 1, fv1
EE.STF.128.XP 1, fv0 1, as 1, ad as 1 — —
1
EE.STF.64.IP fv1 1, fv0 1, as 1 as 1 — —
fv1 1, fv0 1, as 1,
EE.STF.64.XP as 1 — —
ad 1
EE.STXQ.32 qv 1, qs 1, as 1 — — —
EE.VADDS.S16 qx 1, qy 1 qa 1 — —
EE.VADDS.S16.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VADDS.S16.ST.INCP as 1, qa 1 — —
qy 1
EE.VADDS.S32 qx 1, qy 1 qa 1 — —
EE.VADDS.S32.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VADDS.S32.ST.INCP as 1, qa 1 — —
qy 1
EE.VADDS.S8 qx 1, qy 1 qa 1 — —
EE.VADDS.S8.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VADDS.S8.ST.INCP as 1, qa 1 — —
qy 1
EE.VCMP.EQ.S16 qx 1, qy 1 qa 1 — —
EE.VCMP.EQ.S32 qx 1, qy 1 qa 1 — —
EE.VCMP.EQ.S8 qx 1, qy 1 qa 1 — —
EE.VCMP.GT.S16 qx 1, qy 1 qa 1 — —
EE.VCMP.GT.S32 qx 1, qy 1 qa 1 — —
EE.VCMP.GT.S8 qx 1, qy 1 qa 1 — —
EE.VCMP.LT.S16 qx 1, qy 1 qa 1 — —
EE.VCMP.LT.S32 qx 1, qy 1 qa 1 — —
EE.VCMP.LT.S8 qx 1, qy 1 qa 1 — —
EE.VLD.128.IP as 1 qu 2, as 1 — —
EE.VLD.128.XP as 1, ad 1 qu 2, as 1 — —
EE.VLD.H.64.IP as 1 qu 2, as 1 — —
EE.VLD.H.64.XP as 1, ad 1 qu 2, as 1 — —
EE.VLD.L.64.IP as 1 qu 2, as 1 — —
EE.VLD.L.64.XP as 1, ad 1 qu 2, as 1 — —
EE.VLDBC.16 as 1 qu 2 — —
EE.VLDBC.16.IP as 1 qu 2, as 1 — —
EE.VLDBC.16.XP as 1, ad 1 qu 2, as 1 — —
EE.VLDBC.32 as 1 qu 2 — —
EE.VLDBC.32.IP as 1 qu 2, as 1 — —
EE.VLDBC.32.XP as 1, ad 1 qu 2, as 1 — —
EE.VLDBC.8 as 1 qu 2 — —
EE.VLDBC.8.IP as 1 qu 2, as 1 — —
EE.VLDBC.8.XP as 1, ad 1 qu 2, as 1 — —
EE.VLDHBC.16.INCP as 1 qu 2, qu1 2, as 1 — —
EE.VMAX.S16 qx 1, qy 1 qa 1 — —
EE.VMAX.S16.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VMAX.S16.ST.INCP as 1, qa 1 — —
qy 1
EE.VMAX.S32 qx 1, qy 1 qa 1 — —
EE.VMAX.S32.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VMAX.S32.ST.INCP as 1, qa 1 — —
qy 1
EE.VMAX.S8 qx 1, qy 1 qa 1 — —
EE.VMAX.S8.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VMAX.S8.ST.INCP as 1, qa 1 — —
qy 1
EE.VMIN.S16 qx 1, qy 1 qa 1 — —
EE.VMIN.S16.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VMIN.S16.ST.INCP as 1, qa 1 — —
qy 1
EE.VMIN.S32 qx 1, qy 1 qa 1 — —
EE.VMIN.S32.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VMIN.S32.ST.INCP as 1, qa 1 — —
qy 1
EE.VMIN.S8 qx 1, qy 1 qa 1 — —
EE.VMIN.S8.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VMIN.S8.ST.INCP as 1, qa 1 — —
qy 1
EE.VMUL.S16 qx 1, qy 1 qz 2 SAR 1 —
EE.VMUL.S16.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qz 2 SAR 1 —
qv 1, as 1, qx 1,
EE.VMUL.S16.ST.INCP as 1, qz 2 SAR 1 —
qy 1
EE.VMUL.S8 qx 1, qy 1 qz 2 SAR 1 —
EE.VMUL.S8.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qz 2 SAR 1 —
qv 1, as 1, qx 1,
EE.VMUL.S8.ST.INCP as 1, qz 2 SAR 1 —
qy 1
EE.VMUL.U16 qx 1, qy 1 qz 2 SAR 1 —
EE.VMUL.U16.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qz 2 SAR 1 —
qv 1, as 1, qx 1,
EE.VMUL.U16.ST.INCP as 1, qz 2 SAR 1 —
qy 1
EE.VMUL.U8 qx 1, qy 1 qz 2 SAR 1 —
EE.VMUL.U8.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qz 2 SAR 1 —
qv 1, as 1, qx 1,
EE.VMUL.U8.ST.INCP as 1, qz 2 SAR 1 —
qy 1
EE.VMULAS.S16.ACCX qx 1, qy 1 — ACCX 2 ACCX 2
EE.VMULAS.S16.ACCX.LD.IP as 1, qx 1, qy 1 qu 2, as 1 ACCX 2 ACCX 2
as 1, qx 1, qy 1, SAR_BYTE 1,
EE.VMULAS.S16.ACCX.LD.IP.QUP qu 2, as 1, qs0 1 ACCX 2
qs0 1, qs1 1 ACCX 2
as 1, ad 1, qx 1,
EE.VMULAS.S16.ACCX.LD.XP qu 2, as 1 ACCX 2 ACCX 2
qy 1
as 1, ad 1, qx 1,
SAR_BYTE 1,
EE.VMULAS.S16.ACCX.LD.XP.QUP qy 1, qs0 1, qs1 qu 2, as 1, qs0 1 ACCX 2
ACCX 2
1
QACC_H 2, QACC_H 2,
EE.VMULAS.S16.QACC qx 1, qy 1 —
QACC_L 2 QACC_L 2
QACC_H 2, QACC_H 2,
EE.VMULAS.S16.QACC.LD.IP as 1, qx 1, qy 1 qu 2, as 1
QACC_L 2 QACC_L 2
SAR_BYTE 1,
as 1, qx 1, qy 1, QACC_H 2,
EE.VMULAS.S16.QACC.LD.IP.QUP qu 2, as 1, qs0 1 QACC_H 2,
qs0 1, qs1 1 QACC_L 2
QACC_L 2
as 1, ad 1, qx 1, QACC_H 2, QACC_H 2,
EE.VMULAS.S16.QACC.LD.XP qu 2, as 1
qy 1 QACC_L 2 QACC_L 2
as 1, ad 1, qx 1, SAR_BYTE 1,
QACC_H 2,
EE.VMULAS.S16.QACC.LD.XP.QUP qy 1, qs0 1, qs1 qu 2, as 1, qs0 1 QACC_H 2,
QACC_L 2
1 QACC_L 2
QACC_H 2, QACC_H 2,
EE.VMULAS.S16.QACC.LDBC.INCP as 1, qx 1, qy 1 qu 2, as 1
QACC_L 2 QACC_L 2
SAR_BYTE 1,
as 1, qx 1, qy 1, QACC_H 2,
EE.VMULAS.S16.QACC.LDBC.INCP.QUP qu 2, as 1, qs0 1 QACC_H 2,
qs0 1, qs1 1 QACC_L 2
QACC_L 2
EE.VMULAS.S8.ACCX qx 1, qy 1 — ACCX 2 ACCX 2
EE.VMULAS.S8.ACCX.LD.IP as 1, qx 1, qy 1 qu 2, as 1 ACCX 2 ACCX 2
as 1, qx 1, qy 1, SAR_BYTE 1,
EE.VMULAS.S8.ACCX.LD.IP.QUP qu 2, as 1, qs0 1 ACCX 2
qs0 1, qs1 1 ACCX 2
as 1, ad 1, qx 1,
EE.VMULAS.S8.ACCX.LD.XP qu 2, as 1 ACCX 2 ACCX 2
qy 1
as 1, ad 1, qx 1,
SAR_BYTE 1,
EE.VMULAS.S8.ACCX.LD.XP.QUP qy 1, qs0 1, qs1 qu 2, as 1, qs0 1 ACCX 2
ACCX 2
1
QACC_L 2, QACC_L 2,
EE.VMULAS.S8.QACC qx 1, qy 1 —
QACC_H 2 QACC_H 2
QACC_H 2, QACC_H 2,
EE.VMULAS.S8.QACC.LD.IP as 1, qx 1, qy 1 qu 2, as 1
QACC_L 2 QACC_L 2
SAR_BYTE 1,
as 1, qx 1, qy 1, QACC_H 2,
EE.VMULAS.S8.QACC.LD.IP.QUP qu 2, as 1, qs0 1 QACC_H 2,
qs0 1, qs1 1 QACC_L 2
QACC_L 2
as 1, ad 1, qx 1, QACC_H 2, QACC_H 2,
EE.VMULAS.S8.QACC.LD.XP qu 2, as 1
qy 1 QACC_L 2 QACC_L 2
as 1, ad 1, qx 1, SAR_BYTE 1,
QACC_H 2,
EE.VMULAS.S8.QACC.LD.XP.QUP qy 1, qs0 1, qs1 qu 2, as 1, qs0 1 QACC_H 2,
QACC_L 2
1 QACC_L 2
QACC_H 2, QACC_H 2,
EE.VMULAS.S8.QACC.LDBC.INCP as 1, qx 1, qy 1 qu 2, as 1
QACC_L 2 QACC_L 2
SAR_BYTE 1,
as 1, qx 1, qy 1, QACC_H 2,
EE.VMULAS.S8.QACC.LDBC.INCP.QUP qu 2, as 1, qs0 1 QACC_H 2,
qs0 1, qs1 1 QACC_L 2
QACC_L 2
EE.VMULAS.U16.ACCX qx 1, qy 1 — ACCX 2 ACCX 2
EE.VMULAS.U16.ACCX.LD.IP as 1, qx 1, qy 1 qu 2, as 1 ACCX 2 ACCX 2
as 1, qx 1, qy 1, SAR_BYTE 1,
EE.VMULAS.U16.ACCX.LD.IP.QUP qu 2, as 1, qs0 1 ACCX 2
qs0 1, qs1 1 ACCX 2
as 1, ad 1, qx 1,
EE.VMULAS.U16.ACCX.LD.XP qu 2, as 1 ACCX 2 ACCX 2
qy 1
as 1, ad 1, qx 1,
SAR_BYTE 1,
EE.VMULAS.U16.ACCX.LD.XP.QUP qy 1, qs0 1, qs1 qu 2, as 1, qs0 1 ACCX 2
ACCX 2
1
QACC_L 2, QACC_L 2,
EE.VMULAS.U16.QACC qx 1, qy 1 —
QACC_H 2 QACC_H 2
QACC_L 2, QACC_L 2,
EE.VMULAS.U16.QACC.LD.IP as 1, qx 1, qy 1 qu 2, as 1
QACC_H 2 QACC_H 2
SAR_BYTE 1,
as 1, qx 1, qy 1, QACC_H 2,
EE.VMULAS.U16.QACC.LD.IP.QUP qu 2, as 1, qs0 1 QACC_H 2,
qs0 1, qs1 1 QACC_L 2
QACC_L 2
as 1, ad 1, qx 1, QACC_L 2, QACC_L 2,
EE.VMULAS.U16.QACC.LD.XP qu 2, as 1
qy 1 QACC_H 2 QACC_H 2
as 1, ad 1, qx 1, SAR_BYTE 1,
QACC_H 2,
EE.VMULAS.U16.QACC.LD.XP.QUP qy 1, qs0 1, qs1 qu 2, as 1, qs0 1 QACC_H 2,
QACC_L 2
1 QACC_L 2
QACC_L 2, QACC_L 2,
EE.VMULAS.U16.QACC.LDBC.INCP as 1, qx 1, qy 1 qu 2, as 1
QACC_H 2 QACC_H 2
SAR_BYTE 1,
as 1, qx 1, qy 1, QACC_H 2,
EE.VMULAS.U16.QACC.LDBC.INCP.QUP qu 2, as 1, qs0 1 QACC_H 2,
qs0 1, qs1 1 QACC_L 2
QACC_L 2
EE.VMULAS.U8.ACCX qx 1, qy 1 — ACCX 2 ACCX 2
EE.VMULAS.U8.ACCX.LD.IP as 1, qx 1, qy 1 qu 2, as 1 ACCX 2 ACCX 2
as 1, qx 1, qy 1, SAR_BYTE 1,
EE.VMULAS.U8.ACCX.LD.IP.QUP qu 2, as 1, qs0 1 ACCX 2
qs0 1, qs1 1 ACCX 2
as 1, ad 1, qx 1,
EE.VMULAS.U8.ACCX.LD.XP qu 2, as 1 ACCX 2 ACCX 2
qy 1
as 1, ad 1, qx 1,
SAR_BYTE 1,
EE.VMULAS.U8.ACCX.LD.XP.QUP qy 1, qs0 1, qs1 qu 2, as 1, qs0 1 ACCX 2
ACCX 2
1
QACC_L 2, QACC_L 2,
EE.VMULAS.U8.QACC qx 1, qy 1 —
QACC_H 2 QACC_H 2
QACC_L 2, QACC_L 2,
EE.VMULAS.U8.QACC.LD.IP as 1, qx 1, qy 1 qu 2, as 1
QACC_H 2 QACC_H 2
SAR_BYTE 1,
as 1, qx 1, qy 1, QACC_H 2,
EE.VMULAS.U8.QACC.LD.IP.QUP qu 2, as 1, qs0 1 QACC_H 2,
qs0 1, qs1 1 QACC_L 2
QACC_L 2
as 1, ad 1, qx 1, QACC_L 2, QACC_L 2,
EE.VMULAS.U8.QACC.LD.XP qu 2, as 1
qy 1 QACC_H 2 QACC_H 2
as 1, ad 1, qx 1, SAR_BYTE 1,
QACC_H 2,
EE.VMULAS.U8.QACC.LD.XP.QUP qy 1, qs0 1, qs1 qu 2, as 1, qs0 1 QACC_H 2,
QACC_L 2
1 QACC_L 2
QACC_L 2, QACC_L 2,
EE.VMULAS.U8.QACC.LDBC.INCP as 1, qx 1, qy 1 qu 2, as 1
QACC_H 2 QACC_H 2
SAR_BYTE 1,
as 1, qx 1, qy 1, QACC_H 2,
EE.VMULAS.U8.QACC.LDBC.INCP.QUP qu 2, as 1, qs0 1 QACC_H 2,
qs0 1, qs1 1 QACC_L 2
QACC_L 2
EE.VPRELU.S16 qx 1, qy 1, ay 1 qz 2 — —
EE.VPRELU.S8 qx 1, qy 1, ay 1 qz 2 — —
EE.VRELU.S16 qs 1, ax 1, ay 1 qs 2 — —
EE.VRELU.S8 qs 1, ax 1, ay 1 qs 2 — —
EE.VSL.32 qs 1 qa 1 SAR 1 —
QACC_H 2, QACC_H 2,
EE.VSMULAS.S16.QACC qx 1, qy 1 —
QACC_L 2 QACC_L 2
QACC_H 2, QACC_H 2,
EE.VSMULAS.S16.QACC.LD.INCP as 1, qx 1, qy 1 qu 2, as 1
QACC_L 2 QACC_L 2
QACC_L 2, QACC_L 2,
EE.VSMULAS.S8.QACC qx 1, qy 1 —
QACC_H 2 QACC_H 2
QACC_H 2, QACC_H 2,
EE.VSMULAS.S8.QACC.LD.INCP as 1, qx 1, qy 1 qu 2, as 1
QACC_L 2 QACC_L 2
EE.VSR.32 qs 1 qa 1 SAR 1 —
EE.VST.128.IP qv 1, as 1 as 1 — —
EE.VST.128.XP qv 1, as 1, ad 1 as 1 — —
EE.VST.H.64.IP qv 1, as 1 as 1 — —
EE.VST.H.64.XP qv 1, as 1, ad 1 as 1 — —
EE.VST.L.64.IP qv 1, as 1 as 1 — —
EE.VST.L.64.XP qv 1, as 1, ad 1 as 1 — —
EE.VSUBS.S16 qx 1, qy 1 qa 1 — —
EE.VSUBS.S16.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VSUBS.S16.ST.INCP as 1, qa 1 — —
qy 1
EE.VSUBS.S32 qx 1, qy 1 qa 1 — —
EE.VSUBS.S32.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VSUBS.S32.ST.INCP as 1, qa 1 — —
qy 1
EE.VSUBS.S8 qx 1, qy 1 qa 1 — —
EE.VSUBS.S8.LD.INCP as 1, qx 1, qy 1 qu 2, as 1, qa 1 — —
qv 1, as 1, qx 1,
EE.VSUBS.S8.ST.INCP as 1, qa 1 — —
qy 1
EE.VUNZIP.16 qs0 1, qs1 1 qs0 1, qs1 1 — —
EE.VUNZIP.32 qs0 1, qs1 1 qs0 1, qs1 1 — —
EE.VUNZIP.8 qs0 1, qs1 1 qs0 1, qs1 1 — —
EE.VZIP.16 qs0 1, qs1 1 qs0 1, qs1 1 — —
EE.VZIP.32 qs0 1, qs1 1 qs0 1, qs1 1 — —
EE.VZIP.8 qs0 1, qs1 1 qs0 1, qs1 1 — —
EE.WR_MASK_GPIO_OUT as 1, ax 1 — GPIO_OUT 1 GPIO_OUT 1
EE.XORQ qx 1, qy 1 qa 1 — —
EE.ZERO.ACCX — — — ACCX 1
EE.ZERO.Q — qa 1 — —
QACC_L 1,
EE.ZERO.QACC — — —
QACC_H 1
[N:M] is used to represent the field. It means the width of the field is (N-M+1), namely, both bits N and M are
included. For example, qa[2:0] has a total of 3 bits, which are bit0, bit1 and bit2, and qa[1] represents the value
of bit1.
This chapter describes all the instructions mentioned in Section 1.6 in alphabetical order by the instruction name.
Each instruction is encoded in little-endian bit order as shown in Figure 1-2.
1.8.1 EE.ANDQ
Instruction Word
11 qa[2:1] 1101 qa[0] 011 qy[2:1] 00 qx[2:1] qy[0] qx[0] 0100
Assembler Syntax
EE.ANDQ qa, qx, qy
Description
This instruction performs a bitwise AND operation on registers qx and qy and writes the result of the logical
operation to register qa.
Operation
1 qa = qx & qy
1.8.2 EE.BITREV
Instruction Word
11 qa[2:1] 1101 qa[0] 1111011 as[3:0] 0100
Assembler Syntax
EE.BITREV qa, as
Description
This instruction swaps the bit order of data of different bit widths according to the value of special register
FFT_BIT_WIDTH. Then, it compares the data before and after the swap, takes the larger value, pads the higher
bits with 0 until it has 16 bits, and writes the result into the corresponding data segment of register qa. In the
following, Switchx is a function that represents the bit inversion of the x-bit. Switch5(0b10100) = 0b00101. Here
0b10100 means 5-bit binary data.
Operation
1 temp0[15:0] = as[15:0]
2 temp1[15:0] = as[15:0] + 1
3 temp2[15:0] = as[15:0] + 2
4 temp3[15:0] = as[15:0] + 3
5 temp4[15:0] = as[15:0] + 4
6 temp5[15:0] = as[15:0] + 5
7 temp6[15:0] = as[15:0] + 6
8 temp7[15:0] = as[15:0] + 7
9 if FFT_BIT_WIDTH==3:
10 Switch3(X[2:0]) = X[0:2]
11 qa[ 15: 0] = {13’h0, max(tmp0[2:0], Switch3(tmp0[2:0]))}
12 qa[ 31: 16] = {13’h0, max(tmp1[2:0], Switch3(tmp1[2:0]))}
13 qa[ 47: 32] = {13’h0, max(tmp2[2:0], Switch3(tmp2[2:0]))}
14 qa[ 63: 48] = {13’h0, max(tmp3[2:0], Switch3(tmp3[2:0]))}
15 qa[ 79: 64] = {13’h0, max(tmp4[2:0], Switch3(tmp4[2:0]))}
16 qa[ 95: 80] = {13’h0, max(tmp5[2:0], Switch3(tmp5[2:0]))}
17 qa[127: 96] = 0
18 if FFT_BIT_WIDTH==4:
19 Switch4(X[3:0]) = X[0:3]
20 qa[ 15: 0] = {12’h0, max(tmp0[3:0], Switch4(tmp0[3:0]))}
21 qa[ 31: 16] = {12’h0, max(tmp1[3:0], Switch4(tmp1[3:0]))}
22 qa[ 47: 32] = {12’h0, max(tmp2[3:0], Switch4(tmp2[3:0]))}
23 qa[ 63: 48] = {12’h0, max(tmp3[3:0], Switch4(tmp3[3:0]))}
24 qa[ 79: 64] = {12’h0, max(tmp4[3:0], Switch4(tmp4[3:0]))}
25 qa[ 95: 80] = {12’h0, max(tmp5[3:0], Switch4(tmp5[3:0]))}
26 qa[111: 96] = {12’h0, max(tmp6[3:0], Switch4(tmp6[3:0]))}
27 qa[127:112] = {12’h0, max(tmp7[3:0], Switch4(tmp7[3:0]))}
28 ...
29 if FFT_BIT_WIDTH==10:
30 Switch10(X[9:0]) = X[0:9]
31 qa[ 15: 0] = {6’h0, max(tmp0[9:0], Switch10(tmp0[9:0]))}
32 qa[ 31: 16] = {6’h0, max(tmp1[9:0], Switch10(tmp1[9:0]))}
33 qa[ 47: 32] = {6’h0, max(tmp2[9:0], Switch10(tmp2[9:0]))}
34 qa[ 63: 48] = {6’h0, max(tmp3[9:0], Switch10(tmp3[9:0]))}
35 qa[ 79: 64] = {6’h0, max(tmp4[9:0], Switch10(tmp4[9:0]))}
36 qa[ 95: 80] = {6’h0, max(tmp5[9:0], Switch10(tmp5[9:0]))}
40 as[31:0] = as[31:0] + 8
1.8.3 EE.CLR_BIT_GPIO_OUT
Instruction Word
011101100100 imm256[7:0] 0100
Assembler Syntax
EE.CLR_BIT_GPIO_OUT 0..255
Description
It is a dedicated CPU GPIO instruction to clear certain GPIO_OUT bits. The content to clear depends on the 8-bit
immediate number imm256.
Operation
1.8.4 EE.CMUL.S16
Instruction Word
10 qz[2:1] 1110 qz[0] qy[2] 0 qy[1:0] qx[2:0] 00 sel4[1:0] 0100
Assembler Syntax
EE.CMUL.S16 qz, qx, qy, 0..3
Description
This instruction performs a 16-bit signed complex multiplication. The range of the immediate number sel4 is 0 ~
3, which specifies the 32 bits in the two QR registers qx and qy for complex multiplication. The real and imaginary
parts of complex numbers are stored in the upper 16 bits and lower 16 bits of the 32 bits respectively. The
calculated real part and imaginary part results are stored in the corresponding 32 bits of register qz.
Operation
1 if sel4 == 0:
2 qz[ 15: 0] = (qx[ 15: 0] * qy[ 15: 0] - qx[ 31: 16] * qy[ 31: 16]) >> SAR[5:0]
3 qz[ 31: 16] = (qx[ 15: 0] * qy[ 31: 16] + qx[ 31: 16] * qy[ 15: 0]) >> SAR[5:0]
4 qz[ 47: 32] = (qx[ 47: 32] * qy[ 47: 32] - qx[ 63: 48] * qy[ 63: 48]) >> SAR[5:0]
5 qz[ 63: 48] = (qx[ 47: 32] * qy[ 63: 48] + qx[ 63: 48] * qy[ 47: 32]) >> SAR[5:0]
6 if sel4 == 1:
7 qz[ 79: 64] = (qx[ 79: 64] * qy[ 79: 64] - qx[ 95: 80] * qy[ 95: 80]) >> SAR[5:0]
8 qz[ 95: 80] = (qx[ 79: 64] * qy[ 95: 80] + qx[ 95: 80] * qy[ 79: 64]) >> SAR[5:0]
9 qz[111: 96] = (qx[111: 96] * qy[111: 96] - qx[127:112] * qy[127:112]) >> SAR[5:0]
10 qz[127:112] = (qx[111: 96] * qy[127:112] + qx[127:112] * qy[111: 96]) >> SAR[5:0]
11 if sel4 == 2:
12 qz[ 15: 0] = (qx[ 15: 0] * qy[ 15: 0] + qx[ 31: 16] * qy[ 31: 16]) >> SAR[5:0]
13 qz[ 31: 16] = (qx[ 15: 0] * qy[ 31: 16] - qx[ 31: 16] * qy[ 15: 0]) >> SAR[5:0]
14 qz[ 47: 32] = (qx[ 47: 32] * qy[ 47: 32] + qx[ 63: 48] * qy[ 63: 48]) >> SAR[5:0]
15 qz[ 63: 48] = (qx[ 47: 32] * qy[ 63: 48] - qx[ 63: 48] * qy[ 47: 32]) >> SAR[5:0]
16 if sel4 == 3:
17 qz[ 79: 64] = (qx[ 79: 64] * qy[ 79: 64] + qx[ 95: 80] * qy[ 95: 80]) >> SAR[5:0]
18 qz[ 95: 80] = (qx[ 79: 64] * qy[ 95: 80] - qx[ 95: 80] * qy[ 79: 64]) >> SAR[5:0]
19 qz[111: 96] = (qx[111: 96] * qy[111: 96] + qx[127:112] * qy[127:112]) >> SAR[5:0]
20 qz[127:112] = (qx[111: 96] * qy[127:112] - qx[127:112] * qy[111: 96]) >> SAR[5:0]
1.8.5 EE.CMUL.S16.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 000 qu[0] qz[2:0] qx[1:0] qy[2:1] 11 sel4[1:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.CMUL.S16.LD.INCP qu, as, qz, qx, qy, 0..3
Description
This instruction performs a 16-bit signed complex multiplication. The range of the immediate number sel4 is 0 ~
7, which specifies the 32 bits in the two QR registers qx and qy for complex multiplication. The real and imaginary
parts of complex numbers are stored in the upper 16 bits and lower 16 bits of the 32 bits respectively. The
calculated real part and imaginary part results are stored in the corresponding 32 bits of register qz.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
1 if sel4 == 0:
2 qz[ 15: 0] = (qx[ 15: 0] * qy[ 15: 0] - qx[ 31: 16] * qy[ 31: 16]) >> SAR[5:0]
3 qz[ 31: 16] = (qx[ 15: 0] * qy[ 31: 16] + qx[ 31: 16] * qy[ 15: 0]) >> SAR[5:0]
4 qz[ 47: 32] = (qx[ 47: 32] * qy[ 47: 32] - qx[ 63: 48] * qy[ 63: 48]) >> SAR[5:0]
5 qz[ 63: 48] = (qx[ 47: 32] * qy[ 63: 48] + qx[ 63: 48] * qy[ 47: 32]) >> SAR[5:0]
6 if sel4 == 1:
7 qz[ 79: 64] = (qx[ 79: 64] * qy[ 79: 64] - qx[ 95: 80] * qy[ 95: 80]) >> SAR[5:0]
8 qz[ 95: 80] = (qx[ 79: 64] * qy[ 95: 80] + qx[ 95: 80] * qy[ 79: 64]) >> SAR[5:0]
9 qz[111: 96] = (qx[111: 96] * qy[111: 96] - qx[127:112] * qy[127:112]) >> SAR[5:0]
10 qz[127:112] = (qx[111: 96] * qy[127:112] + qx[127:112] * qy[111: 96]) >> SAR[5:0]
11 if sel4 == 2:
12 qz[ 15: 0] = (qx[ 15: 0] * qy[ 15: 0] + qx[ 31: 16] * qy[ 31: 16]) >> SAR[5:0]
13 qz[ 31: 16] = (qx[ 15: 0] * qy[ 31: 16] - qx[ 31: 16] * qy[ 15: 0]) >> SAR[5:0]
14 qz[ 47: 32] = (qx[ 47: 32] * qy[ 47: 32] + qx[ 63: 48] * qy[ 63: 48]) >> SAR[5:0]
15 qz[ 63: 48] = (qx[ 47: 32] * qy[ 63: 48] - qx[ 63: 48] * qy[ 47: 32]) >> SAR[5:0]
16 if sel4 == 3:
17 qz[ 79: 64] = (qx[ 79: 64] * qy[ 79: 64] + qx[ 95: 80] * qy[ 95: 80]) >> SAR[5:0]
18 qz[ 95: 80] = (qx[ 79: 64] * qy[ 95: 80] - qx[ 95: 80] * qy[ 79: 64]) >> SAR[5:0]
19 qz[111: 96] = (qx[111: 96] * qy[111: 96] + qx[127:112] * qy[127:112]) >> SAR[5:0]
20 qz[127:112] = (qx[111: 96] * qy[127:112] - qx[127:112] * qy[111: 96]) >> SAR[5:0]
21
22 qu[127:0] = load128({as[31:4],4{0}})
23 as[31:0] = as[31:0] + 16
1.8.6 EE.CMUL.S16.ST.INCP
Instruction Word
11100100 qy[0] qv[2:0] 0 qz[2:0] qx[1:0] qy[2:1] 00 sel4[1:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.CMUL.S16.ST.INCP qv, as, qz, qx, qy, sel4
Description
This instruction performs a 16-bit signed complex multiplication. The range of the immediate number sel4 is 0 ~
7, which specifies the 32 bits in the two QR registers qx and qy for complex multiplication. The real and imaginary
parts of complex numbers are stored in the upper 16 bits and lower 16 bits of the 32 bits respectively. The
calculated real part and imaginary part results are stored in the corresponding 32 bits of register qz.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then stores the
16-byte data of qv to memory. After the access, the value in register as is incremented by 16.
Operation
1 if sel4 == 0:
2 qz[ 15: 0] = (qx[ 15: 0] * qy[ 15: 0] - qx[ 31: 16] * qy[ 31: 16]) >> SAR[5:0]
3 qz[ 31: 16] = (qx[ 15: 0] * qy[ 31: 16] + qx[ 31: 16] * qy[ 15: 0]) >> SAR[5:0]
4 qz[ 47: 32] = (qx[ 47: 32] * qy[ 47: 32] - qx[ 63: 48] * qy[ 63: 48]) >> SAR[5:0]
5 qz[ 63: 48] = (qx[ 47: 32] * qy[ 63: 48] + qx[ 63: 48] * qy[ 47: 32]) >> SAR[5:0]
6 if sel4 == 1:
7 qz[ 79: 64] = (qx[ 79: 64] * qy[ 79: 64] - qx[ 95: 80] * qy[ 95: 80]) >> SAR[5:0]
8 qz[ 95: 80] = (qx[ 79: 64] * qy[ 95: 80] + qx[ 95: 80] * qy[ 79: 64]) >> SAR[5:0]
9 qz[111: 96] = (qx[111: 96] * qy[111: 96] - qx[127:112] * qy[127:112]) >> SAR[5:0]
10 qz[127:112] = (qx[111: 96] * qy[127:112] + qx[127:112] * qy[111: 96]) >> SAR[5:0]
11 if sel4 == 2:
12 qz[ 15: 0] = (qx[ 15: 0] * qy[ 15: 0] + qx[ 31: 16] * qy[ 31: 16]) >> SAR[5:0]
13 qz[ 31: 16] = (qx[ 15: 0] * qy[ 31: 16] - qx[ 31: 16] * qy[ 15: 0]) >> SAR[5:0]
14 qz[ 47: 32] = (qx[ 47: 32] * qy[ 47: 32] + qx[ 63: 48] * qy[ 63: 48]) >> SAR[5:0]
15 qz[ 63: 48] = (qx[ 47: 32] * qy[ 63: 48] - qx[ 63: 48] * qy[ 47: 32]) >> SAR[5:0]
16 if sel4 == 3:
17 qz[ 79: 64] = (qx[ 79: 64] * qy[ 79: 64] + qx[ 95: 80] * qy[ 95: 80]) >> SAR[5:0]
18 qz[ 95: 80] = (qx[ 79: 64] * qy[ 95: 80] - qx[ 95: 80] * qy[ 79: 64]) >> SAR[5:0]
19 qz[111: 96] = (qx[111: 96] * qy[111: 96] + qx[127:112] * qy[127:112]) >> SAR[5:0]
20 qz[127:112] = (qx[111: 96] * qy[127:112] - qx[127:112] * qy[111: 96]) >> SAR[5:0]
21
1.8.7 EE.FFT.AMS.S16.LD.INCP
Instruction Word
110100 sel2[0] qz1[2] qz[0] qy[2:0] qz1[1] qm[2:0] qx[1:0] qz[2:1] qz1[0] qu[2:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.FFT.AMS.S16.LD.INCP qu, as, qz, qz1, qx, qy, qm, sel2
Description
It is a dedicated FFT instruction to perform addition, subtraction, multiplication, addition and subtraction, and
shift operations on 16-bit data segments.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
4 if sel2==0:
5 temp2[15:0] = ((qx[ 47: 32] - qy[ 47: 32]) * qm[ 47: 32] - (qx[ 63: 48] + qy[ 63: 48]) *
qm[ 63: 48]) >> SAR
6 temp3[15:0] = ((qx[ 47: 32] - qy[ 47: 32]) * qm[ 63: 48] + (qx[ 63: 48] + qy[ 63: 48]) *
qm[ 47: 32]) >> SAR
7 if sel2==1:
8 temp2[15:0] = ((qx[ 63: 48] + qy[ 63: 48]) * qm[ 63: 48] + (qx[ 47: 32] - qy[ 47: 32]) *
qm[ 47: 32]) >> SAR
9 temp3[15:0] = ((qx[ 63: 48] + qy[ 63: 48]) * qm[ 47: 32] - (qx[ 47: 32] - qy[ 47: 32]) *
qm[ 63: 48]) >> SAR
10
1.8.8 EE.FFT.AMS.S16.LD.INCP.UAUP
Instruction Word
110101 sel2[0] qz1[2] qz[0] qy[2:0] qz1[1] qm[2:0] qx[1:0] qz[2:1] qz1[0] qu[2:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.FFT.AMS.S16.LD.INCP.UAUP qu, as, qz, qz1, qx, qy, qm, sel2
Description
It is a dedicated FFT instruction to perform addition, subtraction, multiplication, addition and subtraction, and
shift operations on 16-bit data segments.
During the operation, the lower 4 bits of the access address in the register as are forced to be 0, and then the
16-byte data is loaded from the memory. The instruction joins the loaded data and the data in special register
UA_STATE into 32-byte data, right-shifts the 32-byte data by the result of the SAR_BYTE value multiplied by 8, and
assigns the lower 128 bits of the shifted result to register qu. Meanwhile, register UA_STATE is updated with the
loaded 16-byte data. After the access, the value in register as is incremented by 16.
Operation
4 if sel2==0:
5 temp2[15:0] = ((qx[ 15: 0] - qy[ 15: 0]) * qm[ 15: 0] - (qx[ 31: 16] + qy[ 31: 16]) *
qm[ 31: 16]) >> SAR
6 temp3[15:0] = ((qx[ 15: 0] - qy[ 15: 0]) * qm[ 31: 16] + (qx[ 31: 16] + qy[ 31: 16]) *
qm[ 15: 0]) >> SAR
7 if sel2==1:
8 temp2[15:0] = ((qx[ 31: 16] + qy[ 31: 16]) * qm[ 31: 16] + (qx[ 15: 0] - qy[ 15: 0]) *
qm[ 15: 0]) >> SAR
9 temp3[15:0] = ((qx[ 31: 16] + qy[ 31: 16]) * qm[ 15: 0] - (qx[ 15: 0] - qy[ 15: 0]) *
qm[ 31: 16]) >> SAR
10
11 dataIn[127:0] = load128({as[31:4],4{0}})
12 qz[15: 0] = temp0[15:0] + temp2[15:0]
13 qz[31: 16] = temp1[15:0] + temp3[15:0]
14 qz1[15: 0] = temp0[15:0] - temp2[15:0]
15 qz1[31:16] = temp3[15:0] - temp1[15:0]
16 qu[127: 0] = {dataIn[127:0], UA_STATE[127:0]} >> {SAR_BYTE[3:0] << 3}
17 UA_STATE[127:0] = dataIn[127:0]
18 as[31:0] = as[31:0] + 16
1.8.9 EE.FFT.AMS.S16.LD.R32.DECP
Instruction Word
110110 sel2[0] qz1[2] qz[0] qy[2:0] qz1[1] qm[2:0] qx[1:0] qz[2:1] qz1[0] qu[2:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.FFT.AMS.S16.LD.R32.DECP qu, as, qz, qz1, qx, qy, qm, sel2
Description
It is a dedicated FFT instruction to perform addition, subtraction, multiplication, addition and subtraction, and
shift operations on 16-bit data segments.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and loads
the 16-byte data from the memory to register qu in the big-endian word order, namely, loads the segment [127:
96] of the data to [31:0] of qu. After the access is completed, the value in register as is decreased by 16.
Operation
4 if sel2==0:
5 temp2[15:0] = ((qx[ 79: 64] - qy[ 79: 64]) * qm[ 79: 64] - (qx[ 95: 80] + qy[ 95: 80]) *
qm[ 95: 80]) >> SAR
6 temp3[15:0] = ((qx[ 79: 64] - qy[ 79: 64]) * qm[ 95: 80] + (qx[ 95: 80] + qy[ 95: 80]) *
qm[ 79: 64]) >> SAR
7 if sel2==1:
8 temp2[15:0] = ((qx[ 95: 80] + qy[ 95: 80]) * qm[ 95: 80] + (qx[ 79: 64] - qy[ 79: 64]) *
qm[ 79: 64]) >> SAR
9 temp3[15:0] = ((qx[ 95: 80] + qy[ 95: 80]) * qm[ 79: 64] - (qx[ 79: 64] - qy[ 79: 64]) *
qm[ 95: 80]) >> SAR
10
1.8.10 EE.FFT.AMS.S16.ST.INCP
Instruction Word
10100 sel2[0] qz1[2:1] qm[0] qv[2:0] qz1[0] qx[2:0] qy[1:0] qm[2:1] as[3:0] at[3:0] 111 qy[2]
Assembler Syntax
EE.FFT.AMS.S16.ST.INCP qv, qz1, at, as, qx, qy, qm, sel2
Description
It is a dedicated FFT instruction to perform addition, subtraction, multiplication, addition and subtraction, and
shift operations on 16-bit data segments.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0, splices the
values in registers qv and at into 16-byte data, and stores the spliced result to memory. After the access is
completed, the value in register as is incremented by 16. Besides, the operation result is updated to register
at.
Operation
4 if sel2==0:
5 temp2[15:0] = ((qx[111: 96] - qy[111: 96]) * qm[111: 96] - (qx[127:112] + qy[127:112]) *
qm[127:112]) >> SAR[5:0]
6 temp3[15:0] = ((qx[111: 96] - qy[111: 96]) * qm[127:112] + (qx[127:112] + qy[127:112]) *
qm[111: 96]) >> SAR[5:0]
7 {qv[ 95: 80] >> 1, qv[ 79: 64] >> 1, qv[ 63: 48] >> 1, qv[ 47: 32] >> 1, qv[ 31: 16] >>
1, qv[ 15: 0] >> 1, at[31: 16] >> 1, at[15:0] >> 1} => store128({as[31:4],4{0}})
8 if sel2==1:
9 temp2[15:0] = ((qx[127:112] + qy[127:112]) * qm[127:112] + (qx[111: 96] - qy[111: 96]) *
qm[111: 96]) >> SAR[5:0]
10 temp3[15:0] = ((qx[127:112] + qy[127:112]) * qm[111: 96] - (qx[111: 96] - qy[111: 96]) *
qm[127:112]) >> SAR[5:0]
11 {qv[ 95: 64], qv[ 63: 32], qv[ 31: 0], at[31:0]} => store128({as[31:4],4{0}})
12
1.8.11 EE.FFT.CMUL.S16.LD.XP
Instruction Word
110111 sel8[2:1] qu[0] qy[2:0] sel8[0] qz[2:0] qx[1:0] qu[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.FFT.CMUL.S16.LD.XP qu, as, ad, qz, qx, qy, sel8
Description
This instruction performs a 16-bit signed complex multiplication. It is similar to EE.CMUL.S16 except that the
order of registers qx and qy is reversed.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
1 if sel8 == 0:
2 qz[ 15: 0] = (qx[ 15: 0] * qy[ 15: 0] + qx[ 31: 16] * qy[ 31: 16]) >> SAR[5:0]
3 qz[ 31: 16] = (qx[ 31: 16] * qy[ 15: 0] - qx[ 15: 0] * qy[ 31: 16]) >> SAR[5:0]
4 if sel8 == 1:
5 qz[ 15: 0] = (qx[ 15: 0] * qy[ 15: 0] - qx[ 31: 16] * qy[ 31: 16]) >> SAR[5:0]
6 qz[ 31: 16] = (qx[ 31: 16] * qy[ 15: 0] + qx[ 15: 0] * qy[ 31: 16]) >> SAR[5:0]
7 if sel8 == 2:
8 qz[ 47: 32] = (qx[ 47: 32] * qy[ 47: 32] + qx[ 63: 48] * qy[ 63: 48]) >> SAR[5:0]
9 qz[ 63: 48] = (qx[ 63: 48] * qy[ 47: 32] - qx[ 47: 32] * qy[ 63: 48]) >> SAR[5:0]
10 if sel8 == 3:
11 qz[ 47: 32] = (qx[ 47: 32] * qy[ 47: 32] - qx[ 63: 48] * qy[ 63: 48]) >> SAR[5:0]
12 qz[ 63: 48] = (qx[ 63: 48] * qy[ 47: 32] + qx[ 47: 32] * qy[ 63: 48]) >> SAR[5:0]
13 if sel8 == 4:
14 qz[ 79: 64] = (qx[ 79: 64] * qy[ 79: 64] + qx[ 95: 80] * qy[ 95: 80]) >> SAR[5:0]
15 qz[ 95: 80] = (qx[ 95: 80] * qy[ 79: 64] - qx[ 79: 64] * qy[ 95: 80]) >> SAR[5:0]
16 if sel8 == 5:
17 qz[ 79: 64] = (qx[ 79: 64] * qy[ 79: 64] - qx[ 95: 80] * qy[ 95: 80]) >> SAR[5:0]
18 qz[ 95: 80] = (qx[ 95: 80] * qy[ 79: 64] + qx[ 79: 64] * qy[ 95: 80]) >> SAR[5:0]
19
20 qu[127:0] = load128({as[31:4],4{0}})
21 as[31:0] = as[31:0] + ad[31:0]
1.8.12 EE.FFT.CMUL.S16.ST.XP
Instruction Word
10101 sar4[1:0] upd4[1] sel8[0] qy[2:0] upd4[0] qv[2:0] qx[1:0] sel8[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.FFT.CMUL.S16.ST.XP qx, qy, qv, as, ad, sel8, upd4, sar4
Description
This instruction performs a 16-bit signed complex multiplication. It is similar to EE.CMUL.S16 except that the
order of registers qx and qy is reversed.
The result of the operation and the data segments in registers qx and qv specified by the immediate data upd4
are concatenated into 128 bits, which then are written into memory. After the access is completed, the value in
register as is incremented by the value in register ad. Operation
1 if sel8 == 6:
2 temp[15:0] = (qx[111: 96] * qy[111: 96] + qx[127:112] * qy[127:112]) >> SAR[5:0]
3 temp[31:16] = (qx[127:112] * qy[111: 96] - qx[111: 96] * qy[127:112]) >> SAR[5:0]
4 if sel8 == 7:
5 temp[15:0] = (qx[111: 96] * qy[111: 96] - qx[127:112] * qy[127:112]) >> SAR[5:0]
6 temp[31:16] = (qx[127:112] * qy[111: 96] + qx[111: 96] * qy[127:112]) >> SAR[5:0]
7
1.8.13 EE.FFT.R2BF.S16
Instruction Word
11 qa0[2:1] 1100 qa0[0] qa1[2:0] qy[2:1] 0 sel2[0] qx[2:1] qy[0] qx[0] 0100
Assembler Syntax
EE.FFT.R2BF.S16 qa0, qa1, qx, qy, sel2
Description
This instruction performs the radix-2 butterfly operation on the 16-byte values in registers qx and qy, and the data
bit width is 16 bits. Some of the calculation results are written to register qa0, and others are written to register
qa1.
Operation
1 if sel2==0:
2 op_a[127: 0] = {qy[ 63: 0], qx[ 63: 0]}
3 op_b[127: 0] = {qy[127: 64], qx[127: 64]}
4 if sel2==1:
5 op_a[127: 0] = {qy[ 95: 64], qy[ 31: 0], qx[ 95: 64], qx[ 31: 0]}
6 op_b[127: 0] = {qy[127: 96], qy[ 63: 32], qx[127: 96], qx[ 63: 32]}
7
1.8.14 EE.FFT.R2BF.S16.ST.INCP
Instruction Word
11101000 sar4[0] qy[2:0] 1 qa0[2:0] qx[1:0] 0 sar4[1] 0100 as[3:0] 111 qx[2]
Assembler Syntax
EE.FFT.R2BF.S16.ST.INCP qa0, qx, qy, as, 0..3
Description
This instruction performs the radix-2 butterfly operation on the 16-byte values in registers qx and qy, and the data
bit width is 16 bits. Some of the calculation results are written to register qa0, and others implement an arithmetic
shift and are written into the memory address indicated by as. After the access is completed, the value in register
as is incremented by 16.
Operation
10 {
11 (qx[127:112] + qy[127:112]) >> sar4,
12 (qx[111: 96] + qy[111: 96]) >> sar4,
13 (qx[ 95: 80] + qy[ 95: 80]) >> sar4,
14 (qx[ 79: 64] + qy[ 79: 64]) >> sar4,
15 (qx[ 63: 48] + qy[ 63: 48]) >> sar4,
16 (qx[ 47: 32] + qy[ 47: 32]) >> sar4,
17 (qx[ 31: 16] + qy[ 31: 16]) >> sar4,
18 (qx[ 15: 0] + qy[ 15: 0]) >> sar4
19 } => store128({as[31:4],4{0}})
20 as[31:0] = as[31:0] + 16
1.8.15 EE.FFT.VST.R32.DECP
Instruction Word
11 qv[2:1] 1101 qv[0] 0110 sar2[0] 11 as[3:0] 0100
Assembler Syntax
EE.FFT.VST.R32.DECP qv, as, sar2
Description
It is a dedicated FFT instruction. This instruction divides data in register qv into 8 segments of 16-bit data and
performs an arithmetic right shift on them by 0 or 1 depending on the immediate number sar2, and finally writes
the result to the memory address indicated by register as in word big-endian order. After the access is
completed, the value in register as is decreased by 16.
Operation
1 {
2 qv[ 31: 16] >> sar2,
3 qv[ 15: 0] >> sar2,
4 qv[ 63: 48] >> sar2,
5 qv[ 47: 32] >> sar2,
6 qv[ 95: 80] >> sar2,
7 qv[ 79: 64] >> sar2,
8 qv[127:112] >> sar2,
9 qv[111: 96] >> sar2
10 } => store128({as[31:4],4{0}})
11 as[31:0] = as[31:0] - 16
1.8.16 EE.GET_GPIO_IN
Instruction Word
0110010100001000 au[3:0] 0100
Assembler Syntax
EE.GET_GPIO_IN au
Description
It is a dedicated CPU GPIO instruction to assign the content of GPIO_IN to the lower 8 bits of register au.
Operation
1 au = {24’h0, GPIO_IN[7:0]}
1.8.17 EE.LD.128.USAR.IP
Instruction Word
1 imm16[7] qu[2:1] 0001 qu[0] imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.LD.128.USAR.IP qu, as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and loads 16-byte data from
memory to register qu. Meanwhile, it saves the value of the lower 4 bits in as to the special register SAR_BYTE.
After the access is completed, the value in register as is incremented by 8-bit sign-extended constant in the
instruction code segment left-shifted by 4.
Operation
1 qu[127:0] = load128({as[31:4],4{0}})
2 SAR_BYTE = as[3:0]
3 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.18 EE.LD.128.USAR.XP
Instruction Word
10 qu[2:1] 1101 qu[0] 000 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.LD.128.USAR.XP qu, as, ad
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and loads 16-byte data from
memory to register qu. Meanwhile, it saves the value of the lower 4 bits in as to the special register SAR_BYTE.
After the access is completed, the value in register as is incremented by the value in register ad.
Operation
1 qu[127:0] = load128({as[31:4],4{0}})
2 SAR_BYTE = as[3:0]
3 as[31:0] = as[31:0] + ad[31:0]
1.8.19 EE.LD.ACCX.IP
Instruction Word
0 imm8[7] 0011100 imm8[6:0] as[3:0] 0100
Assembler Syntax
EE.LD.ACCX.IP as, -1024..1016
Description
This instruction forces the lower 3 bits of the access address in register as to 0, loads 64-bit data from memory,
and save its lower 40 bits to the special register ACCX. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 3.
Operation
1 ACCX[39:0] = load64({as[31:3],3{0}})
2 as[31:0] = as[31:0] + {21{imm8[7]},imm8[7:0],3{0}}
1.8.20 EE.LD.QACC_H.H.32.IP
Instruction Word
0 imm4[7] 0111100 imm4[6:0] as[3:0] 0100
Assembler Syntax
EE.LD.QACC_H.H.32.IP as, -512..508
Description
This instruction forces the lower 2 bits of the access address in register as to 0 and loads 32-bit data from
memory to the special register QACC_H[159:128]. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 2.
Operation
1 QACC_H[159:128] = load32({as[31:2],2{0}})
2 as[31:0] = as[31:0] + {22{imm4[7]},imm4[7:0],2{0}}
1.8.21 EE.LD.QACC_H.L.128.IP
Instruction Word
0 imm16[7] 0001100 imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.LD.QACC_H.L.128.IP as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and loads 16-byte data from
memory to the special register QACC_H[127:0]. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1 QACC_H[127: 0] = load128({as[31:4],4{0}})
2 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.22 EE.LD.QACC_L.H.32.IP
Instruction Word
0 imm4[7] 0101100 imm4[6:0] as[3:0] 0100
Assembler Syntax
EE.LD.QACC_L.H.32.IP as, -512..508
Description
This instruction forces the lower 2 bits of the access address in register as to 0 and loads 32-bit data from
memory to the special register QACC_L[159:128]. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 2.
Operation
1 QACC_L[159:128] = load32({as[31:2],2{0}})
2 as[31:0] = as[31:0] + {22{imm4[7]},imm4[7:0],2{0}}
1.8.23 EE.LD.QACC_L.L.128.IP
Instruction Word
0 imm16[7] 0000000 imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.LD.QACC_L.L.128.IP as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and loads 16-byte data from
memory to the special register QACC_L[127:0]. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1 QACC_L[127:0] = load128({as[31:4],4{0}})
2 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.24 EE.LD.UA_STATE.IP
Instruction Word
0 imm16[7] 0100000 imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.LD.UA_STATE.IP as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and loads 16-byte data from
memory to the special register UA_STATE. After the access is completed, the value in register as is incremented
by 8-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1 UA_STATE[127:0] = load128({as[31:4],4{0}})
2 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.25 EE.LDF.128.IP
Instruction Word
10000 fu3[3:1] fu0[3:0] fu3[0] fu2[3:1] fu1[3:0] imm16f[3:0] as[3:0] 111 fu2[0]
Assembler Syntax
EE.LDF.128.IP fu3, fu2, fu1, fu0, as, -128..112
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
and stores it in order from low bit to high bit to floating-point registers fu0, fu1, fu2, and fu3. After the access is
completed, the value in register as is incremented by 4-bit sign-extended constant in the instruction code
segment left-shifted by 4.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 fu3 = dataIn[127: 96]
3 fu2 = dataIn[ 95: 64]
4 fu1 = dataIn[ 63: 32]
5 fu0 = dataIn[ 31: 0]
6 as[31:0] = as[31:0] + {24{imm16f[3]},imm16f[3:0],4{0}}
1.8.26 EE.LDF.128.XP
Instruction Word
10001 fu3[3:1] fu0[3:0] fu3[0] fu2[3:1] fu1[3:0] ad[3:0] as[3:0] 111 fu2[0]
Assembler Syntax
EE.LDF.128.XP fu3, fu2, fu1, fu0, as, ad
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
and stores it in order from low bit to high bit to floating-point registers fu0, fu1, fu2, and fu3. After the access is
completed, the value in register as is incremented by the value in register ad.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 fu3 = dataIn[127: 96]
3 fu2 = dataIn[ 95: 64]
4 fu1 = dataIn[ 63: 32]
5 fu0 = dataIn[ 31: 0]
6 as[31:0] = as[31:0] + ad[31:0]
1.8.27 EE.LDF.64.IP
Instruction Word
111000 imm8[7:6] fu0[3:0] imm8[5:2] fu1[3:0] 010 imm8[0] as[3:0] 111 imm8[1]
Assembler Syntax
EE.LDF.64.IP fu1, fu0, as, -1024..1016
Description
This instruction forces the lower 3 bits of the access address in register as to 0, loads 64-bit data from memory,
and stores it in order from low bit to high bit to floating-point registers fu0 and fu1. After the access is
completed, the value in register as is incremented by 8-bit sign-extended constant in the instruction code
segment left-shifted by 3.
Operation
1 dataIn[63:0] = load64({as[31:3],3{0}})
2 fu1 = dataIn[63:32]
3 fu0 = dataIn[31: 0]
4 as[31:0] = as[31:0] + {21{imm8[7]},imm8[7:0],3{0}}
1.8.28 EE.LDF.64.XP
Instruction Word
fu0[3:0] 0110 fu1[3:0] ad[3:0] as[3:0] 0000
Assembler Syntax
EE.LDF.64.XP fu1, fu0, as, ad
Description
This instruction forces the lower 3 bits of the access address in register as to 0, loads 64-bit data from memory,
and stores it in order from low bit to high bit to floating-point registers fu0 and fu1. After the access is
completed, the value in register as is incremented by the value in register ad.
Operation
1 dataIn[63:0] = load64({as[31:3],3{0}})
2 fu1 = dataIn[63:32]
3 fu0 = dataIn[31: 0]
4 as[31:0] = as[31:0] + ad[31:0]
1.8.29 EE.LDQA.S16.128.IP
Instruction Word
0 imm16[7] 0000010 imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.LDQA.S16.128.IP as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
divides it into 8 segments of 16 bits, sign-extends each segment to 40 bits, and then store the results to the
160-bit special registers QACC_L and QACC_H respectively. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 QACC_L[ 39: 0] = {24{dataIn[15]}, dataIn[ 15: 0]}
3 QACC_L[ 79: 40] = {24{dataIn[31]}, dataIn[ 31: 16]}
4 ...
5 QACC_H[ 39: 0] = {24{dataIn[79]}, dataIn[ 79: 64]}
6 QACC_H[ 79: 40] = {24{dataIn[95]}, dataIn[ 95: 80]}
7
1.8.30 EE.LDQA.S16.128.XP
Instruction Word
011111100100 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.LDQA.S16.128.XP as, ad
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
divides it into 8 segments of 16 bits, sign-extends each segment to 40 bits, and then store the results to the
160-bit special registers QACC_L and QACC_H respectively. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 QACC_L[ 39: 0] = {24{dataIn[15]}, dataIn[ 15: 0]}
3 QACC_L[ 79: 40] = {24{dataIn[31]}, dataIn[ 31: 16]}
4 ...
5 QACC_H[ 39: 0] = {24{dataIn[79]}, dataIn[ 79: 64]}
6 QACC_H[ 79: 40] = {24{dataIn[95]}, dataIn[ 95: 80]}
7 as[31:0] = as[31:0] + ad[31:0]
1.8.31 EE.LDQA.S8.128.IP
Instruction Word
0 imm16[7] 0100010 imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.LDQA.S8.128.IP as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
divides it into 16 segments of 8 bits, sign-extends each segment to 20 bits, and then store the results to the
160-bit special registers QACC_L and QACC_H respectively. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 QACC_L[19:0] = {12{dataIn[7]}, dataIn[7:0]}
3 QACC_L[39:20] = {12{dataIn[15]}, dataIn[15:8]}
4 ...
5 QACC_H[159:140] = {12{dataIn[127]}, dataIn[127:120]}
6 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.32 EE.LDQA.S8.128.XP
Instruction Word
011100010100 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.LDQA.S8.128.XP as, ad
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
divides it into 16 segments of 8 bits, sign-extends each segment to 20 bits, and then store the results to the
160-bit special registers QACC_L and QACC_H respectively. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 QACC_L[19:0] = {12{dataIn[7]}, dataIn[7:0]}
3 QACC_L[39:20] = {12{dataIn[15]}, dataIn[15:8]}
4 ...
5 QACC_H[159:140] = {12{dataIn[127]}, dataIn[127:120]}
6 as[31:0] = as[31:0] + ad[31:0]
1.8.33 EE.LDQA.U16.128.IP
Instruction Word
0 imm16[7] 0001010 imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.LDQA.U16.128.IP as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
divides it into 8 segments of 16 bits, zero-extends each segment to 40 bits, and then store the results to the
160-bit special registers QACC_L and QACC_H respectively. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 QACC_L[ 39: 0] = {24{0}, dataIn[ 15: 0]}
3 QACC_L[ 79: 40] = {24{0}, dataIn[ 31: 16]}
4 QACC_L[119: 80] = {24{0}, dataIn[ 47: 32]}
5 QACC_L[159:120] = {24{0}, dataIn[ 63: 48]}
6 QACC_H[ 39: 0] = {24{0}, dataIn[ 79: 64]}
7 QACC_H[ 79: 40] = {24{0}, dataIn[ 95: 80]}
8 QACC_H[119: 80] = {24{0}, dataIn[111: 96]}
9 QACC_H[159:120] = {24{0}, dataIn[127:112]}
10 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.34 EE.LDQA.U16.128.XP
Instruction Word
011110100100 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.LDQA.U16.128.XP as, ad
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
divides it into 8 segments of 16 bits, zero-extends each segment to 40 bits, and then store the results to the
160-bit special registers QACC_L and QACC_H respectively. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 QACC_L[ 39: 0] = {24{0}, dataIn[ 15: 0]}
3 ...
4 QACC_H[159:120] = {24{0}, dataIn[127:112]}
5 as[31:0] = as[31:0] + ad[31:0]
1.8.35 EE.LDQA.U8.128.IP
Instruction Word
0 imm16[7] 0101010 imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.LDQA.U8.128.IP as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
divides it into 16 segments of 8 bits, zero-extends each segment to 20 bits, and then store the results to the
160-bit special registers QACC_L and QACC_H respectively. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 QACC_L[ 19: 0] = {12{0}, dataIn[ 7: 0]}
3 QACC_L[ 39: 20] = {12{0}, dataIn[ 15: 8]}
4 QACC_L[ 59: 40] = {12{0}, dataIn[ 23: 16]}
5 ...
6 QACC_L[159:140] = {12{0}, dataIn[ 63: 56]}
7 QACC_H[ 19: 0] = {12{0}, dataIn[ 71: 64]}
8 QACC_H[ 39: 20] = {12{0}, dataIn[ 79: 72]}
9 QACC_H[ 59: 40] = {12{0}, dataIn[ 87: 80]}
10 ...
11 QACC_H[159:140] = {12{0}, dataIn[127:120]}
12 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.36 EE.LDQA.U8.128.XP
Instruction Word
011100000100 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.LDQA.U8.128.XP as, ad
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
divides it into 16 segments of 8 bits, zero-extends each segment to 20 bits, and then store the results to the
160-bit special registers QACC_L and QACC_H respectively. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 QACC_L[ 19: 0] = {12{0}, dataIn[ 7: 0]}
3 ...
4 QACC_L[159:140] = {12{0}, dataIn[ 63: 56]}
5 QACC_H[ 19: 0] = {12{0}, dataIn[ 71: 64]}
6 ...
7 QACC_H[159:140] = {12{0}, dataIn[127:120]}
8 as[31:0] = as[31:0] + ad[31:0]
1.8.37 EE.LDXQ.32
Instruction Word
1110000 sel4[1] sel8[0] 111 sel4[0] qu[2:0] qs[1:0] sel8[2:1] 1101 as[3:0] 111 qs[2]
Assembler Syntax
EE.LDXQ.32 qu, qs, as, 0..3, 0..7
Description
This instruction selects one of the 8 segments of 16-bit data in qs as the addend according to the immediate
number sel8. It adds the addend left-shifted by 2 bits to the value of the address register as, uses the result as
the access address, aligns it to 32 bits (its lower 2 bits are set to 0), and stores loaded data to a 32-bit data
segment in register qu according to the value of the immediate number sel4.
Operation
10 if sel8 == 0:
11 dataIn[31:0] = load32({vaddr0[31:2],2{0}})
12 if sel8 == 1:
13 dataIn[31:0] = load32({vaddr1[31:2],2{0}})
14 if sel8 == 2:
15 dataIn[31:0] = load32({vaddr2[31:2],2{0}})
16 if sel8 == 3:
17 dataIn[31:0] = load32({vaddr3[31:2],2{0}})
18 if sel8 == 4:
19 dataIn[31:0] = load32({vaddr4[31:2],2{0}})
20 if sel8 == 5:
21 dataIn[31:0] = load32({vaddr5[31:2],2{0}})
22 if sel8 == 6:
23 dataIn[31:0] = load32({vaddr6[31:2],2{0}})
24 if sel8 == 7:
25 dataIn[31:0] = load32({vaddr7[31:2],2{0}})
26
27 qu[32*sel4+31:32*sel4] = dataIn[31:0]
1.8.38 EE.MOV.S16.QACC
Instruction Word
11 qs[2:1] 1101 qs[0] 111111100100100
Assembler Syntax
EE.MOV.S16.QACC qs
Description
This instruction sign-extends the 8 segments of 16-bit data in register qs to 40 bits and writes the result to the
special registers QACC_H and QACC_L.
Operation
1.8.39 EE.MOV.S8.QACC
Instruction Word
11 qs[2:1] 1101 qs[0] 111111100110100
Assembler Syntax
EE.MOV.S8.QACC qs
Description
This instruction sign-extends the 16 segments of 8-bit data in the register qs to 20 bits and writes the result to
special registers QACC_H and QACC_L.
Operation
1.8.40 EE.MOV.U16.QACC
Instruction Word
11 qs[2:1] 1101 qs[0] 111111101100100
Assembler Syntax
EE.MOV.U16.QACC qs
Description
This instruction zero-extends the 8 segments of 16-bit data in register qs to 40 bits and writes the result to
special registers QACC_H and QACC_L.
Operation
1.8.41 EE.MOV.U8.QACC
Instruction Word
11 qs[2:1] 1101 qs[0] 111111101110100
Assembler Syntax
EE.MOV.U8.QACC qs
Description
This instruction zero-extends the 16 segments of 8-bit data in register qs to 20 bits and writes the result to
special registers QACC_H and QACC_L.
Operation
1.8.42 EE.MOVI.32.A
Instruction Word
11 qs[2:1] 1101 qs[0] 111 sel4[1:0] 01 au[3:0] 0100
Assembler Syntax
EE.MOVI.32.A qs, au, 0..3
Description
This instruction selects one data segment of 32 bits from register qs according to immediate number sel4 and
assigns it to register au.
Operation
1 if sel4 == 0:
2 au = qs[ 31: 0]
3 if sel4 == 1:
4 au = qs[ 63: 32]
5 if sel4 == 2:
6 au = qs[ 95: 64]
7 if sel4 == 3:
8 au = qs[127: 96]
1.8.43 EE.MOVI.32.Q
Instruction Word
11 qu[2:1] 1101 qu[0] 011 sel4[1:0] 10 as[3:0] 0100
Assembler Syntax
EE.MOVI.32.Q qu, as, 0..3
Description
This instruction assigns the value in register as to one data segment of 32 bits in register qu according to
immediate number sel4.
Operation
1 if sel4 == 0:
2 qu[ 31: 0] = as
3 if sel4 == 1:
4 qu[ 63: 32] = as
5 if sel4 == 2:
6 qu[ 95: 64] = as
7 if sel4 == 3:
8 qu[127: 96] = as
1.8.44 EE.NOTQ
Instruction Word
11 qa[2:1] 1101 qa[0] 1111111 qx[2:1] 0 qx[0] 0100
Assembler Syntax
EE.NOTQ qa, qx
Description
This instruction performs a bitwise NOT operation on register qx and writes the result to register qa.
Operation
1 qa = ~qx
1.8.45 EE.ORQ
Instruction Word
11 qa[2:1] 1101 qa[0] 111 qy[2:1] 00 qx[2:1] qy[0] qx[0] 0100
Assembler Syntax
EE.ORQ qa, qx, qy
Description
This instruction performs a bitwise NOT operation on registers qx and qy and writes the result of the logical
operation to register qa.
Operation
1 qa = qx | qy
1.8.46 EE.SET_BIT_GPIO_OUT
Instruction Word
011101010100 imm256[7:0] 0100
Assembler Syntax
EE.SET_BIT_GPIO_OUT 0..255
Description
It is a dedicated CPU GPIO instruction to set certain bits of GPIO_OUT. The assignment content depends on the
8-bit immediate number imm256.
Operation
1.8.47 EE.SLCI.2Q
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 0110 sar16[3:0] 0100
Assembler Syntax
EE.SLCI.2Q qs1, qs0, 0..15
Description
This instruction performs a left shift on the 32-byte concatenation of registers qs0 and qs1 and pads the lower
bits with 0. The upper 128 bits of the shift result is written to register qs1 and the lower 128 bits is written to qs0.
The left shift amount is 8 times the sum of sar16 and 1.
Operation
1 {qs1[127: 0], qs0[127: 0]} = {qs1[127: 0], qs0[127: 0]} << ((sar16[3:0]+1)*8)
1.8.48 EE.SLCXXP.2Q
Instruction Word
10 qs1[2:1] 0110 qs1[0] qs0[2:0] ad[3:0] as[3:0] 0100
Assembler Syntax
EE.SLCXXP.2Q qs1, qs0, as, ad
Description
This instruction performs a left shift on the 32-byte concatenation of registers qs0 and qs1 and pads the lower
bits with 0. The upper 128 bits of the shift result is written to register qs1 and the lower 128 bits is written to qs0.
The left shift amount is 8 multiplied by the sum of 1 plus the lower 4-bit value of register as. After the above
operations, the value in as is incremented by the value in ad.
Operation
1 {qs1[127: 0], qs0[127: 0]} = {qs1[127: 0], qs0[127: 0]} << ((as[3:0]+1)*8)
2 as[31:0] = as[31:0] + ad[31:0]
1.8.49 EE.SRC.Q
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 00110 qa[2:0] 0100
Assembler Syntax
EE.SRC.Q qa, qs0, qs1
Description
This instruction performs an arithmetic right shift on the 32-byte concatenation of registers qs0 and qs1 that hold
the loaded data of two consecutive aligned addresses. By this way, you can obtain unaligned 16-byte data,
which will be written to register qa. The right shift amount is SAR_BYTE multiplied by 8.
Operation
1.8.50 EE.SRC.Q.LD.IP
Instruction Word
111000 imm16[7:6] imm16[2] qs1[2:0] imm16[5] qu[2:0] qs0[1:0] imm16[4:3] 00 imm16[1:0] as[3:0] 111 qs0[2]
Assembler Syntax
EE.SRC.Q.LD.IP qu, as, -2048..2032, qs0, qs1
Description
This instruction performs an arithmetic right shift on the 32-byte concatenation of registers qs0 and qs1 that hold
the loaded data of two consecutive aligned addresses. By this way, you can obtain unaligned 16-byte data,
which will be written to register qs0. The right shift amount is SAR_BYTE multiplied by 8.
At the same time, the lower 4 bits of the access address in register as are forced to be 0, and then the 16-byte
data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1.8.51 EE.SRC.Q.LD.XP
Instruction Word
111010000 qs1[2:0] 0 qu[2:0] qs0[1:0] 00 ad[3:0] as[3:0] 111 qs0[2]
Assembler Syntax
EE.SRC.Q.LD.XP qu, as, ad, qs0, qs1
Description
This instruction performs an arithmetic right shift on the 32-byte concatenation of registers qs0 and qs1 that hold
the loaded data of two consecutive aligned addresses. By this way, you can obtain unaligned 16-byte data,
which will be written to register qs0. The right shift amount is SAR_BYTE multiplied by 8.
At the same time, the lower 4 bits of the access address in register as are forced to be 0, and then the 16-byte
data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
1.8.52 EE.SRC.Q.QUP
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 01110 qa[2:0] 0100
Assembler Syntax
EE.SRC.Q.QUP qa, qs0, qs1
Description
This instruction performs an arithmetic right shift on the 32-byte concatenation of registers qs0 and qs1 that hold
the loaded data of two consecutive aligned addresses. In this way, you can obtain unaligned 16-byte data, which
will be written to register qa. The right shift amount is SAR_BYTE multiplied by 8. At the same time, the value of
register qs1 is updated to qs0.
Operation
1.8.53 EE.SRCI.2Q
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 1010 sar16[3:0] 0100
Assembler Syntax
EE.SRCI.2Q qs1, qs0, sar16
Description
This instruction performs a logical right shift on the 32-byte concatenation of registers qs0 and qs1 and pads the
higher bits with 0. The upper 128 bits of the shift result is written to register qs1 and the lower 128 bits is written
to qs0. The right shift amount is 8 times the sum of sar16 and 1.
Operation
1 {qs1[127: 0], qs0[127: 0]} = {qs1[127: 0], qs0[127: 0]} >> ((sar16+1)*8)
2 qs1[127:127-8*sar16] = 0
1.8.54 EE.SRCMB.S16.QACC
Instruction Word
11 qu[2:1] 1101 qu[0] 1110 010 as[3:0] 0100
Assembler Syntax
EE.SRCMB.S16.QACC qu, as, 0
Description
This instruction extracts 8 data segments of 40 bits from special registers QACC_H and QACC_L and perform
arithmetic right shift operations respectively. While writing the shift result back to QACC_H and QACC_L, the
instruction saturates the result to 16-bit signed numbers and writes the 8 16-bit data obtained after saturation
into register qu.
Operation
1.8.55 EE.SRCMB.S8.QACC
Instruction Word
11 qu[2:1] 1101 qu[0] 1111 010 as[3:0] 0100
Assembler Syntax
EE.SRCMB.S8.QACC qu, as, 0
Description
This instruction extracts 16 data segments of 20 bits from special registers QACC_H and QACC_L and perform
arithmetic right shift operations respectively. While writing the shift result back to QACC_H and QACC_L, the
instruction saturates the result to 8-bit signed numbers and writes the 16 8-bit data obtained after saturation into
register qu.
Operation
1.8.56 EE.SRCQ.128.ST.INCP
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 1110 as[3:0] 0100
Assembler Syntax
EE.SRCQ.128.ST.INCP qs0, qs1, as
Description
This instruction performs an arithmetic right shift on the 32-byte concatenation of registers qs0 and qs1. Then, it
writes the lower 128 bits of the shift result to memory. After the access, the value in register as is incremented by
16.
Operation
1.8.57 EE.SRCXXP.2Q
Instruction Word
11 qs1[2:1] 0110 qs1[0] qs0[2:0] ad[3:0] as[3:0] 0100
Assembler Syntax
EE.SRCXXP.2Q qs1, qs0, as, ad
Description
This instruction performs a logical right shift on the 32-byte concatenation of registers qs0 and qs1 and pads the
higher bits with 0. The upper 128 bits of the shift result is written to register qs1 and the lower 128 bits is written
to qs0. The right shift amount is 8 multiplied by the sum of 1 plus the lower 4-bit value of register as. After the
above operations, the value in as is incremented by the value in ad.
Operation
1 {qs1[127: 0], qs0[127: 0]} = {qs1[127: 0], qs0[127: 0]} >> ((as[3:0]+1)*8)
2 qs1[127:127-8*as[3: 0]] = 0
3 as[31:0] = as[31:0] + ad[31:0]
1.8.58 EE.SRS.ACCX
Instruction Word
011111100 001 au[3:0] as[3:0] 0100
Assembler Syntax
EE.SRS.ACCX au, as, 0
Description
This instruction performs an arithmetic right shift on special register ACCX. While writing the shift result back to
ACCX, the instruction saturates shift result to a 32-bit signed number and writes the saturated result into register
au.
Operation
1.8.59 EE.ST.ACCX.IP
Instruction Word
0 imm8[7] 0000100 imm8[6:0] as[3:0] 0100
Assembler Syntax
EE.ST.ACCX.IP as, -512..508
Description
This instruction forces the lower 3 bits of the access address in register as to 0, zero-extends special register
ACCX to 64 bits, and stores the result to memory. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 3.
Operation
1.8.60 EE.ST.QACC_H.H.32.IP
Instruction Word
0 imm4[7] 0100100 imm4[6:0] as[3:0] 0100
Assembler Syntax
EE.ST.QACC_H.H.32.IP as, -512..508
Description
This instruction forces the lower 2 bits of the access address in register as to 0 and stores the upper 32 bits in
special register QACC_H to memory. After the access is completed, the value in register as is incremented by 8-bit
sign-extended constant in the instruction code segment left-shifted by 2.
Operation
1.8.61 EE.ST.QACC_H.L.128.IP
Instruction Word
0 imm16[7] 0011010 imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.ST.QACC_H.L.128.IP as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and stores the lower 128 bits in
special register QACC_H to memory. After the access is completed, the value in register as is incremented by 8-bit
sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1.8.62 EE.ST.QACC_L.H.32.IP
Instruction Word
0 imm4[7] 0111010 imm4[6:0] as[3:0] 0100
Assembler Syntax
EE.ST.QACC_L.H.32.IP as, -512..508
Description
This instruction forces the lower 2 bits of the access address in register as to 0 and stores the upper 32 bits in
special register QACC_L to memory. After the access is completed, the value in register as is incremented by 8-bit
sign-extended constant in the instruction code segment left-shifted by 2.
Operation
1.8.63 EE.ST.QACC_L.L.128.IP
Instruction Word
0 imm16[7] 0011000 imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.ST.QACC_L.L.128.IP as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and stores the lower 128 bits in
special register QACC_L to memory. After the access is completed, the value in register as is incremented by 8-bit
sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1.8.64 EE.ST.UA_STATE.IP
Instruction Word
0 imm16[7] 0111000 imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.ST.UA_STATE.IP as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and stores the 128 bits data in
special register UA_STATE to memory. After the access is completed, the value in register as is incremented by
8-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1.8.65 EE.STF.128.IP
Instruction Word
10010 fv3[3:1] fv0[3:0] fv3[0] fv2[3:1] fv1[3:0] imm16f[3:0] as[3:0] 111 fv2[0]
Assembler Syntax
EE.STF.128.IP fv3, fv2, fv1, fv0, as, -128..112
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and stores the 16-byte data
concatenated from four floating-point registers fu0, fu1, fu2, and fu3 in order from low bit to high bit to memory.
After the access is completed, the value in register as is incremented by 4-bit sign-extended constant in the
instruction code segment left-shifted by 4.
Operation
1.8.66 EE.STF.128.XP
Instruction Word
10011 fv3[3:1] fv0[3:0] fv3[0] fv2[3:1] fv1[3:0] ad[3:0] as[3:0] 111 fv2[0]
Assembler Syntax
EE.STF.128.XP fv3, fv2, fv1, fv0, as, ad
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and stores the 16-byte data
concatenated from four floating-point registers fu0, fu1, fu2, and fu3 in order from low bit to high bit to memory.
After the access is completed, the value in register as is incremented by the value in register ad.
Operation
1.8.67 EE.STF.64.IP
Instruction Word
111000 imm8[7:6] fv0[3:0] imm8[5:2] fv1[3:0] 011 imm8[0] as[3:0] 111 imm8[1]
Assembler Syntax
EE.STF.64.IP fv1, fv0, as, imm8
Description
This instruction forces the lower 3 bits of the access address in register as to 0 and stores the 64-bit data
concatenated from two floating-point registers fu0 and fu1 in order from low bit to high bit to memory. After the
access is completed, the value in register as is incremented by 8-bit sign-extended constant in the instruction
code segment left-shifted by 3.
Operation
1.8.68 EE.STF.64.XP
Instruction Word
fv0[3:0] 0111 fv1[3:0] ad[3:0] as[3:0] 0000
Assembler Syntax
EE.STF.64.XP fv1, fv0, as, ad
Description
This instruction forces the lower 3 bits of the access address in register as to 0 and stores the 64-bit data
concatenated from two floating-point registers fu0 and fu1 in order from low bit to high bit to memory. After the
access is completed, the value in register as is incremented by the value in register ad.
Operation
1.8.69 EE.STXQ.32
Instruction Word
1110011 sel4[1] sel8[0] qv[2:0] sel4[0] 000 qs[1:0] sel8[2:1] 0000 as[3:0] 111 qs[2]
Assembler Syntax
EE.STXQ.32 qv, qs, as, sel4, sel8
Description
This instruction selects one of the four data segments of 32 bits in register qv according to immediate number
sel4. Then, it selects an addend from the 8 data segments of 16 bits in register qs according to immediate
number sel8, adds the addend left-shifted by 2 bits to the value of the address register as, aligns the sum to 32
bits (its lower 2 bits are set to 0), and uses the result as the written address.
Operation
10 if sel8 == 0:
11 qv[32*sel4+31:32*sel4] =>store32({vaddr0[31:2],2{0}})
12 if sel8 == 1:
13 qv[32*sel4+31:32*sel4] =>store32({vaddr1[31:2],2{0}})
14 if sel8 == 2:
15 qv[32*sel4+31:32*sel4] =>store32({vaddr2[31:2],2{0}})
16 if sel8 == 3:
17 qv[32*sel4+31:32*sel4] =>store32({vaddr3[31:2],2{0}})
18 if sel8 == 4:
19 qv[32*sel4+31:32*sel4] =>store32({vaddr4[31:2],2{0}})
20 if sel8 == 5:
21 qv[32*sel4+31:32*sel4] =>store32({vaddr5[31:2],2{0}})
22 if sel8 == 6:
23 qv[32*sel4+31:32*sel4] =>store32({vaddr6[31:2],2{0}})
24 if sel8 == 7:
25 qv[32*sel4+31:32*sel4] =>store32({vaddr7[31:2],2{0}})
1.8.70 EE.VADDS.S16
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 0 qy[1:0] qx[2:0] 01100100
Assembler Syntax
EE.VADDS.S16 qa, qx, qy
Description
This instruction performs a vector addition on 16-bit data in the two registers qx and qy. Then, the 8 results
obtained from the calculation are saturated, and the saturated results are written to register qa.
Operation
1.8.71 EE.VADDS.S16.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 010 qu[0] qa[2:0] qx[1:0] qy[2:1] 1101 as[3:0] 111 qx[2]
Assembler Syntax
EE.VADDS.S16.LD.INCP qu, as, qa, qx, qy
Description
This instruction performs a vector addition on 16-bit data in the two registers qx and qy. Then, the 8 results
obtained from the calculation are saturated, and the saturated results are written to register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
5 qu[127:0] = load128({as[31:4],4{0}})
6 as[31:0] = as[31:0] + 16
1.8.72 EE.VADDS.S16.ST.INCP
Instruction Word
11100100 qy[0] qv[2:0] 1 qa[2:0] qx[1:0] qy[2:1] 0000 as[3:0] 111 qx[2]
Assembler Syntax
EE.VADDS.S16.ST.INCP qv, as, qa, qx, qy
Description
This instruction performs a vector addition on 16-bit data in the two registers qx and qy. Then, the 8 results
obtained from the calculation are saturated, and the saturated results are written to register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.73 EE.VADDS.S32
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 0 qy[1:0] qx[2:0] 01110100
Assembler Syntax
EE.VADDS.S32 qa, qx, qy
Description
This instruction performs a vector addition on 32-bit data in the two registers qx and qy. Then, the 4 results
obtained from the calculation are saturated, and the saturated results are written to register qa.
Operation
1.8.74 EE.VADDS.S32.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 011 qu[0] qa[2:0] qx[1:0] qy[2:1] 1101 as[3:0] 111 qx[2]
Assembler Syntax
EE.VADDS.S32.LD.INCP qu, as, qa, qx, qy
Description
This instruction performs a vector addition on 32-bit data in the two registers qx and qy. Then, the 4 results
obtained from the calculation are saturated, and the saturated results are written to register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
5 qu[127:0] = load128({as[31:4],4{0}})
6 as[31:0] = as[31:0] + 16
1.8.75 EE.VADDS.S32.ST.INCP
Instruction Word
11100100 qy[0] qv[2:0] 1 qa[2:0] qx[1:0] qy[2:1] 0001 as[3:0] 111 qx[2]
Assembler Syntax
EE.VADDS.S32.ST.INCP qv, as, qa, qx, qy
Description
This instruction performs a vector addition on 32-bit data in the two registers qx and qy. Then, the 4 results
obtained from the calculation are saturated, and the saturated results are written to register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.76 EE.VADDS.S8
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 0 qy[1:0] qx[2:0] 10000100
Assembler Syntax
EE.VADDS.S8 qa, qx, qy
Description
This instruction performs a vector addition on 8-bit data in the two registers qx and qy. Then, the 16 results
obtained from the calculation are saturated, and the saturated results are written to register qa.
Operation
1.8.77 EE.VADDS.S8.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 001 qu[0] qa[2:0] qx[1:0] qy[2:1] 1100 as[3:0] 111 qx[2]
Assembler Syntax
EE.VADDS.S8.LD.INCP qu, as, qa, qx, qy
Description
This instruction performs a vector addition on 8-bit data in the two registers qx and qy. Then, the 16 results
obtained from the calculation are saturated, and the saturated results are written to register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
5 qu[127:0] = load128({as[31:4],4{0}})
6 as[31:0] = as[31:0] + 16
1.8.78 EE.VADDS.S8.ST.INCP
Instruction Word
11100100 qy[0] qv[2:0] 1 qa[2:0] qx[1:0] qy[2:1] 0010 as[3:0] 111 qx[2]
Assembler Syntax
EE.VADDS.S8.ST.INCP qv, as, qa, qx, qy
Description
This instruction performs a vector addition on 8-bit data in the two registers qx and qy. Then, the 16 results
obtained from the calculation are saturated, and the saturated results are written to register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.79 EE.VCMP.EQ.S16
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 0 qy[1:0] qx[2:0] 10010100
Assembler Syntax
EE.VCMP.EQ.S16 qa, qx, qy
Description
This instruction compares 16-bit vector data. It compares the numerical values of the eight 16-bit data segments
in registers qx and qy. If the values are equal, it writes 0xFFFF into the corresponding 16-bit data segment in
register qa. Otherwise, it writes 0 to the segment.
Operation
1.8.80 EE.VCMP.EQ.S32
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 0 qy[1:0] qx[2:0] 10100100
Assembler Syntax
EE.VCMP.EQ.S32 qa, qx, qy
Description
This instruction compares 32-bit vector data. It compares the numerical values of the four 32-bit data segments
in registers qx and qy. If the values are equal, it writes 0xFFFFFFFF into the corresponding 32-bit data segment in
register qa. Otherwise, it writes 0 to the segment.
Operation
1.8.81 EE.VCMP.EQ.S8
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 0 qy[1:0] qx[2:0] 10110100
Assembler Syntax
EE.VCMP.EQ.S8 qa, qx, qy
Description
This instruction compares 8-bit vector data. It compares the numerical values of the 16 8-bit data segments in
registers qx and qy. If the values are equal, it writes 0xFF into the corresponding 8-bit data segment in register
qa. Otherwise, it writes 0 to the segment.
Operation
1.8.82 EE.VCMP.GT.S16
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 0 qy[1:0] qx[2:0] 11000100
Assembler Syntax
EE.VCMP.GT.S16 qa, qx, qy
Description
This instruction compares 16-bit vector data. It compares the numerical values of the eight 16-bit data segments
in registers qx and qy. If the former is larger than the latter, it writes 0xFFFF into the corresponding 16-bit data
segment in register qa. Otherwise, it writes 0 to the segment.
Operation
1.8.83 EE.VCMP.GT.S32
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 0 qy[1:0] qx[2:0] 11010100
Assembler Syntax
EE.VCMP.GT.S32 qa, qx, qy
Description
This instruction compares 32-bit vector data. It compares the numerical values of the four 32-bit data segments
in registers qx and qy. If the former is larger than the latter, it writes 0xFFFFFFFF into the corresponding 32-bit
data segment in register qa. Otherwise, it writes 0 to the segment.
Operation
1.8.84 EE.VCMP.GT.S8
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 0 qy[1:0] qx[2:0] 11100100
Assembler Syntax
EE.VCMP.GT.S8 qa, qx, qy
Description
This instruction compares 8-bit vector data. It compares the numerical values of the 16 8-bit data segments in
registers qx and qy. If the former is larger than the latter, it writes 0xFF into the corresponding 8-bit data segment
in register qa. Otherwise, it writes 0 to the segment.
Operation
1.8.85 EE.VCMP.LT.S16
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 0 qy[1:0] qx[2:0] 11110100
Assembler Syntax
EE.VCMP.LT.S16 qa, qx, qy
Description
This instruction compares 16-bit vector data. It compares the numerical values of the eight 16-bit data segments
in registers qx and qy. If the former is smaller than the latter, it writes 0xFFFF into the corresponding 16-bit data
segment in register qa. Otherwise, it writes 0 to the segment.
Operation
1.8.86 EE.VCMP.LT.S32
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 00000100
Assembler Syntax
EE.VCMP.LT.S32 qa, qx, qy
Description
This instruction compares 32-bit vector data. It compares the numerical values of the four 32-bit data segments
in registers qx and qy. If the former is smaller than the latter, it writes 0xFFFFFFFF into the corresponding 32-bit
data segment in register qa. Otherwise, it writes 0 to the segment.
Operation
1.8.87 EE.VCMP.LT.S8
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 00010100
Assembler Syntax
EE.VCMP.LT.S8 qa, qx, qy
Description
This instruction compares 8-bit vector data. It compares the numerical values of the 16 8-bit data segments in
registers qx and qy. If the former is smaller than the latter, it writes 0xFF into the corresponding 8-bit data
segment in register qa. Otherwise, it writes 0 to the segment.
Operation
1.8.88 EE.VLD.128.IP
Instruction Word
1 imm16[7] qu[2:1] 0011 qu[0] imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.VLD.128.IP qu, as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and loads 16-byte data from
memory to register qu. After the access is completed, the value in register as is incremented by 8-bit
sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1 qu[127:0] = load128({as[31:4],4{0}})
2 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.89 EE.VLD.128.XP
Instruction Word
10 qu[2:1] 1101 qu[0] 010 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.VLD.128.XP qu, as, ad
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and loads 16-byte data from
memory to register qu. After the access is completed, the value in register as is incremented by the value in
register ad.
Operation
1 qu[127:0] = load128({as[31:4],4{0}})
2 as[31:0] = as[31:0] + ad[31:0]
1.8.90 EE.VLD.H.64.IP
Instruction Word
1 imm8[7] qu[2:1] 1000 qu[0] imm8[6:0] as[3:0] 0100
Assembler Syntax
EE.VLD.H.64.IP qu, as, -1024..1016
Description
This instruction forces the lower 3 bits of the access address in register as to 0 and loads 64-bit data from
memory to the upper 64-bit segment in register qu. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 3.
Operation
1.8.91 EE.VLD.H.64.XP
Instruction Word
10 qu[2:1] 1101 qu[0] 110 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.VLD.H.64.XP qu, as, ad
Description
This instruction forces the lower 3 bits of the access address in register as to 0 and loads 64-bit data from
memory to the upper 64-bit segment in register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
1.8.92 EE.VLD.L.64.IP
Instruction Word
1 imm8[7] qu[2:1] 1001 qu[0] imm8[6:0] as[3:0] 0100
Assembler Syntax
EE.VLD.L.64.IP qu, as, -1024..1016
Description
This instruction forces the lower 3 bits of the access address in register as to 0 and loads 64-bit data from
memory to the lower 64-bit segment in register qu. After the access is completed, the value in register as is
incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by 3.
Operation
1.8.93 EE.VLD.L.64.XP
Instruction Word
10 qu[2:1] 1101 qu[0] 011 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.VLD.L.64.XP qu, as, ad
Description
This instruction forces the lower 3 bits of the access address in register as to 0 and loads 64-bit data from
memory to the lower 64-bit segment in register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
1.8.94 EE.VLDBC.16
Instruction Word
11 qu[2:1] 1101 qu[0] 1110011 as[3:0] 0100
Assembler Syntax
EE.VLDBC.16 qu, as
Description
This instruction forces the lower 1 bit of the access address in register as to 0, loads 16-bit data from memory,
and broadcasts it to the eight 16-bit data segments in register qu.
Operation
1 qu[127:0] = {8{load16({as[31:1],1{0}})}}
1.8.95 EE.VLDBC.16.IP
Instruction Word
10 qu[2:1] 0101 qu[0] imm2[6:0] as[3:0] 0100
Assembler Syntax
EE.VLDBC.16.IP qu, as, 0..254
Description
This instruction forces the lower 1 bit of the access address in register as to 0, loads 16-bit data from memory,
and broadcasts it to the eight 16-bit data segments in register qu. After the access is completed, the value in
register as is incremented by 7-bit unsign-extended constant in the instruction code segment left-shifted by
1.
Operation
1 qu[127:0] = {8{load16({as[31:1],1{0}})}}
2 as[31:0] = as[31:0] + {24{0},imm2[6:0],0}
1.8.96 EE.VLDBC.16.XP
Instruction Word
10 qu[2:1] 1101 qu[0] 100 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.VLDBC.16.XP qu, as, ad
Description
This instruction forces the lower 1 bit of the access address in register as to 0, loads 16-bit data from memory,
and broadcasts it to the eight 16-bit data segments in register qu. After the access is completed, the value in
register as is incremented by the value in register ad.
Operation
1 qu[127:0] = {8{load16({as[31:1],1{0}})}}
2 as = as + ad[31:0]
1.8.97 EE.VLDBC.32
Instruction Word
11 qu[2:1] 1101 qu[0] 1110111 as[3:0] 0100
Assembler Syntax
EE.VLDBC.32 qu, as
Description
This instruction forces the lower 2 bits of the access address in register as to 0 and loads 32-bit data from
memory and broadcasts it to the four 32-bit data segments in register qu.
Operation
1 qu[127:0] = {4{load32({as[31:2],2{0}})}}
1.8.98 EE.VLDBC.32.IP
Instruction Word
1 imm4[7] qu[2:1] 0010 qu[0] imm4[6:0] as[3:0] 0100
Assembler Syntax
EE.VLDBC.32.IP qu, as, -256..252
Description
This instruction forces the lower 2 bits of the access address in register as to 0 and loads 32-bit data from
memory and broadcasts it to the four 32-bit data segments in register qu. After the access is completed, the
value in register as is incremented by 8-bit sign-extended constant in the instruction code segment left-shifted by
2.
Operation
1 qu[127:0] = {4{load32({as[31:2],2{0}})}}
2 as[31:0] = as[31:0] + {22{imm4[7]},imm4[7:0],2{0}}
1.8.99 EE.VLDBC.32.XP
Instruction Word
10 qu[2:1] 1101 qu[0] 001 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.VLDBC.32.XP qu, as, ad
Description
This instruction forces the lower 2 bits of the access address in register as to 0, loads 32-bit data from memory
and broadcasts it to the four 32-bit data segments in register qu. After the access is completed, the value in
register as is incremented by the value in register ad.
Operation
1 qu[127:0] = {4{load32({as[31:2],2{0}})}}
2 as = as + ad[31:0]
1.8.100 EE.VLDBC.8
Instruction Word
11 qu[2:1] 1101 qu[0] 0111011 as[3:0] 0100
Assembler Syntax
EE.VLDBC.8 qu, as
Description
This instruction loads 8-bit data from memory at the address given by the access register as and broadcasts it to
the 16 8-bit data segments in register qu.
Operation
1 qu[127:0] = {16{load8(as[31:0])}}
1.8.101 EE.VLDBC.8.IP
Instruction Word
11 qu[2:1] 0101 qu[0] imm1[6:0] as[3:0] 0100
Assembler Syntax
EE.VLDBC.8.IP qu, as, 0..127
Description
This instruction loads 8-bit data from memory at the address given by the access register as and broadcasts it to
the 16 8-bit data segments in register qu. After the access is completed, the value in register as is incremented
by 7-bit unsign-extended constant in the instruction code segment.
Operation
1 qu[127:0] = {16{load8(as[31:0])}}
2 as[31:0] = as[31:0] + {25{0},imm1[6:0]}
1.8.102 EE.VLDBC.8.XP
Instruction Word
10 qu[2:1] 1101 qu[0] 101 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.VLDBC.8.XP qu, as, ad
Description
This instruction loads 8-bit data from memory at the address given by the access register as and broadcasts it to
the 16 8-bit data segments in register qu. After the access is completed, the value in register as is incremented
by the value in register ad.
Operation
1 qu[127:0] = {16{load8(as[31:0])}}
2 as = as + ad[31:0]
1.8.103 EE.VLDHBC.16.INCP
Instruction Word
11 qu[2:1] 1100 qu[0] qu1[2:0] 0010 as[3:0] 0100
Assembler Syntax
EE.VLDHBC.16.INCP qu, qu1, as
Description
This instruction forces the lower 4 bits of the access address in register as to 0, loads 16-byte data from memory,
extends it to 256 bits according to the following way, and assigns the result to registers qu and qu1. After the
access, the value in register as is incremented by 16.
Operation
1 dataIn[127:0] = load128({as[31:4],4{0}})
2 qu = {2{dataIn[ 63: 48]}, 2{dataIn[ 47: 32]}, 2{dataIn[ 31: 16]}, 2{dataIn[ 15: 0]} }
3 qu1 = {2{dataIn[127:112]}, 2{dataIn[111: 96]}, 2{dataIn[ 95: 80]}, 2{dataIn[ 79: 64]} }
4 as[31:0] = as[31:0] + 16
1.8.104 EE.VMAX.S16
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 00100100
Assembler Syntax
EE.VMAX.S16 qa, qx, qy
Description
This instruction compares numerical values of the eight 16-bit vector data segments in registers qx and qy. The
data segment with the larger value is written into the corresponding 16-bit data segment in register qa.
Operation
1 qa[ 15: 0] = (qx[ 15: 0]>=qy[ 15: 0]) ? qx[ 15: 0] : qy[ 15: 0]
2 qa[ 31: 16] = (qx[ 31: 16]>=qy[ 31: 16]) ? qx[ 31: 16] : qy[ 31: 16]
3 ...
4 qa[127:112] = (qx[127:112]>=qy[127:112]) ? qx[127:112] : qy[127:112]
1.8.105 EE.VMAX.S16.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 001 qu[0] qa[2:0] qx[1:0] qy[2:1] 1101 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMAX.S16.LD.INCP qu, as, qa, qx, qy
Description
This instruction compares numerical values of the eight 16-bit vector data segments in registers qx and qy. The
data segment with the larger value is written into the corresponding 16-bit data segment in register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
1 qa[ 15: 0] = (qx[ 15: 0]>=qy[ 15: 0]) ? qx[ 15: 0] : qy[ 15: 0]
2 qa[ 31: 16] = (qx[ 31: 16]>=qy[ 31: 16]) ? qx[ 31: 16] : qy[ 31: 16]
3 ...
4 qa[127:112] = (qx[127:112]>=qy[127:112]) ? qx[127:112] : qy[127:112]
5
6 qu[127:0] = load128({as[31:4],4{0}})
7 as[31:0] = as[31:0] + 16
1.8.106 EE.VMAX.S16.ST.INCP
Instruction Word
11100100 qy[0] qv[2:0] 1 qa[2:0] qx[1:0] qy[2:1] 0011 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMAX.S16.ST.INCP qv, as, qa, qx, qy
Description
This instruction compares numerical values of the eight 16-bit vector data segments in registers qx and qy. The
data segment with the larger value is written into the corresponding 16-bit data segment in register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1 qa[ 15: 0] = (qx[ 15: 0]>=qy[ 15: 0]) ? qx[ 15: 0] : qy[ 15: 0]
2 qa[ 31: 16] = (qx[ 31: 16]>=qy[ 31: 16]) ? qx[ 31: 16] : qy[ 31: 16]
3 ...
4 qa[127:112] = (qx[127:112]>=qy[127:112]) ? qx[127:112] : qy[127:112]
5
1.8.107 EE.VMAX.S32
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 00110100
Assembler Syntax
EE.VMAX.S32 qa, qx, qy
Description
This instruction compares numerical values of the four 32-bit vector data segments in registers qx and qy. The
data segment with the larger value is written into the corresponding 32-bit data segment in register qa.
Operation
1 qa[ 31: 0] = (qx[ 31: 0]>=qy[ 31: 0]) ? qx[ 31: 0] : qy[ 31: 0]
2 qa[ 63: 32] = (qx[ 63: 32]>=qy[ 63: 32]) ? qx[ 63: 32] : qy[ 63: 32]
3 ...
4 qa[127: 96] = (qx[127: 96]>=qy[127: 96]) ? qx[127: 96] : qy[127: 96]
1.8.108 EE.VMAX.S32.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 001 qu[0] qa[2:0] qx[1:0] qy[2:1] 1110 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMAX.S32.LD.INCP qu, as, qa, qx, qy
Description
This instruction compares numerical values of the four 32-bit vector data segments in registers qx and qy. The
data segment with the larger value is written into the corresponding 32-bit data segment in register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
1 qa[ 31: 0] = (qx[ 31: 0]>=qy[ 31: 0]) ? qx[ 31: 0] : qy[ 31: 0]
2 qa[ 63: 32] = (qx[ 63: 32]>=qy[ 63: 32]) ? qx[ 63: 32] : qy[ 63: 32]
3 ...
4 qa[127: 96] = (qx[127: 96]>=qy[127: 96]) ? qx[127: 96] : qy[127: 96]
5
6 qu[127:0] = load128({as[31:4],4{0}})
7 as[31:0] = as[31:0] + 16
1.8.109 EE.VMAX.S32.ST.INCP
Instruction Word
11100101 qy[0] qv[2:0] 0 qa[2:0] qx[1:0] qy[2:1] 0000 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMAX.S32.ST.INCP qv, as, qa, qx, qy
Description
This instruction compares numerical values of the four 32-bit vector data segments in registers qx and qy. The
data segment with the larger value is written into the corresponding 32-bit data segment in register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1 qa[ 31: 0] = (qx[ 31: 0]>=qy[ 31: 0]) ? qx[ 31: 0] : qy[ 31: 0]
2 qa[ 63: 32] = (qx[ 63: 32]>=qy[ 63: 32]) ? qx[ 63: 32] : qy[ 63: 32]
3 ...
4 qa[127: 96] = (qx[127: 96]>=qy[127: 96]) ? qx[127: 96] : qy[127: 96]
5
1.8.110 EE.VMAX.S8
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 01000100
Assembler Syntax
EE.VMAX.S8 qa, qx, qy
Description
This instruction compares numerical values of the 16 8-bit vector data segments in registers qx and qy. The data
segment with the larger value is written into the corresponding 8-bit data segment in register qa.
Operation
1.8.111 EE.VMAX.S8.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 001 qu[0] qa[2:0] qx[1:0] qy[2:1] 1111 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMAX.S8.LD.INCP qu, as, qa, qx, qy
Description
This instruction compares numerical values of the 16 8-bit vector data segments in registers qx and qy. The data
segment with the larger value is written into the corresponding 8-bit data segment in register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
6 qu[127:0] = load128({as[31:4],4{0}})
7 as[31:0] = as[31:0] + 16
1.8.112 EE.VMAX.S8.ST.INCP
Instruction Word
11100101 qy[0] qv[2:0] 1 qa[2:0] qx[1:0] qy[2:1] 0000 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMAX.S8.ST.INCP qv, as, qa, qx, qy
Description
This instruction compares numerical values of the 16 8-bit vector data segments in registers qx and qy. The data
segment with the larger value is written into the corresponding 8-bit data segment in register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.113 EE.VMIN.S16
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 01010100
Assembler Syntax
EE.VMIN.S16 qa, qx, qy
Description
This instruction compares numerical values of the eight 16-bit vector data segments in registers qx and qy. The
data segment with the smaller value is written into the corresponding 16-bit data segment in register qa.
Operation
1 qa[ 15: 0] = (qx[ 15: 0]<=qy[ 15: 0]) ? qx[ 15: 0] : qy[ 15: 0]
2 qa[ 31: 16] = (qx[ 31: 16]<=qy[ 31: 16]) ? qx[ 31: 16] : qy[ 31: 16]
3 ...
4 qa[127:112] = (qx[127:112]<=qy[127:112]) ? qx[127:112] : qy[127:112]
1.8.114 EE.VMIN.S16.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 010 qu[0] qa[2:0] qx[1:0] qy[2:1] 1110 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMIN.S16.LD.INCP qu, as, qa, qx, qy
Description
This instruction compares numerical values of the eight 16-bit vector data segments in registers qx and qy. The
data segment with the smaller value is written into the corresponding 16-bit data segment in register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
1 qa[ 15: 0] = (qx[ 15: 0]<=qy[ 15: 0]) ? qx[ 15: 0] : qy[ 15: 0]
2 qa[ 31: 16] = (qx[ 31: 16]<=qy[ 31: 16]) ? qx[ 31: 16] : qy[ 31: 16]
3 ...
4 qa[127:112] = (qx[127:112]<=qy[127:112]) ? qx[127:112] : qy[127:112]
5
6 qu[127:0] = load128({as[31:4],4{0}})
7 as[31:0] = as[31:0] + 16
1.8.115 EE.VMIN.S16.ST.INCP
Instruction Word
11100101 qy[0] qv[2:0] 0 qa[2:0] qx[1:0] qy[2:1] 0001 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMIN.S16.ST.INCP qv, as, qa, qx, qy
Description
This instruction compares numerical values of the eight 16-bit vector data segments in registers qx and qy. The
data segment with the smaller value is written into the corresponding 16-bit data segment in register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1 qa[ 15: 0] = (qx[ 15: 0]<=qy[ 15: 0]) ? qx[ 15: 0] : qy[ 15: 0]
2 qa[ 31: 16] = (qx[ 31: 16]<=qy[ 31: 16]) ? qx[ 31: 16] : qy[ 31: 16]
3 ...
4 qa[127:112] = (qx[127:112]<=qy[127:112]) ? qx[127:112] : qy[127:112]
5
1.8.116 EE.VMIN.S32
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 01100100
Assembler Syntax
EE.VMIN.S32 qa, qx, qy
Description
This instruction compares numerical values of the four 32-bit vector data segments in registers qx and qy. The
data segment with the smaller value is written into the corresponding 32-bit data segment in register qa.
Operation
1 qa[ 31: 0] = (qx[ 31: 0]<=qy[ 31: 0]) ? qx[ 31: 0] : qy[ 31: 0]
2 qa[ 63: 32] = (qx[ 63: 32]<=qy[ 63: 32]) ? qx[ 63: 32] : qy[ 63: 32]
3 ...
4 qa[127: 96] = (qx[127: 96]<=qy[127: 96]) ? qx[127: 96] : qy[127: 96]
1.8.117 EE.VMIN.S32.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 011 qu[0] qa[2:0] qx[1:0] qy[2:1] 1110 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMIN.S32.LD.INCP qu, as, qa, qx, qy
Description
This instruction compares numerical values of the four 32-bit vector data segments in registers qx and qy. The
data segment with the smaller value is written into the corresponding 32-bit data segment in register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
1 qa[ 31: 0] = (qx[ 31: 0]<=qy[ 31: 0]) ? qx[ 31: 0] : qy[ 31: 0]
2 qa[ 63: 32] = (qx[ 63: 32]<=qy[ 63: 32]) ? qx[ 63: 32] : qy[ 63: 32]
3 ...
4 qa[127: 96] = (qx[127: 96]<=qy[127: 96]) ? qx[127: 96] : qy[127: 96]
5
6 qu[127:0] = load128({as[31:4],4{0}})
7 as[31:0] = as[31:0] + 16
1.8.118 EE.VMIN.S32.ST.INCP
Instruction Word
11100101 qy[0] qv[2:0] 1 qa[2:0] qx[1:0] qy[2:1] 0001 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMIN.S32.ST.INCP qv, as, qa, qx, qy
Description
This instruction compares numerical values of the four 32-bit vector data segments in registers qx and qy. The
data segment with the smaller value is written into the corresponding 32-bit data segment in register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1 qa[ 31: 0] = (qx[ 31: 0]<=qy[ 31: 0]) ? qx[ 31: 0] : qy[ 31: 0]
2 qa[ 63: 32] = (qx[ 63: 32]<=qy[ 63: 32]) ? qx[ 63: 32] : qy[ 63: 32]
3 ...
4 qa[127: 96] = (qx[127: 96]<=qy[127: 96]) ? qx[127: 96] : qy[127: 96]
5
1.8.119 EE.VMIN.S8
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 01110100
Assembler Syntax
EE.VMIN.S8 qa, qx, qy
Description
This instruction compares numerical values of the 16 8-bit vector data segments in registers qx and qy. The data
segment with the smaller value is written into the corresponding 8-bit data segment in register qa.
Operation
1.8.120 EE.VMIN.S8.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 010 qu[0] qa[2:0] qx[1:0] qy[2:1] 1111 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMIN.S8.LD.INCP qu, as, qa, qx, qy
Description
This instruction compares numerical values of the 16 8-bit vector data segments in registers qx and qy. The data
segment with the smaller value is written into the corresponding 8-bit data segment in register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
6 qu[127:0] = load128({as[31:4],4{0}})
7 as[31:0] = as[31:0] + 16
1.8.121 EE.VMIN.S8.ST.INCP
Instruction Word
11100101 qy[0] qv[2:0] 0 qa[2:0] qx[1:0] qy[2:1] 0010 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMIN.S8.ST.INCP qv, as, qa, qx, qy
Description
This instruction compares numerical values of the 16 8-bit vector data segments in registers qx and qy. The data
segment with the smaller value is written into the corresponding 8-bit data segment in register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.122 EE.VMUL.S16
Instruction Word
10 qz[2:1] 1110 qz[0] qy[2] 1 qy[1:0] qx[2:0] 10000100
Assembler Syntax
EE.VMUL.S16 qz, qx, qy
Description
This instruction performs a signed vector multiplication on 16-bit data. Registers qx and qy are the multiplier and
the multiplicand respectively. The eight 32-bit data results obtained from the calculation is arithmetically
right-shifted by the value in special register SAR. Then, the lower 16-bit data of the shift result is written into
corresponding segment of register qz.
Operation
1.8.123 EE.VMUL.S16.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 011 qu[0] qz[2:0] qx[1:0] qy[2:1] 1111 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMUL.S16.LD.INCP qu, as, qz, qx, qy
Description
This instruction performs a signed vector multiplication on 16-bit data. Registers qx and qy are the multiplier and
the multiplicand respectively. The eight 32-bit data results obtained from the calculation is arithmetically
right-shifted by the value in special register SAR. Then, the lower 16-bit data of the shift result is written into
corresponding segment of register qz.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + 16
1.8.124 EE.VMUL.S16.ST.INCP
Instruction Word
11100101 qy[0] qv[2:0] 1 qz[2:0] qx[1:0] qy[2:1] 0010 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMUL.S16.ST.INCP qv, as, qz, qx, qy
Description
This instruction performs a signed vector multiplication on 16-bit data. Registers qx and qy are the multiplier and
the multiplicand respectively. The eight 32-bit data results obtained from the calculation is arithmetically
right-shifted by the value in special register SAR. Then, the lower 16-bit data of the shift result is written into
corresponding segment of register qz.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.125 EE.VMUL.S8
Instruction Word
10 qz[2:1] 1110 qz[0] qy[2] 1 qy[1:0] qx[2:0] 10010100
Assembler Syntax
EE.VMUL.S8 qz, qx, qy
Description
This instruction performs a signed vector multiplication on 8-bit data. Registers qx and qy are the multiplier and
the multiplicand respectively. The 16 16-bit data results obtained from the calculation is arithmetically
right-shifted by the value in special register SAR. Then, the lower 8-bit data of the shift result is written into
corresponding segment of register qz.
Operation
1.8.126 EE.VMUL.S8.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 100 qu[0] qz[2:0] qx[1:0] qy[2:1] 1100 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMUL.S8.LD.INCP qu, as, qz, qx, qy
Description
This instruction performs a signed vector multiplication on 8-bit data. Registers qx and qy are the multiplier and
the multiplicand respectively. The 16 16-bit data results obtained from the calculation is arithmetically
right-shifted by the value in special register SAR. Then, the lower 8-bit data of the shift result is written into
corresponding segment of register qz.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
18 qu[127:0] = load128({as[31:4],4{0}})
19 as[31:0] = as[31:0] + 16
1.8.127 EE.VMUL.S8.ST.INCP
Instruction Word
11100101 qy[0] qv[2:0] 0 qz[2:0] qx[1:0] qy[2:1] 0011 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMUL.S8.ST.INCP qv, as, qz, qx, qy
Description
This instruction performs a signed vector multiplication on 8-bit data. Registers qx and qy are the multiplier and
the multiplicand respectively. The 16 16-bit data results obtained from the calculation is arithmetically
right-shifted by the value in special register SAR. Then, the lower 8-bit data of the shift result is written into
corresponding segment of register qz.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.128 EE.VMUL.U16
Instruction Word
10 qz[2:1] 1110 qz[0] qy[2] 1 qy[1:0] qx[2:0] 10100100
Assembler Syntax
EE.VMUL.U16 qz, qx, qy
Description
This instruction performs an unsigned vector multiplication on 16-bit data. Registers qx and qy are the multiplier
and the multiplicand respectively. The eight 32-bit data results obtained from the calculation is logically
right-shifted by the value in special register SAR. Then, the lower 16-bit data of the shift result is written into
corresponding segment of register qz.
Operation
1.8.129 EE.VMUL.U16.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 101 qu[0] qz[2:0] qx[1:0] qy[2:1] 1100 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMUL.U16.LD.INCP qu, as, qz, qx, qy
Description
This instruction performs an unsigned vector multiplication on 16-bit data. Registers qx and qy are the multiplier
and the multiplicand respectively. The eight 32-bit data results obtained from the calculation is logically
right-shifted by the value in special register SAR. Then, the lower 16-bit data of the shift result is written into
corresponding segment of register qz.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + 16
1.8.130 EE.VMUL.U16.ST.INCP
Instruction Word
11100101 qy[0] qv[2:0] 1 qz[2:0] qx[1:0] qy[2:1] 0011 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMUL.U16.ST.INCP qv, as, qz, qx, qy
Description
This instruction performs an unsigned vector multiplication on 16-bit data. Registers qx and qy are the multiplier
and the multiplicand respectively. The eight 32-bit data results obtained from the calculation is logically
right-shifted by the value in special register SAR. Then, the lower 16-bit data of the shift result is written into
corresponding segment of register qz.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.131 EE.VMUL.U8
Instruction Word
10 qz[2:1] 1110 qz[0] qy[2] 1 qy[1:0] qx[2:0] 10110100
Assembler Syntax
EE.VMUL.U8 qz, qx, qy
Description
This instruction performs an unsigned vector multiplication on 8-bit data. Registers qx and qy are the multiplier
and the multiplicand respectively. The 16 16-bit data results obtained from the calculation is logically right-shifted
by the value in special register SAR. Then, the lower 8-bit data of the shift result is written into corresponding
segment of register qz.
Operation
1.8.132 EE.VMUL.U8.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 110 qu[0] qz[2:0] qx[1:0] qy[2:1] 1100 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMUL.U8.LD.INCP qu, as, qz, qx, qy
Description
This instruction performs an unsigned vector multiplication on 8-bit data. Registers qx and qy are the multiplier
and the multiplicand respectively. The 16 32-bit data results obtained from the calculation is logically right-shifted
by the value in special register SAR. Then, the lower 8-bit data of the shift result is written into corresponding
segment of register qz.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
18 qu[127:0] = load128({as[31:4],4{0}})
19 as[31:0] = as[31:0] + 16
1.8.133 EE.VMUL.U8.ST.INCP
Instruction Word
11101000 qy[0] qv[2:0] 1 qz[2:0] qx[1:0] qy[2:1] 0000 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMUL.U8.ST.INCP qv, as, qz, qx, qy
Description
This instruction performs an unsigned vector multiplication on 8-bit data. Registers qx and qy are the multiplier
and the multiplicand respectively. The 16 16-bit data results obtained from the calculation is logically right-shifted
by the value in special register SAR. Then, the lower 8-bit data of the shift result is written into corresponding
segment of register qz.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.134 EE.VMULAS.S16.ACCX
Instruction Word
000110100 qy[2] 0 qy[1:0] qx[2:0] 10000100
Assembler Syntax
EE.VMULAS.S16.ACCX qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, it performs a signed
multiply-accumulate operation on the 8 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
Operation
1.8.135 EE.VMULAS.S16.ACCX.LD.IP
Instruction Word
1111 imm16[5:4] qu[2:1] qy[0] 000 qu[0] 000 qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S16.ACCX.LD.IP qu, as, -512..496, qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, it performs a signed
multiply-accumulate operation on the 8 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.136 EE.VMULAS.S16.ACCX.LD.IP.QUP
Instruction Word
0000 imm16[5:4] qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S16.ACCX.LD.IP.QUP qu, as, imm16, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, it performs a signed
multiply-accumulate operation on the 8 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
10 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.137 EE.VMULAS.S16.ACCX.LD.XP
Instruction Word
111100 qu[2:1] qy[0] 001 qu[0] 000 qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S16.ACCX.LD.XP qu, as, ad, qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, it performs a signed
multiply-accumulate operation on the 8 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + ad[31:0]
1.8.138 EE.VMULAS.S16.ACCX.LD.XP.QUP
Instruction Word
101100 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S16.ACCX.LD.XP.QUP qu, as, ad, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, it performs a signed
multiply-accumulate operation on the 8 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + ad[31:0]
10 qs0[127:0] = {qs1[127: 0], qs0[127: 0]} >> {SAR_BYTE[3:0] << 3}
1.8.139 EE.VMULAS.S16.QACC
Instruction Word
000110100 qy[2] 1 qy[1:0] qx[2:0] 10000100
Assembler Syntax
EE.VMULAS.S16.QACC qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the signed multiplication result
of 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H and QACC_L
respectively. The calculated result is saturated to a 40-bit signed number and then stored to the corresponding
40-bit data segment in QACC_H and QACC_L.
Operation
1 QACC_L[ 39: 0] = min(max(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], -2^{39}),
2^{39}-1)
2 QACC_L[ 79: 40] = min(max(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], -2^{39}),
2^{39}-1)
3 QACC_L[119: 80] = min(max(QACC_L[119: 80] + qx[ 47: 32] * qy[ 47: 32], -2^{39}),
2^{39}-1)
4 QACC_L[159:120] = min(max(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], -2^{39}),
2^{39}-1)
5 QACC_H[ 39: 0] = min(max(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], -2^{39}),
2^{39}-1)
6 QACC_H[ 79: 40] = min(max(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], -2^{39}),
2^{39}-1)
7 QACC_H[119: 80] = min(max(QACC_H[119: 80] + qx[111: 96] * qy[111: 96], -2^{39}),
2^{39}-1)
8 QACC_H[159:120] = min(max(QACC_H[159:120] + qx[127:112] * qy[127:112], -2^{39}),
2^{39}-1)
1.8.140 EE.VMULAS.S16.QACC.LD.IP
Instruction Word
1111 imm16[5:4] qu[2:1] qy[0] 000 qu[0] 001 qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S16.QACC.LD.IP qu, as, imm16, qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the signed multiplication result
of 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H and QACC_L
respectively. The calculated result is saturated to a 40-bit signed number and then stored to the corresponding
40-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1 QACC_L[ 39: 0] = min(max(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], -2^{39}),
2^{39}-1)
2 QACC_L[ 79: 40] = min(max(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], -2^{39}),
2^{39}-1)
3 QACC_L[119: 80] = min(max(QACC_L[119: 80] + qx[ 47: 32] * qy[ 47: 32], -2^{39}),
2^{39}-1)
4 QACC_L[159:120] = min(max(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], -2^{39}),
2^{39}-1)
5 QACC_H[ 39: 0] = min(max(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], -2^{39}),
2^{39}-1)
6 QACC_H[ 79: 40] = min(max(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], -2^{39}),
2^{39}-1)
7 QACC_H[119: 80] = min(max(QACC_H[119: 80] + qx[111: 96] * qy[111: 96], -2^{39}),
2^{39}-1)
8 QACC_H[159:120] = min(max(QACC_H[159:120] + qx[127:112] * qy[127:112], -2^{39}),
2^{39}-1)
9
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + {22{imm16[5]},imm16[5:0],4{0}}
1.8.141 EE.VMULAS.S16.QACC.LD.IP.QUP
Instruction Word
0001 imm16[5:4] qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S16.QACC.LD.IP.QUP qu, as, imm16, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the signed multiplication result
of 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H and QACC_L
respectively. The calculated result is saturated to a 40-bit signed number and then stored to the corresponding
40-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
1 QACC_L[ 39: 0] = min(max(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], -2^{39}),
2^{39}-1)
2 QACC_L[ 79: 40] = min(max(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], -2^{39}),
2^{39}-1)
3 QACC_L[119: 80] = min(max(QACC_L[119: 80] + qx[ 47: 32] * qy[ 47: 32], -2^{39}),
2^{39}-1)
4 QACC_L[159:120] = min(max(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], -2^{39}),
2^{39}-1)
5 QACC_H[ 39: 0] = min(max(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], -2^{39}),
2^{39}-1)
6 QACC_H[ 79: 40] = min(max(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], -2^{39}),
2^{39}-1)
7 QACC_H[119: 80] = min(max(QACC_H[119: 80] + qx[111: 96] * qy[111: 96], -2^{39}),
2^{39}-1)
8 QACC_H[159:120] = min(max(QACC_H[159:120] + qx[127:112] * qy[127:112], -2^{39}),
2^{39}-1)
9
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + {22{imm16[5]},imm16[5:0],4{0}}
12 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.142 EE.VMULAS.S16.QACC.LD.XP
Instruction Word
111100 qu[2:1] qy[0] 001 qu[0] 001 qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S16.QACC.LD.XP qu, as, ad, qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the signed multiplication result
of 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H and QACC_L
respectively. The calculated result is saturated to a 40-bit signed number and then stored to the corresponding
40-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
1 QACC_L[ 39: 0] = min(max(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], -2^{39}),
2^{39}-1)
2 QACC_L[ 79: 40] = min(max(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], -2^{39}),
2^{39}-1)
3 QACC_L[119: 80] = min(max(QACC_L[119: 80] + qx[ 47: 32] * qy[ 47: 32], -2^{39}),
2^{39}-1)
4 QACC_L[159:120] = min(max(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], -2^{39}),
2^{39}-1)
5 QACC_H[ 39: 0] = min(max(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], -2^{39}),
2^{39}-1)
6 QACC_H[ 79: 40] = min(max(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], -2^{39}),
2^{39}-1)
7 QACC_H[119: 80] = min(max(QACC_H[119: 80] + qx[111: 96] * qy[111: 96], -2^{39}),
2^{39}-1)
8 QACC_H[159:120] = min(max(QACC_H[159:120] + qx[127:112] * qy[127:112], -2^{39}),
2^{39}-1)
9
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + ad[31:0]
1.8.143 EE.VMULAS.S16.QACC.LD.XP.QUP
Instruction Word
101101 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S16.QACC.LD.XP.QUP qu, as, ad, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the signed multiplication result
of 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H and QACC_L
respectively. The calculated result is saturated to a 40-bit signed number and then stored to the corresponding
40-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
1 QACC_L[ 39: 0] = min(max(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], -2^{39}),
2^{39}-1)
2 QACC_L[ 79: 40] = min(max(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], -2^{39}),
2^{39}-1)
3 QACC_L[119: 80] = min(max(QACC_L[119: 80] + qx[ 47: 32] * qy[ 47: 32], -2^{39}),
2^{39}-1)
4 QACC_L[159:120] = min(max(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], -2^{39}),
2^{39}-1)
5 QACC_H[ 39: 0] = min(max(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], -2^{39}),
2^{39}-1)
6 QACC_H[ 79: 40] = min(max(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], -2^{39}),
2^{39}-1)
7 QACC_H[119: 80] = min(max(QACC_H[119: 80] + qx[111: 96] * qy[111: 96], -2^{39}),
2^{39}-1)
8 QACC_H[159:120] = min(max(QACC_H[159:120] + qx[127:112] * qy[127:112], -2^{39}),
2^{39}-1)
9
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + ad[31:0]
12 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.144 EE.VMULAS.S16.QACC.LDBC.INCP
Instruction Word
100 qu[2] 0111 qu[1] qy[2] qu[0] qy[1:0] qx[2:0] as[3:0] 0100
Assembler Syntax
EE.VMULAS.S16.QACC.LDBC.INCP qu, as, qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the signed multiplication result
of 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H and QACC_L
respectively. The calculated result is saturated to a 40-bit signed number and then stored to the corresponding
40-bit data segment in QACC_H and QACC_L.
At the same time, this instruction forces the lower 1 bit of the access address in register as to 0, loads 16-bit
data from memory, and broadcasts it to the eight 16-bit data segments in register qu. After the access, the value
in register as is incremented by 2.
Operation
1 QACC_L[ 39: 0] = min(max(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], -2^{39}),
2^{39}-1)
2 QACC_L[ 79: 40] = min(max(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], -2^{39}),
2^{39}-1)
3 QACC_L[119: 80] = min(max(QACC_L[119: 80] + qx[ 47: 32] * qy[ 47: 32], -2^{39}),
2^{39}-1)
4 QACC_L[159:120] = min(max(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], -2^{39}),
2^{39}-1)
5 QACC_H[ 39: 0] = min(max(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], -2^{39}),
2^{39}-1)
6 QACC_H[ 79: 40] = min(max(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], -2^{39}),
2^{39}-1)
7 QACC_H[119: 80] = min(max(QACC_H[119: 80] + qx[111: 96] * qy[111: 96], -2^{39}),
2^{39}-1)
8 QACC_H[159:120] = min(max(QACC_H[159:120] + qx[127:112] * qy[127:112], -2^{39}),
2^{39}-1)
9
10 qu[127:0] = {8{load16({as[31:1],1{0}})}}
11 as[31:0] = as[31:0] + 2
1.8.145 EE.VMULAS.S16.QACC.LDBC.INCP.QUP
Instruction Word
111000 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] 1000 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S16.QACC.LDBC.INCP.QUP qu, as, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the signed multiplication result
of 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H and QACC_L
respectively. The calculated result is saturated to a 40-bit signed number and then stored to the corresponding
40-bit data segment in QACC_H and QACC_L.
At the same time, this instruction forces the lower 1 bit of the access address in register as to 0, loads 16-bit
data from memory, and broadcasts it to the eight 16-bit data segments in register qu. After the access, the value
in register as is incremented by 2.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
1 QACC_L[ 39: 0] = min(max(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], -2^{39}),
2^{39}-1)
2 QACC_L[ 79: 40] = min(max(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], -2^{39}),
2^{39}-1)
3 QACC_L[119: 80] = min(max(QACC_L[119: 80] + qx[ 47: 32] * qy[ 47: 32], -2^{39}),
2^{39}-1)
4 QACC_L[159:120] = min(max(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], -2^{39}),
2^{39}-1)
5 QACC_H[ 39: 0] = min(max(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], -2^{39}),
2^{39}-1)
6 QACC_H[ 79: 40] = min(max(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], -2^{39}),
2^{39}-1)
7 QACC_H[119: 80] = min(max(QACC_H[119: 80] + qx[111: 96] * qy[111: 96], -2^{39}),
2^{39}-1)
8 QACC_H[159:120] = min(max(QACC_H[159:120] + qx[127:112] * qy[127:112], -2^{39}),
2^{39}-1)
9
10 qu[127:0] = {8{load16({as[31:1],1{0}})}}
11 as[31:0] = as[31:0] + 2
12 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.146 EE.VMULAS.S8.ACCX
Instruction Word
000110100 qy[2] 0 qy[1:0] qx[2:0] 11000100
Assembler Syntax
EE.VMULAS.S8.ACCX qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, it performs a signed
multiply-accumulate operation on the 16 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
Operation
1.8.147 EE.VMULAS.S8.ACCX.LD.IP
Instruction Word
1111 imm16[5:4] qu[2:1] qy[0] 000 qu[0] 010 qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S8.ACCX.LD.IP qu, as, -512..496, qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, it performs a signed
multiply-accumulate operation on the 16 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
7 qu[127:0] = load128({as[31:4],4{0}})
8 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.148 EE.VMULAS.S8.ACCX.LD.IP.QUP
Instruction Word
0010 imm16[5:4] qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S8.ACCX.LD.IP.QUP qu, as, imm16, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, it performs a signed
multiply-accumulate operation on the 16 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
7 qu[127:0] = load128({as[31:4],4{0}})
8 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
9 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.149 EE.VMULAS.S8.ACCX.LD.XP
Instruction Word
111100 qu[2:1] qy[0] 001 qu[0] 010 qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S8.ACCX.LD.XP qu, as, ad, qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, it performs a signed
multiply-accumulate operation on the 16 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + ad[31:0]
1.8.150 EE.VMULAS.S8.ACCX.LD.XP.QUP
Instruction Word
101110 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S8.ACCX.LD.XP.QUP qu, as, ad, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, it performs a signed
multiply-accumulate operation on the 16 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + ad[31:0]
10 qs0[127:0] = {qs1[127: 0], qs0[127: 0]} >> {SAR_BYTE[3:0] << 3}
1.8.151 EE.VMULAS.S8.QACC
Instruction Word
000110100 qy[2] 1 qy[1:0] qx[2:0] 11000100
Assembler Syntax
EE.VMULAS.S8.QACC qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the signed multiplication result
of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H and
QACC_L respectively. The calculated result is saturated to a 20-bit signed number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
Operation
1.8.152 EE.VMULAS.S8.QACC.LD.IP
Instruction Word
1111 imm16[5:4] qu[2:1] qy[0] 000 qu[0] 011 qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the signed multiplication result
of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H and
QACC_L respectively. The calculated result is saturated to a 20-bit signed number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
Assembler Syntax
EE.VMULAS.S8.QACC.LD.IP qu, as, imm16, qx, qy
Description
Operation
18 qu[127:0] = load128({as[31:4],4{0}})
1.8.153 EE.VMULAS.S8.QACC.LD.IP.QUP
Instruction Word
0011 imm16[5:4] qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S8.QACC.LD.IP.QUP qu, as, imm16, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the signed multiplication result
of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H and
QACC_L respectively. The calculated result is saturated to a 20-bit signed number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting the two
registers qs0 and qs1 that store consecutive aligned data and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
18 qu[127:0] = load128({as[31:4],4{0}})
19 as[31:0] = as[31:0] + {22{imm16[5]},imm16[5:0],4{0}}
20 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.154 EE.VMULAS.S8.QACC.LD.XP
Instruction Word
111100 qu[2:1] qy[0] 001 qu[0] 011 qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S8.QACC.LD.XP qu, as, ad, qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the signed multiplication result
of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H and
QACC_L respectively. The calculated result is saturated to a 20-bit signed number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
18 qu[127:0] = load128({as[31:4],4{0}})
19 as[31:0] = as[31:0] + ad[31:0]
1.8.155 EE.VMULAS.S8.QACC.LD.XP.QUP
Instruction Word
101111 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S8.QACC.LD.XP.QUP qu, as, ad, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the signed multiplication result
of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H and
QACC_L respectively. The calculated result is saturated to a 20-bit signed number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
18 qu[127:0] = load128({as[31:4],4{0}})
19 as[31:0] = as[31:0] + ad[31:0]
20 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.156 EE.VMULAS.S8.QACC.LDBC.INCP
Instruction Word
101 qu[2] 0111 qu[1] qy[2] qu[0] qy[1:0] qx[2:0] as[3:0] 0100
Assembler Syntax
EE.VMULAS.S8.QACC.LDBC.INCP qu, as, qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the signed multiplication result
of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H and
QACC_L respectively. The calculated result is saturated to a 20-bit signed number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
At the same time, this instruction loads 8-bit data from memory at the address given by the access register as
and broadcasts it to the 16 8-bit data segments in register qu. After the access, the value in register as is
incremented by 1.
Operation
18 qu[127:0] = {16{load8(as[31:0])}}
19 as[31:0] = as[31:0] + 1
1.8.157 EE.VMULAS.S8.QACC.LDBC.INCP.QUP
Instruction Word
111000 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] 1001 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.S8.QACC.LDBC.INCP.QUP qu, as, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the signed multiplication result
of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H and
QACC_L respectively. The calculated result is saturated to a 20-bit signed number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
At the same time, this instruction loads 8-bit data from memory at the address given by the access register as
and broadcasts it to the 16 8-bit data segments in register qu. After the access, the value in register as is
incremented by 1.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
18 qu[127:0] = {16{load8(as[31:0])}}
19 as[31:0] = as[31:0] + 1
20 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.158 EE.VMULAS.U16.ACCX
Instruction Word
000010100 qy[2] 0 qy[1:0] qx[2:0] 10000100
Assembler Syntax
EE.VMULAS.U16.ACCX qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, it performs an unsigned
multiply-accumulate operation on the 8 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
Operation
1.8.159 EE.VMULAS.U16.ACCX.LD.IP
Instruction Word
1111 imm16[5:4] qu[2:1] qy[0] 000 qu[0] 100 qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U16.ACCX.LD.IP qu, as, -512..496, qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, it performs an unsigned
multiply-accumulate operation on the 8 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.160 EE.VMULAS.U16.ACCX.LD.IP.QUP
Instruction Word
0100 imm16[5:4] qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U16.ACCX.LD.IP.QUP qu, as, imm16, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, it performs a signed
multiply-accumulate operation on the 8 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
10 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.161 EE.VMULAS.U16.ACCX.LD.XP
Instruction Word
111100 qu[2:1] qy[0] 001 qu[0] 100 qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U16.ACCX.LD.XP qu, as, ad, qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, it performs an unsigned
multiply-accumulate operation on the 8 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + ad[31:0]
1.8.162 EE.VMULAS.U16.ACCX.LD.XP.QUP
Instruction Word
110000 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U16.ACCX.LD.XP.QUP qu, as, ad, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, it performs an unsigned
multiply-accumulate operation on the 8 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + ad[31:0]
10 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.163 EE.VMULAS.U16.QACC
Instruction Word
000010100 qy[2] 1 qy[1:0] qx[2:0] 10000100
Assembler Syntax
EE.VMULAS.U16.QACC qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the unsigned multiplication
result of the 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 40-bit unsigned number and then stored to the
corresponding 40-bit data segment in QACC_H and QACC_L.
Operation
1 QACC_L[ 39: 0] = min(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], 2^{40}-1)
2 QACC_L[ 79: 40] = min(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], 2^{40}-1)
3 ...
4 QACC_L[159:120] = min(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], 2^{40}-1)
5 QACC_H[ 39: 0] = min(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], 2^{40}-1)
6 QACC_H[ 79: 40] = min(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], 2^{40}-1)
7 ...
8 QACC_H[159:120] = min(QACC_H[159:120] + qx[127:112] * qy[127:112], 2^{40}-1)
1.8.164 EE.VMULAS.U16.QACC.LD.IP
Instruction Word
1111 imm16[5:4] qu[2:1] qy[0] 000 qu[0] 101 qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U16.QACC.LD.IP qu, as, imm16, qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the unsigned multiplication
result of the 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 40-bit unsigned number and then stored to the
corresponding 40-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
1 QACC_L[ 39: 0] = min(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], 2^{40}-1)
2 QACC_L[ 79: 40] = min(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], 2^{40}-1)
3 ...
4 QACC_L[159:120] = min(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], 2^{40}-1)
5 QACC_H[ 39: 0] = min(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], 2^{40}-1)
6 QACC_H[ 79: 40] = min(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], 2^{40}-1)
7 ...
8 QACC_H[159:120] = min(QACC_H[159:120] + qx[127:112] * qy[127:112], 2^{40}-1)
9
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + {22{imm16[5]},imm16[5:0],4{0}}
1.8.165 EE.VMULAS.U16.QACC.LD.IP.QUP
Instruction Word
0101 imm16[5:4] qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U16.QACC.LD.IP.QUP qu, as, imm16, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the unsigned multiplication
result of the 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 40-bit unsigned number and then stored to the
corresponding 40-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
1 QACC_L[ 39: 0] = min(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], 2^{40}-1)
2 QACC_L[ 79: 40] = min(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], 2^{40}-1)
3 ...
4 QACC_L[159:120] = min(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], 2^{40}-1)
5 QACC_H[ 39: 0] = min(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], 2^{40}-1)
6 QACC_H[ 79: 40] = min(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], 2^{40}-1)
7 ...
8 QACC_H[159:120] = min(QACC_H[159:120] + qx[127:112] * qy[127:112], 2^{40}-1)
9
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + {22{imm16[5]},imm16[5:0],4{0}}
12 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.166 EE.VMULAS.U16.QACC.LD.XP
Instruction Word
111100 qu[2:1] qy[0] 001 qu[0] 101 qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U16.QACC.LD.XP qu, as, ad, qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the unsigned multiplication
result of the 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 40-bit unsigned number and then stored to the
corresponding 40-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
1 QACC_L[ 39: 0] = min(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], 2^{40}-1)
2 QACC_L[ 79: 40] = min(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], 2^{40}-1)
3 ...
4 QACC_L[159:120] = min(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], 2^{40}-1)
5 QACC_H[ 39: 0] = min(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], 2^{40}-1)
6 QACC_H[ 79: 40] = min(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], 2^{40}-1)
7 ...
8 QACC_H[159:120] = min(QACC_H[159:120] + qx[127:112] * qy[127:112], 2^{40}-1)
9
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + ad[31:0]
1.8.167 EE.VMULAS.U16.QACC.LD.XP.QUP
Instruction Word
110001 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U16.QACC.LD.XP.QUP qu, as, ad, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the unsigned multiplication
result of the 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 40-bit unsigned number and then stored to the
corresponding 40-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
1 QACC_L[ 39: 0] = min(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], 2^{40}-1)
2 QACC_L[ 79: 40] = min(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], 2^{40}-1)
3 ...
4 QACC_L[159:120] = min(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], 2^{40}-1)
5 QACC_H[ 39: 0] = min(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], 2^{40}-1)
6 QACC_H[ 79: 40] = min(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], 2^{40}-1)
7 ...
8 QACC_H[159:120] = min(QACC_H[159:120] + qx[127:112] * qy[127:112], 2^{40}-1)
9
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + ad[31:0]
12 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.168 EE.VMULAS.U16.QACC.LDBC.INCP
Instruction Word
110 qu[2] 0111 qu[1] qy[2] qu[0] qy[1:0] qx[2:0] as[3:0] 0100
Assembler Syntax
EE.VMULAS.U16.QACC.LDBC.INCP qu, as, qx, qy
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the unsigned multiplication
result of the 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 40-bit unsigned number and then stored to the
corresponding 40-bit data segment in QACC_H and QACC_L.
At the same time, this instruction forces the lower 1 bit of the access address in register as to 0, loads 16-bit
data from memory, and broadcasts it to the eight 16-bit data segments in register qu. After the access, the value
in register as is incremented by 2.
Operation
1 QACC_L[ 39: 0] = min(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], 2^{40}-1)
2 QACC_L[ 79: 40] = min(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], 2^{40}-1)
3 ...
4 QACC_L[159:120] = min(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], 2^{40}-1)
5 QACC_H[ 39: 0] = min(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], 2^{40}-1)
6 QACC_H[ 79: 40] = min(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], 2^{40}-1)
7 ...
8 QACC_H[159:120] = min(QACC_H[159:120] + qx[127:112] * qy[127:112], 2^{40}-1)
9
10 qu[127:0] = {8{load16({as[31:1],1{0}})}}
11 as[31:0] = as[31:0] + 2
1.8.169 EE.VMULAS.U16.QACC.LDBC.INCP.QUP
Instruction Word
111000 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] 1010 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U16.QACC.LDBC.INCP.QUP qu, as, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 8 data segments by 16 bits. Then, the unsigned multiplication
result of the 8 sets of segments is added to the corresponding 40-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 40-bit unsigned number and then stored to the
corresponding 40-bit data segment in QACC_H and QACC_L.
At the same time, this instruction forces the lower 1 bit of the access address in register as to 0, loads 16-bit
data from memory, and broadcasts it to the eight 16-bit data segments in register qu. After the access, the value
in register as is incremented by 2.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
1 QACC_L[ 39: 0] = min(QACC_L[ 39: 0] + qx[ 15: 0] * qy[ 15: 0], 2^{40}-1)
2 QACC_L[ 79: 40] = min(QACC_L[ 79: 40] + qx[ 31: 16] * qy[ 31: 16], 2^{40}-1)
3 ...
4 QACC_L[159:120] = min(QACC_L[159:120] + qx[ 63: 48] * qy[ 63: 48], 2^{40}-1)
5 QACC_H[ 39: 0] = min(QACC_H[ 39: 0] + qx[ 79: 64] * qy[ 79: 64], 2^{40}-1)
6 QACC_H[ 79: 40] = min(QACC_H[ 79: 40] + qx[ 95: 80] * qy[ 95: 80], 2^{40}-1)
7 ...
8 QACC_H[159:120] = min(QACC_H[159:120] + qx[127:112] * qy[127:112], 2^{40}-1)
9
10 qu[127:0] = {8{load16({as[31:1],1{0}})}}
11 as[31:0] = as[31:0] + 2
12 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.170 EE.VMULAS.U8.ACCX
Instruction Word
000010100 qy[2] 0 qy[1:0] qx[2:0] 11000100
Assembler Syntax
EE.VMULAS.U8.ACCX qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, it performs an unsigned
multiply-accumulate operation on the 16 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
Operation
1.8.171 EE.VMULAS.U8.ACCX.LD.IP
Instruction Word
1111 imm16[5:4] qu[2:1] qy[0] 000 qu[0] 110 qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U8.ACCX.LD.IP qu, as, -512..496, qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, it performs an unsigned
multiply-accumulate operation on the 16 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
1.8.172 EE.VMULAS.U8.ACCX.LD.IP.QUP
Instruction Word
0110 imm16[5:4] qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U8.ACCX.LD.IP.QUP qu, as, imm16, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, it performs an unsigned
multiply-accumulate operation on the 16 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + {20{imm16[7]},imm16[7:0],4{0}}
10 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.173 EE.VMULAS.U8.ACCX.LD.XP
Instruction Word
111100 qu[2:1] qy[0] 001 qu[0] 110 qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U8.ACCX.LD.XP qu, as, ad, qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, it performs an unsigned
multiply-accumulate operation on the 16 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + ad[31:0]
1.8.174 EE.VMULAS.U8.ACCX.LD.XP.QUP
Instruction Word
110010 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U8.ACCX.LD.XP.QUP qu, as, ad, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, it performs an unsigned
multiply-accumulate operation on the 16 sets of segments respectively. The accumulated result is added to the
value in special register ACCX. Then, the sum obtained is saturated and then stored in ACCX.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
8 qu[127:0] = load128({as[31:4],4{0}})
9 as[31:0] = as[31:0] + ad[31:0]
10 qs0[127:0] = {qs1[127: 0], qs0[127: 0]} >> {SAR_BYTE[3:0] << 3}
1.8.175 EE.VMULAS.U8.QACC
Instruction Word
000010100 qy[2] 1 qy[1:0] qx[2:0] 11000100
Assembler Syntax
EE.VMULAS.U8.QACC qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the unsigned multiplication
result of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 20-bit unsigned number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
Operation
1.8.176 EE.VMULAS.U8.QACC.LD.IP
Instruction Word
1111 imm16[5:4] qu[2:1] qy[0] 000 qu[0] 111 qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U8.QACC.LD.IP qu, as, imm16, qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the unsigned multiplication
result of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 20-bit unsigned number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
Operation
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + {22{imm16[5]},imm16[5:0],4{0}}
1.8.177 EE.VMULAS.U8.QACC.LD.IP.QUP
Instruction Word
0111 imm16[5:4] qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] imm16[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U8.QACC.LD.IP.QUP qu, as, imm16, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the unsigned multiplication
result of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 20-bit unsigned number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by 6-bit sign-extended constant in the instruction code segment left-shifted by 4.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + {22{imm16[5]},imm16[5:0],4{0}}
12 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.178 EE.VMULAS.U8.QACC.LD.XP
Instruction Word
111100 qu[2:1] qy[0] 001 qu[0] 111 qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U8.QACC.LD.XP qu, as, ad, qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the unsigned multiplication
result of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 20-bit unsigned number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
Operation
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + ad[31:0]
1.8.179 EE.VMULAS.U8.QACC.LD.XP.QUP
Instruction Word
110011 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] ad[3:0] as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U8.QACC.LD.XP.QUP qu, as, ad, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the unsigned multiplication
result of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 20-bit unsigned number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access is completed, the value in register as is
incremented by the value in register ad.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
10 qu[127:0] = load128({as[31:4],4{0}})
11 as[31:0] = as[31:0] + ad[31:0]
12 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.180 EE.VMULAS.U8.QACC.LDBC.INCP
Instruction Word
111 qu[2] 0111 qu[1] qy[2] qu[0] qy[1:0] qx[2:0] as[3:0] 0100
Assembler Syntax
EE.VMULAS.U8.QACC.LDBC.INCP qu, as, qx, qy
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the unsigned multiplication
result of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 20-bit unsigned number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
At the same time, this instruction loads 8-bit data from memory at the address given by the access register as
and broadcasts it to the 16 8-bit data segments in register qu. After the access, the value in register as is
incremented by 1.
Operation
10 qu[127:0] = {16{load8(as[31:0])}}
11 as[31:0] = as[31:0] + 1
1.8.181 EE.VMULAS.U8.QACC.LDBC.INCP.QUP
Instruction Word
111000 qu[2:1] qy[0] qs0[2:0] qu[0] qs1[2:0] qx[1:0] qy[2:1] 1011 as[3:0] 111 qx[2]
Assembler Syntax
EE.VMULAS.U8.QACC.LDBC.INCP.QUP qu, as, qx, qy, qs0, qs1
Description
This instruction divides registers qx and qy into 16 data segments by 8 bits. Then, the unsigned multiplication
result of the 16 sets of segments is added to the corresponding 20-bit data segment in special registers QACC_H
and QACC_L respectively. The calculated result is saturated to a 20-bit unsigned number and then stored to the
corresponding 20-bit data segment in QACC_H and QACC_L.
At the same time, this instruction loads 8-bit data from memory at the address given by the access register as
and broadcasts it to the 16 8-bit data segments in register qu. After the access, the value in register as is
incremented by 1.
At the same time, this instruction also obtains 16-byte unaligned data by concatenating and shifting consecutive
aligned data stored in the two registers qs0 and qs1 and stores it to qs0. The shift byte is stored in special
register SAR_BYTE.
Operation
10 qu[127:0] = {16{load8(as[31:0])}}
11 as[31:0] = as[31:0] + 1
12 qs0[127:0] = {qs1[127:0], qs0[127:0]} >> {SAR_BYTE[3:0] << 3}
1.8.182 EE.VPRELU.S16
Instruction Word
10 qz[2:1] 1100 qz[0] qy[2] 0 qy[1:0] qx[2:0] ay[3:0] 0100
Assembler Syntax
EE.VPRELU.S16 qz, qx, qy, ay
Description
This instruction divides register qx into 8 data segments by 16 bits. If the value of the segment is not greater than
0, it will be multiplied by the value of the corresponding 16-bit segment in register qy right-shifted by the lower
6-bit value in register ay, and then the result obtained will be assigned to the corresponding 16-bit data segment
in register qz. Otherwise, the value of the segment in qx will be assigned to qz.
Operation
1 qz[ 15: 0] = (qx[ 15: 0]<=0) ? (qx[ 15: 0] * qy[ 15: 0]) >> ay[5:0] : qx[ 15: 0]
2 qz[ 31: 16] = (qx[ 31: 16]<=0) ? (qx[ 31: 16] * qy[ 31: 16]) >> ay[5:0] : qx[ 31: 16]
3 ...
4 qz[127:112] = (qx[127:112]<=0) ? (qx[127:112] * qy[127:112]) >> ay[5:0] : qx[127:112]
1.8.183 EE.VPRELU.S8
Instruction Word
10 qz[2:1] 1100 qz[0] qy[2] 1 qy[1:0] qx[2:0] ay[3:0] 0100
Assembler Syntax
EE.VPRELU.S8 qz, qx, qy, ay
Description
This instruction divides register qx into 16 data segments by 8 bits. If the value of the segment is not greater than
0, it will be multiplied by the value of the corresponding 8-bit segment in register qy and right-shifted by the lower
5-bit value in register ay, and then the calculated result will be assigned to the corresponding 8-bit data segment
in register qz. Otherwise, the value of the segment in qx will be assigned to qz.
Operation
1.8.184 EE.VRELU.S16
Instruction Word
11 qs[2:1] 1101 qs[0] 001 ax[3:0] ay[3:0] 0100
Assembler Syntax
EE.VRELU.S16 qs, ax, ay
Description
This instruction divides register qs into 8 data segments by 16 bits. If the value of the segment is not greater than
0, it will be multiplied by the value of the lower 16 bits in register ax and right-shifted by the value of the lower 6
bits in register ay, and then the result obtained will overwrite the value of the segment. Otherwise, the value of the
segment will remain unchanged.
Operation
1 qs[ 15: 0] = (qs[ 15: 0]<=0) ? (qs[ 15: 0] * ax[15:0]) >> ay[5:0] : qs[ 15: 0]
2 qs[ 31: 16] = (qs[ 31: 16]<=0) ? (qs[ 31: 16] * ax[15:0]) >> ay[5:0] : qs[ 31: 16]
3 ...
4 qs[127:112] = (qs[127:112]<=0) ? (qs[127:112] * ax[15:0]) >> ay[5:0] : qs[127:112]
1.8.185 EE.VRELU.S8
Instruction Word
11 qs[2:1] 1101 qs[0] 101 ax[3:0] ay[3:0] 0100
Assembler Syntax
EE.VRELU.S8 qs, ax, ay
Description
This instruction divides register qs into 16 data segments by 8 bits. If the value of the segment is not greater than
0, it will be multiplied by the value of the lower 8 bits in register ax and right-shifted by the value of the lower 5 bits
in register ay, and then the result obtained will overwrite the value of the segment. Otherwise, the value of the
segment will remain unchanged.
Operation
1.8.186 EE.VSL.32
Instruction Word
11 qs[2:1] 1101 qs[0] 01111110 qa[2:0] 0100
Assembler Syntax
EE.VSL.32 qa, qs
Description
This instruction performs a left shift on the four 32-bit data segments in register qs respectively. The left shift
amount is the value in the 6-bit special register SAR. During the shift process, the lower bits are padded with 0.
The lower 32 bits of the shift result are stored in the corresponding data segment in register qa.
Operation
1.8.187 EE.VSMULAS.S16.QACC
Instruction Word
10 sel8[2:1] 1110 sel8[0] qy[2] 1 qy[1:0] qx[2:0] 11000100
Assembler Syntax
EE.VSMULAS.S16.QACC qx, qy, sel8
Description
This instruction selects one out of the eight 16-bit data segments in register qy according to immediate number
sel8 and performs a signed multiplication on it and the eight 16-bit data segments in register qx respectively. The
8 results obtained are added to the corresponding 40-bit data segment in special registers QACC_H and QACC_L
respectively. Then, the result is saturated to a 40-bit signed number and then stored to the corresponding 40-bit
data segment in QACC_H and QACC_L.
Operation
1 temp[15:0] = qy[sel8*16+15:sel8*16]
2 QACC_L[ 39: 0] = min(max(QACC_L[ 39: 0] + qx[ 15: 0] * temp[15:0], -2^{39}),
2^{39}-1)
3 QACC_L[ 79: 40] = min(max(QACC_L[ 79: 40] + qx[ 31: 16] * temp[15:0], -2^{39}),
2^{39}-1)
4 QACC_L[119: 80] = min(max(QACC_L[119: 80] + qx[ 47: 32] * temp[15:0], -2^{39}),
2^{39}-1)
5 QACC_L[159:120] = min(max(QACC_L[159:120] + qx[ 63: 48] * temp[15:0], -2^{39}),
2^{39}-1)
6 QACC_H[ 39: 0] = min(max(QACC_H[ 39: 0] + qx[ 79: 64] * temp[15:0], -2^{39}),
2^{39}-1)
7 QACC_H[ 79: 40] = min(max(QACC_H[ 79: 40] + qx[ 95: 80] * temp[15:0], -2^{39}),
2^{39}-1)
8 QACC_H[119: 80] = min(max(QACC_H[119: 80] + qx[111: 96] * temp[15:0], -2^{39}),
2^{39}-1)
9 QACC_H[159:120] = min(max(QACC_H[159:120] + qx[127:112] * temp[15:0], -2^{39}),
2^{39}-1)
1.8.188 EE.VSMULAS.S16.QACC.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 111 qu[0] sel8[2:0] qx[1:0] qy[2:1] 1100 as[3:0] 111 qx[2]
Assembler Syntax
EE.VSMULAS.S16.QACC.LD.INCP qu, as, qx, qy, sel8
Description
This instruction selects one out of the eight 16-bit data segments in register qy according to immediate number
sel8 and performs a signed multiplication on it and the eight 16-bit data segments in register qx respectively. The
8 results obtained are added to the corresponding 40-bit data segment in special registers QACC_H and QACC_L
respectively. Then, the result is saturated to a 40-bit signed number and then stored to the corresponding 40-bit
data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
1 temp[15:0] = qy[sel8*16+15:sel8*16]
2 QACC_L[ 39: 0] = min(max(QACC_L[ 39: 0] + qx[ 15: 0] * temp[15:0], -2^{39}),
2^{39}-1)
3 QACC_L[ 79: 40] = min(max(QACC_L[ 79: 40] + qx[ 31: 16] * temp[15:0], -2^{39}),
2^{39}-1)
4 QACC_L[119: 80] = min(max(QACC_L[119: 80] + qx[ 47: 32] * temp[15:0], -2^{39}),
2^{39}-1)
5 QACC_L[159:120] = min(max(QACC_L[159:120] + qx[ 63: 48] * temp[15:0], -2^{39}),
2^{39}-1)
6 QACC_H[ 39: 0] = min(max(QACC_H[ 39: 0] + qx[ 79: 64] * temp[15:0], -2^{39}),
2^{39}-1)
7 QACC_H[ 79: 40] = min(max(QACC_H[ 79: 40] + qx[ 95: 80] * temp[15:0], -2^{39}),
2^{39}-1)
8 QACC_H[119: 80] = min(max(QACC_H[119: 80] + qx[111: 96] * temp[15:0], -2^{39}),
2^{39}-1)
9 QACC_H[159:120] = min(max(QACC_H[159:120] + qx[127:112] * temp[15:0], -2^{39}),
2^{39}-1)
10
11 qu[127:0] = load128({as[31:4],4{0}})
12 as[31:0] = as[31:0] + 16
1.8.189 EE.VSMULAS.S8.QACC
Instruction Word
10 sel16[3:2] 1110 sel16[1] qy[2] 0 qy[1:0] qx[2:0] 010 sel16[0] 0100
Assembler Syntax
EE.VSMULAS.S8.QACC qx, qy, sel16
Description
This instruction selects one out of the 16 8-bit data segments in register qy according to immediate number
sel16 and performs a signed multiplication on it and the 16 8-bit data segments in register qx respectively. The
16 results obtained are added to the corresponding 20-bit data segment in special registers QACC_H and QACC_L
respectively. Then, the result is saturated to a 20-bit signed number and then stored to the corresponding 20-bit
data segment in QACC_H and QACC_L.
Operation
1 temp[7:0] = qy[sel16*8+7:sel16*8]
2 QACC_L[ 19: 0] = min(max(QACC_L[ 19: 0] + qx[ 7: 0] * temp[7:0], -2^{19}), 2^{19}-1)
3 QACC_L[ 39: 20] = min(max(QACC_L[ 39: 20] + qx[ 15: 8] * temp[7:0], -2^{19}), 2^{19}-1)
4 QACC_L[ 59: 40] = min(max(QACC_L[ 59: 40] + qx[ 23: 16] * temp[7:0], -2^{19}), 2^{19}-1)
5 QACC_L[ 79: 60] = min(max(QACC_L[ 79: 60] + qx[ 31: 24] * temp[7:0], -2^{19}), 2^{19}-1)
6 QACC_L[ 99: 80] = min(max(QACC_L[ 99: 80] + qx[ 39: 32] * temp[7:0], -2^{19}), 2^{19}-1)
7 QACC_L[119:100] = min(max(QACC_L[119:100] + qx[ 47: 40] * temp[7:0], -2^{19}), 2^{19}-1)
8 QACC_L[139:120] = min(max(QACC_L[139:120] + qx[ 55: 48] * temp[7:0], -2^{19}), 2^{19}-1)
9 QACC_L[159:140] = min(max(QACC_L[159:140] + qx[ 63: 56] * temp[7:0], -2^{19}), 2^{19}-1)
10 QACC_H[ 19: 0] = min(max(QACC_H[ 19: 0] + qx[ 71: 64] * temp[7:0], -2^{19}), 2^{19}-1)
11 QACC_H[ 39: 20] = min(max(QACC_H[ 39: 20] + qx[ 79: 72] * temp[7:0], -2^{19}), 2^{19}-1)
12 QACC_H[ 59: 40] = min(max(QACC_H[ 59: 40] + qx[ 87: 80] * temp[7:0], -2^{19}), 2^{19}-1)
13 QACC_H[ 79: 60] = min(max(QACC_H[ 79: 60] + qx[ 95: 88] * temp[7:0], -2^{19}), 2^{19}-1)
14 QACC_H[ 99: 80] = min(max(QACC_H[ 99: 80] + qx[103: 96] * temp[7:0], -2^{19}), 2^{19}-1)
15 QACC_H[119:100] = min(max(QACC_H[119:100] + qx[111:104] * temp[7:0], -2^{19}), 2^{19}-1)
16 QACC_H[139:120] = min(max(QACC_H[139:120] + qx[119:112] * temp[7:0], -2^{19}), 2^{19}-1)
17 QACC_H[159:140] = min(max(QACC_H[159:140] + qx[127:120] * temp[7:0], -2^{19}), 2^{19}-1)
1.8.190 EE.VSMULAS.S8.QACC.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 01 sel16[0] qu[0] sel16[3:1] qx[1:0] qy[2:1] 1100 as[3:0] 111 qx[2]
Assembler Syntax
EE.VSMULAS.S8.QACC.LD.INCP qu, as, qx, qy, sel16
Description
This instruction selects one out of the 16 8-bit data segments in register qy according to immediate number
sel16 and performs a signed multiplication on it and the 16 8-bit data segments in register qx respectively. The
16 results obtained are added to the corresponding 20-bit data segment in special registers QACC_H and QACC_L
respectively. Then, the result is saturated to a 20-bit signed number and then stored to the corresponding 20-bit
data segment in QACC_H and QACC_L.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
1 temp[7:0] = qy[sel16*8+7:sel16*8]
2 QACC_L[ 19: 0] = min(max(QACC_L[ 19: 0] + qx[ 7: 0] * temp[7:0], -2^{19}), 2^{19}-1)
3 QACC_L[ 39: 20] = min(max(QACC_L[ 39: 20] + qx[ 15: 8] * temp[7:0], -2^{19}), 2^{19}-1)
4 QACC_L[ 59: 40] = min(max(QACC_L[ 59: 40] + qx[ 23: 16] * temp[7:0], -2^{19}), 2^{19}-1)
5 QACC_L[ 79: 60] = min(max(QACC_L[ 79: 60] + qx[ 31: 24] * temp[7:0], -2^{19}), 2^{19}-1)
6 QACC_L[ 99: 80] = min(max(QACC_L[ 99: 80] + qx[ 39: 32] * temp[7:0], -2^{19}), 2^{19}-1)
7 QACC_L[119:100] = min(max(QACC_L[119:100] + qx[ 47: 40] * temp[7:0], -2^{19}), 2^{19}-1)
8 QACC_L[139:120] = min(max(QACC_L[139:120] + qx[ 55: 48] * temp[7:0], -2^{19}), 2^{19}-1)
9 QACC_L[159:140] = min(max(QACC_L[159:140] + qx[ 63: 56] * temp[7:0], -2^{19}), 2^{19}-1)
10 QACC_H[ 19: 0] = min(max(QACC_H[ 19: 0] + qx[ 71: 64] * temp[7:0], -2^{19}), 2^{19}-1)
11 QACC_H[ 39: 20] = min(max(QACC_H[ 39: 20] + qx[ 79: 72] * temp[7:0], -2^{19}), 2^{19}-1)
12 QACC_H[ 59: 40] = min(max(QACC_H[ 59: 40] + qx[ 87: 80] * temp[7:0], -2^{19}), 2^{19}-1)
13 QACC_H[ 79: 60] = min(max(QACC_H[ 79: 60] + qx[ 95: 88] * temp[7:0], -2^{19}), 2^{19}-1)
14 QACC_H[ 99: 80] = min(max(QACC_H[ 99: 80] + qx[103: 96] * temp[7:0], -2^{19}), 2^{19}-1)
15 QACC_H[119:100] = min(max(QACC_H[119:100] + qx[111:104] * temp[7:0], -2^{19}), 2^{19}-1)
16 QACC_H[139:120] = min(max(QACC_H[139:120] + qx[119:112] * temp[7:0], -2^{19}), 2^{19}-1)
17 QACC_H[159:140] = min(max(QACC_H[159:140] + qx[127:120] * temp[7:0], -2^{19}), 2^{19}-1)
18
19 qu[127:0] = load128({as[31:4],4{0}})
20 as[31:0] = as[31:0] + 16
1.8.191 EE.VSR.32
Instruction Word
11 qs[2:1] 1101 qs[0] 01111111 qa[2:0] 0100
Assembler Syntax
EE.VSR.32 qa, qs
Description
This instruction performs an arithmetic right shift on the four 32-bit data segments in register qs respectively. The
shift amount is the value in the 6-bit special register SAR. During the shift process, the higher bits are padded with
signed bit. The lower 32 bits of the shift result are stored in the corresponding data segment in register qa.
Operation
1.8.192 EE.VST.128.IP
Instruction Word
1 imm16[7] qv[2:1] 1010 qv[0] imm16[6:0] as[3:0] 0100
Assembler Syntax
EE.VST.128.IP qv, as, -2048..2032
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and stores the 128 bits in register
qv to memory. After the access is completed, the value in register as is incremented by 8-bit sign-extended
constant in the instruction code segment left-shifted by 4.
Operation
1.8.193 EE.VST.128.XP
Instruction Word
10 qv[2:1] 1101 qv[0] 111 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.VST.128.XP qv, as, ad
Description
This instruction forces the lower 4 bits of the access address in register as to 0 and stores the 128 bits in register
qv to memory. After the access is completed, the value in register as is incremented by the value in register
ad.
Operation
1.8.194 EE.VST.H.64.IP
Instruction Word
1 imm8[7] qv[2:1] 1011 qv[0] imm8[6:0] as[3:0] 0100
Assembler Syntax
EE.VST.H.64.IP qv, as, -1024..1016
Description
This instruction forces the lower 3 bits of the access address in register as to 0 and stores the upper 64 bits in
register qv to memory. After the access is completed, the value in register as is incremented by 8-bit
sign-extended constant in the instruction code segment left-shifted by 3.
Operation
1.8.195 EE.VST.H.64.XP
Instruction Word
11 qv[2:1] 1101 qv[0] 000 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.VST.H.64.XP qv, as, ad
Description
This instruction forces the lower 3 bits of the access address in register as to 0 and stores the upper 64 bits in
register qv to memory. After the access is completed, the value in register as is incremented by the value in
register ad.
Operation
1.8.196 EE.VST.L.64.IP
Instruction Word
1 imm8[7] qv[2:1] 0100 qv[0] imm8[6:0] as[3:0] 0100
Assembler Syntax
EE.VST.L.64.IP qv, as, -1024..1016
Description
This instruction forces the lower 3 bits of the access address in register as to 0 and stores the lower 64 bits in
register qv to memory. After the access is completed, the value in register as is incremented by 8-bit
sign-extended constant in the instruction code segment left-shifted by 3.
Operation
1.8.197 EE.VST.L.64.XP
Instruction Word
11 qv[2:1] 1101 qv[0] 100 ad[3:0] as[3:0] 0100
Assembler Syntax
EE.VST.L.64.XP qv, as, ad
Description
This instruction forces the lower 3 bits of the access address in register as to 0 and stores the lower 64 bits in
register qv to memory. After the access is completed, the value in register as is incremented by the value in
register ad.
Operation
1.8.198 EE.VSUBS.S16
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 11010100
Assembler Syntax
EE.VSUBS.S16 qa, qx, qy
Description
This instruction performs a vector subtraction on 16-bit data. Registers qx and qy are the subtrahend and the
minuend respectively. Then, the 8 results obtained from the calculation are saturated and then written into
register qa.
Operation
1.8.199 EE.VSUBS.S16.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 100 qu[0] qa[2:0] qx[1:0] qy[2:1] 1101 as[3:0] 111 qx[2]
Assembler Syntax
EE.VSUBS.S16.LD.INCP qu, as, qa, qx, qy
Description
This instruction performs a vector subtraction on 16-bit data. Registers qx and qy are the subtrahend and the
minuend respectively. Then, the 8 results obtained from the calculation are saturated and then written into
register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
5 qu[127:0] = load128({as[31:4],4{0}})
6 as[31:0] = as[31:0] + 16
1.8.200 EE.VSUBS.S16.ST.INCP
Instruction Word
11101000 qy[0] qv[2:0] 1 qa[2:0] qx[1:0] qy[2:1] 0001 as[3:0] 111 qx[2]
Assembler Syntax
EE.VSUBS.S16.ST.INCP qv, as, qa, qx, qy
Description
This instruction performs a vector subtraction on 16-bit data. Registers qx and qy are the subtrahend and the
minuend respectively. Then, the 8 results obtained from the calculation are saturated and then written into
register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.201 EE.VSUBS.S32
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 11100100
Assembler Syntax
EE.VSUBS.S32 qa, qx, qy
Description
This instruction performs a vector subtraction on 32-bit data. Registers qx and qy are the subtrahend and the
minuend respectively. Then, the 4 results obtained from the calculation are saturated and then written into
register qa.
Operation
1.8.202 EE.VSUBS.S32.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 101 qu[0] qa[2:0] qx[1:0] qy[2:1] 1101 as[3:0] 111 qx[2]
Assembler Syntax
EE.VSUBS.S32.LD.INCP qu, as, qa, qx, qy
Description
This instruction performs a vector subtraction on 32-bit data. Registers qx and qy are the subtrahend and the
minuend respectively. Then, the 4 results obtained from the calculation are saturated and then written into
register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
5 qu[127:0] = load128({as[31:4],4{0}})
6 as[31:0] = as[31:0] + 16
1.8.203 EE.VSUBS.S32.ST.INCP
Instruction Word
11101000 qy[0] qv[2:0] 1 qa[2:0] qx[1:0] qy[2:1] 0010 as[3:0] 111 qx[2]
Assembler Syntax
EE.VSUBS.S32.ST.INCP qv, as, qa, qx, qy
Description
This instruction performs a vector subtraction on 32-bit data. Registers qx and qy are the subtrahend and the
minuend respectively. Then, the 4 results obtained from the calculation are saturated and then written into
register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.204 EE.VSUBS.S8
Instruction Word
10 qa[2:1] 1110 qa[0] qy[2] 1 qy[1:0] qx[2:0] 11110100
Assembler Syntax
EE.VSUBS.S8 qa, qx, qy
Description
This instruction performs a vector subtraction on 8-bit data. Registers qx and qy are the subtrahend and the
minuend respectively. Then, the 16 results obtained from the calculation are saturated and then written into
register qa.
Operation
1.8.205 EE.VSUBS.S8.LD.INCP
Instruction Word
111000 qu[2:1] qy[0] 110 qu[0] qa[2:0] qx[1:0] qy[2:1] 1101 as[3:0] 111 qx[2]
Assembler Syntax
EE.VSUBS.S8.LD.INCP qu, as, qa, qx, qy
Description
This instruction performs a vector subtraction on 8-bit data. Registers qx and qy are the subtrahend and the
minuend respectively. Then, the 16 results obtained from the calculation are saturated and then written into
register qa.
During the operation, the lower 4 bits of the access address in register as are forced to be 0, and then the
16-byte data is loaded from the memory to register qu. After the access, the value in register as is incremented
by 16.
Operation
5 qu[127:0] = load128({as[31:4],4{0}})
6 as[31:0] = as[31:0] + 16
1.8.206 EE.VSUBS.S8.ST.INCP
Instruction Word
11101000 qy[0] qv[2:0] 1 qa[2:0] qx[1:0] qy[2:1] 0011 as[3:0] 111 qx[2]
Assembler Syntax
EE.VSUBS.S8.ST.INCP qv, as, qa, qx, qy
Description
This instruction performs a vector subtraction on 8-bit data. Registers qx and qy are the subtrahend and the
minuend respectively. Then, the 16 results obtained from the calculation are saturated and then written into
register qa.
During the operation, the instruction forces the lower 4 bits of the access address in register as to 0 and stores
the value in register qv to memory. After the access, the value in register as is incremented by 16.
Operation
1.8.207 EE.VUNZIP.16
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 001110000100
Assembler Syntax
EE.VUNZIP.16 qs0, qs1
Description
This instruction implements the unzip algorithm on 16-bit vector data.
Operation
1.8.208 EE.VUNZIP.32
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 001110010100
Assembler Syntax
EE.VUNZIP.32 qs0, qs1
Description
This instruction implements the unzip algorithm on 32-bit vector data.
Operation
1.8.209 EE.VUNZIP.8
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 001110100100
Assembler Syntax
EE.VUNZIP.8 qs0, qs1
Description
This instruction implements the unzip algorithm on 8-bit vector data.
Operation
1 qs0[ 7: 0] = qs0[ 7: 0]
2 qs0[ 15: 8] = qs0[ 23: 16]
3 qs0[ 23: 16] = qs0[ 39: 32]
4 qs0[ 31: 24] = qs0[ 55: 48]
5 qs0[ 39: 32] = qs0[ 71: 64]
6 qs0[ 47: 40] = qs0[ 87: 80]
7 qs0[ 55: 48] = qs0[103: 96]
8 qs0[ 63: 56] = qs0[119:112]
9 qs0[ 71: 64] = qs1[ 7: 0]
10 qs0[ 79: 72] = qs1[ 23: 16]
11 qs0[ 87: 80] = qs1[ 39: 32]
12 qs0[ 95: 88] = qs1[ 55: 48]
13 qs0[103: 96] = qs1[ 71: 64]
14 qs0[111:104] = qs1[ 87: 80]
15 qs0[119:112] = qs1[103: 96]
16 qs0[127:120] = qs1[119:112]
17 qs1[ 7: 0] = qs0[ 15: 8]
18 qs1[ 15: 8] = qs0[ 31: 24]
19 qs1[ 23: 16] = qs0[ 47: 40]
20 qs1[ 31: 24] = qs0[ 63: 56]
21 qs1[ 39: 32] = qs0[ 79: 72]
22 qs1[ 47: 40] = qs0[ 95: 88]
23 qs1[ 55: 48] = qs0[111:104]
24 qs1[ 63: 56] = qs0[127:120]
25 qs1[ 71: 64] = qs1[ 15: 8]
26 qs1[ 79: 72] = qs1[ 31: 24]
27 qs1[ 87: 80] = qs1[ 47: 40]
28 qs1[ 95: 88] = qs1[ 63: 56]
29 qs1[103: 96] = qs1[ 79: 72]
30 qs1[111:104] = qs1[ 95: 88]
31 qs1[119:112] = qs1[111:104]
32 qs1[127:120] = qs1[127:120]
1.8.210 EE.VZIP.16
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 001110110100
Assembler Syntax
EE.VZIP.16 qs0, qs1
Description
This instruction implements the zip algorithm on 16-bit vector data.
Operation
1.8.211 EE.VZIP.32
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 001111000100
Assembler Syntax
EE.VZIP.32 qs0, qs1
Description
This instruction implements the zip algorithm on 32-bit vector data.
Operation
1.8.212 EE.VZIP.8
Instruction Word
11 qs1[2:1] 1100 qs1[0] qs0[2:0] 001111010100
Assembler Syntax
EE.VZIP.8 qs0, qs1
Description
This instruction implements the zip algorithm on 8-bit vector data.
Operation
1 qs0[ 7: 0] = qs0[ 7: 0]
2 qs0[ 15: 8] = qs1[ 7: 0]
3 qs0[ 23: 16] = qs0[ 15: 8]
4 qs0[ 31: 24] = qs1[ 15: 8]
5 qs0[ 39: 32] = qs0[ 23: 16]
6 qs0[ 47: 40] = qs1[ 23: 16]
7 qs0[ 55: 48] = qs0[ 31: 24]
8 qs0[ 63: 56] = qs1[ 31: 24]
9 qs0[ 71: 64] = qs0[ 39: 32]
10 qs0[ 79: 72] = qs1[ 39: 32]
11 qs0[ 87: 80] = qs0[ 47: 40]
12 qs0[ 95: 88] = qs1[ 47: 40]
13 qs0[103: 96] = qs0[ 55: 48]
14 qs0[111:104] = qs1[ 55: 48]
15 qs0[119:112] = qs0[ 63: 56]
16 qs0[127:120] = qs1[ 63: 56]
17 qs1[ 7: 0] = qs0[ 71: 64]
18 qs1[ 15: 8] = qs1[ 71: 64]
19 qs1[ 23: 16] = qs0[ 79: 72]
20 qs1[ 31: 24] = qs1[ 79: 72]
21 qs1[ 39: 32] = qs0[ 87: 80]
22 qs1[ 47: 40] = qs1[ 87: 80]
23 qs1[ 55: 48] = qs0[ 95: 88]
24 qs1[ 63: 56] = qs1[ 95: 88]
25 qs1[ 71: 64] = qs0[103: 96]
26 qs1[ 79: 72] = qs1[103: 96]
27 qs1[ 87: 80] = qs0[111:104]
28 qs1[ 95: 88] = qs1[111:104]
29 qs1[103: 96] = qs0[119:112]
30 qs1[111:104] = qs1[119:112]
31 qs1[119:112] = qs0[127:120]
32 qs1[127:120] = qs1[127:120]
1.8.213 EE.WR_MASK_GPIO_OUT
Instruction Word
011100100100 ax[3:0] as[3:0] 0100
Assembler Syntax
EE.WR_MASK_GPIO_OUT as, ax
Description
It is a dedicated CPU GPIO instruction to set specified bits in GPIO_OUT. The lower 8 bits in register ax store the
mask, and the lower 8 bits in register as store the assignment content.
Operation
1.8.214 EE.XORQ
Instruction Word
11 qa[2:1] 1101 qa[0] 011 qy[2:1] 01 qx[2:1] qy[0] qx[0] 0100
Assembler Syntax
EE.XORQ qa, qx, qy
Description
This instruction performs a bitwise XOR operation on registers qx and qy and writes the result of the logical
operation to register qa.
Operation
1 qa = qx ^ qy
1.8.215 EE.ZERO.ACCX
Instruction Word
001001010000100000000100
Assembler Syntax
EE.ZERO.ACCX
Description
This instruction clears the value in special register ACCX to 0.
Operation
1 ACCX = 0
1.8.216 EE.ZERO.Q
Instruction Word
11 qa[2:1] 1101 qa[0] 111111110100100
Assembler Syntax
EE.ZERO.Q qa
Description
This instruction clears the value in register qa to 0.
Operation
1 qa = 0
1.8.217 EE.ZERO.QACC
Instruction Word
001001010000100001000100
Assembler Syntax
EE.ZERO.QACC
Description
This instruction clears the values in special registers QACC_L and QACC_H to 0.
Operation
1 QACC_L = 0
2 QACC_H = 0
2.1 Overview
The ULP coprocessor is an ultra-low-power processor that remains powered on when the chip is in Deep-sleep
(see Chapter 10 Low-power Management (RTC_CNTL)). Hence, users can store in RTC memory a program for
the ULP coprocessor to access RTC peripherals, internal sensors, and RTC registers during Deep-sleep.
In power-sensitive scenarios, the main CPU goes to sleep mode to lower power consumption. Meanwhile, the
coprocessor is woken up by ULP timer, and then monitors the external environment or interacts with the external
circuit by controlling peripherals such as RTC GPIO, RTC I2C, SAR ADC, or temperature sensor (TSENS). The
coprocessor wakes the main CPU up once a wakeup condition is reached.
ESP32-S3
RTC I2C
TOUCH
TSENS
ADC
Monitor/Control
ESP32-S3 has two ULP coprocessors, with one based on RISC-V instruction set architecture (ULP-RISC-V) and
the other on finite state machine (ULP-FSM). Users can choose between the two coprocessors depending on
their needs.
2.2 Features
• Access up to 8 KB of SRAM RTC slow memory for instructions and data
ULP-FSM and ULP-RISC-V can not be used simultaneously. Users can only choose one of them as the ULP
coprocessor of ESP32-S3. The differences between the two coprocessors are shown in the table below.
ULP Coprocessors
Feature
ULPFSM ULPRISCV
Memory (RTC Slow Memory) 8 KB
Work Clock Frequency 17.5 MHz
Wakeup Source ULP Timer
Assist the main CPU to complete some tasks
Normal Mode
after the chip is woken up.
Work Mode
Retrieve data from sensors to monitor
Monitor Mode
environment, when the chip is in sleep.
ADC1/ADC2
RTC I2C
Control Low-Power Peripherals RTC GPIO
Touch Sensors
Temperature Sensor
Architecture Programmable FSM RISC-V
Development Special instruction set Standard C compiler
ULP coprocessor can access the modules in RTC domain via RTC registers. In many cases the ULP
coprocessor can be a good supplement to, or replacement of, the main CPU, especially for power-sensitive
applications. Figure 2-2 shows the overall layout of ESP32-S3 coprocessor.
RV32IMC standard instruction code. The ULP-FSM is using custom instructions normally not supported by
high-level programming language. Users develop their programs using ULP-FSM instructions (see Section
2.5.2).
In a typical power-saving scenario, the chip goes to Deep-sleep mode to lower power consumption. Before
setting the chip to sleep mode, users should complete the following operations.
1. Flash the program to be executed by ULP coprocessor into RTC slow memory.
• 0: select ULP-RISC-V
• 1: select ULP-FSM
• set RTC_CNTL_COCPU_CLKGATE_EN.
1. The timer periodically sets the low-power controller (see Chapter 10 Low-power Management (RTC_CNTL))
to Monitor mode and then wakes up the coprocessor.
2. Coprocessor executes some necessary operations, such as monitoring external environment via
low-power sensors.
3. After the operations are finished, the system goes back to Deep-sleep mode.
4. ULP coprocessor goes back to halt mode and waits for next wakeup.
In monitor mode, ULP coprocessor is woken up and goes to halt as shown in Figure 2-4.
2. The timer expires and wakes up the ULP coprocessor. ULP coprocessor starts running and executes the
program flashed in RTC slow memory.
3. ULP coprocessor goes to halt and the timer starts counting again.
4. Disable the timer by ULP program or by software. ULP coprocessor exits from monitor mode.
Note:
• If the timer is enabled by software (RTC GPIO), it should be disabled by software (RTC GPIO).
• Before setting ULP-RISC-V to HALT, users should configure RTC_CNTL_COCPU_DONE first, therefore, it
is recommended to end the flashed program with the following pattern:
– Set RTC_CNTL_COCPU_DONE to end the operation of ULP-RISC-V and put it into halt;
Enough time is reserved for the ULP-RISC-V to complete the operations above before it goes to halt.
Figure 2-5 shows the relationship between the signals and register bits.
2.5 ULPFSM
2.5.1 Features
ULP-FSM is a programmable finite state machine that can work while the main CPU is in Deep-sleep. ULP-FSM
supports instructions for complex logic and arithmetic operations, and also provides dedicated instructions for
RTC controllers or peripherals. ULP-FSM can access up to 8 KB of SRAM RTC slow memory (accessible by the
CPU) for instructions and data. Hence, such memory is usually used to store instructions and share data
between the ULP coprocessor and the CPU. ULP-FSM can be stopped by running HALT instruction.
• Provides four 16-bit general-purpose registers (R0, R1, R2, and R3) for manipulating data and accessing
memory.
• Provides one 8-bit stage count register (Stage_cnt) which can be manipulated by ALU and used in JUMP
instructions.
• Supports built-in instructions specially for direct control of low-power peripherals, such as SAR ADC and
temperature sensor.
s
nd
e
od
ra
pC
pe
O
O
31 28 27 0
An instruction, which has one OpCode, can perform various operations, depending on the setting of Operands
bits. A good example is the ALU instruction, which is able to perform 10 arithmetic and logic operations; or the
JUMP instruction, which may be conditional or unconditional, absolute or relative.
Each instruction has a fixed width of 32 bits. A series of instructions can make a program be executed by the
coprocessor. The execution flow inside the program uses 32-bit addressing. The program is stored in a
dedicated region called Slow Memory, which is visible to the main CPU under an address range of 0x5000_0000
to 0x5000_1FFF (8 KB).
ALU (Arithmetic and Logic Unit) performs arithmetic and logic operations on values stored in ULP coprocessor
registers, and on immediate values stored in the instruction itself. The following operations are supported.
The ALU instruction, which has one OpCode (7), can perform various arithmetic and logic operations, depending
on the setting of the instruction bits [27:21].
1
U_
st
rc
rc
Rd
Rs
Rs
AL
31 28 27 26 25 24 21 20 6 5 4 3 2 1 0
7 0
When bits [27:26] of the instruction in Figure 2-7 are set to 0, ALU performs operations on the data stored in
ULP-FSM registers R[0-3]. The types of operations depend on the setting of the instruction bits ALU_sel[24:21]
presented in Table 2-2.
Note:
• ADD or SUB operations can be used to set or clear the overflow flag in ALU.
• All ALU operations can be used to set or clear the zero flag in ALU.
1
U_
st
rc
m
AL
Rd
Rs
Im
31 28 27 26 25 24 21 20 19 4 3 2 1 0
7 1
Figure 28. Instruction Type — ALU for Operations with Immediate Value
When bits [27:26] of the instruction in Figure 2-8 are set to 1, ALU performs operations using register R[0-3] and
the immediate value stored in instruction bits [19:4]. The types of operations depend on the setting of the
instruction bits ALU_sel[24:21] presented in Table 2-3.
Operand Description - see Figure 2-8
Rdst Register R[0-3], destination
Rsrc1 Register R[0-3], source
Imm 16-bit signed immediate value
ALU_sel ALU operation selection, see Table 2-3
Note:
• ADD or SUB operations can be used to set or clear the overflow flag in ALU.
• All ALU operations can be used to set or clear the zero flag in ALU.
m
AL
Im
31 28 27 26 25 24 21 20 12 11 4 3 0
7 2
Figure 29. Instruction Type — ALU for Operations with Stage Count Register
ALU is also able to increment or decrement by a given value, or reset the 8-bit register Stage_cnt. To do so, bits
[27:26] of instruction in Figure 2-9 should be set to 2. The type of operation depends on the setting of the
instruction bits ALU_sel[24:21] presented in Table 2-9. The Stage_cnt is a separate register and is not a part of
the instruction in Figure 2-9.
Operand Description - see Figure 2-9
Imm 8-bit signed immediate value
ALU_sel ALU operation selection, see Table 2-4
Stage_cnt Stage count register, a 8-bit separate register used to store variables, such as loop index
Note: This instruction is mainly used with JUMPS instruction based on the stage count register to form a stage
count for-loop. For the usage, please refer to the following pseudocode:
to
ay
w t_s
au
r
w
pe
et
e
st
an
el
rc
r_
fs
up
lab
Rd
Rs
m
w
of
31 28 27 26 25 24 21 20 10 9 8 7 6 5 4 3 2 1 0
et
fs
of
31 28 27 25 24 21 20 10 9 0
6 3
st
el
rc
r_
lab
Rd
Rs
w
31 28 27 25 24 9 8 7 6 5 4 3 2 1 0
6 1
Figure 212. Instruction Type Data Storage in Automatic Storage Mode (STAUTODATA)
This mode is used to access continuous addresses. Before using this mode for the first time, please configure
the initial address using ST-OFFSET instruction. Executing the instruction ST-AUTO-DATA will store the 16-bit
data in Rsrc into the memory address Rdst + Offset, see Table 2-5. Write_cnt here indicates the times of the
instruction ST-AUTO-DATA executed.
rc
n
Rs
io
at
of
rm
s
nt
fo
e
in
el
nt
PC
lab
co
31 21 20 18 17 16 15 0
• When full-word is written, the offset will be automatically incremented by 1 after each ST-AUTO-DATA
execution.
• When half-word is written (low half-word first), the offset will be automatically incremented by 1 after twice
ST-AUTO-DATA execution.
• The “Mem” written is the RTC_SLOW_MEM memory. Address 0, as seen by the ULP coprocessor,
corresponds to address 0x50000000, as seen by the main CPU.
r
w
pe
et
st
el
rc
r_
fs
up
lab
Rd
Rs
w
of
31 28 27 25 24 21 20 10 9 8 7 6 5 4 3 2 1 0
6 4
Manual storage mode is mainly used for storing data into discontinuous addresses. Each instruction needs a
storage address and offset. The detailed storage methods are shown in Table 2-6.
wr_way upper Data Operation
0 * Mem [Rdst + Offset]{31:0} = {PC[10:0],3’b0, Label[1:0],Rsrc[15:0]} Write full-word, including
the pointer and the data
1 0 Mem [Rdst + Offset]{15:0} = {Label[1:0],Rsrc[13:0]} Store the data with label
in the low half-word
1 1 Mem [Rdst + Offset]{31:16} = {Label[1:0],Rsrc[13:0]} Store the data with label
in the high half-word
3 0 Mem [Rdst + Offset]{15:0} = Rsrc[15:0] Store the data without label
in the low half-word
3 1 Mem [Rdst + Offset]{31:16} = Rsrc[15:0] Store the data without label
in the high half-word
et
st
rc
_
fs
Rd
Rs
rd
of
31 28 27 26 21 20 10 9 4 3 2 1 0
13
This instruction loads the low or high 16-bit half-word, depending on rd_upper, from memory with address Rsrc +
offset into the destination register Rdst:
Note:
• 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 CPU.
dr
Ad
e
st
m
p
Rd
Se
Ty
Im
31 28 27 26 25 24 22 21 20 13 12 2 1 0
8 1
Description
The instruction executes a jump to a specified address. The jump can be either unconditional or based on the
ALU flag.
re
Co
St
Th
31 28 27 26 25 18 17 16 15 0
8 0
Description
The instruction executes a jump to a relative address, if the condition is true. The condition is the result of
comparing the R0 register value and the Threshold value.
2.5.2.6 JUMPS – Jump to a Relative Address (Conditional upon Stage Count Regis
ter)
ld
ho
s
nd
ep
re
Co
St
31 28 27 26 25 18 17 16 15 Th 0
8 2
• For more information about the stage count register, please refer to Section 2.5.2.1.
Description
The instruction executes a jump to a relative address if the condition is true. The condition itself is the result of
comparing the value of Stage_cnt (stage count register) and the Threshold value.
31 28 27 0
11
Description
The instruction ends the operation of the ULP-FSM and puts it into power-down mode.
Note:
After executing this instruction, the ULP coprocessor wakeup timer gets started.
31 28 27 26 25 1 0
9 0 1’b1
Description
This instruction sends an interrupt from the ULP-FSM to the RTC controller.
• If the chip is in Deep-sleep mode, and the ULP wakeup timer is enabled, the above-mentioned interrupt will
wake up the chip.
• If the chip 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, an RTC interrupt will be triggered.
31 28 27 16 15 0
y
ela
_D
ait
ts
Rd
W
31 28 27 16 15 2 1 0
10
ux
M
r_
st
l
Sa
Rd
Se
31 28 27 7 6 5 2 1 0
dr
w
Ad
Lo
Hi
31 28 27 23 22 18 17 10 9 0
The instruction reads up to 16 bits from a peripheral register into a general-purpose register:
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. Address of
the register, as seen from the ULP coprocessor (addr_ulp), can be calculated from the address of the same
register on the main bus (addr_bus), as follows:
dr
ta
w
Da
Ad
Lo
Hi
31 28 27 23 22 18 17 10 9 0
This instruction writes up to 8 bits from an immediate data value into a peripheral register.
REG[Addr][High:Low] = Data
If more than 8 bits are requested, i.e. High - Low + 1 > 8, then the instruction will pad with zeros the bits above
the eighth bit.
Note:
2.6 ULPRISCV
2.6.1 Features
• Support RV32IMC instruction set
2.6.3.1 Introduction
The interrupt controller of ULP-RISC-V is implemented by using a customized instruction set, instead of RISC-V
Privileged ISA specification, aiming to reduce the size of ULP-RISC-V.
ULP-RISC-V has 32 interrupt sources, but only four of them are available in the real design, as shown in the table
below, including:
Note:
If illegal instruction interrupt or bus error interrupt is disabled, ULP-RISC-V goes to HALT when the two errors
occur.
ULP-RISC-V provides four 32-bit interrupt registers, Q0 ~ Q3, to handle interrupt service routine (ISR). Table 2-10
shows the function of each register.
Register Function
Store the returned address. If the interrupt instruction is a
Q0
compressed one, the lowest bit of this register will be set.
Bitmap. If the corresponding bit of an interrupt is set, this
Q1
interrupt will trigger its ISR.
Q2 Reserved. An option for ISR to store data.
Q3 Reserved. An option for ISR to store data.
• If more than one bits in Q1 are set, all the corresponding interrupts will call the same ISR. For such reason,
users need to program ISR to check the interrupt number and execute corresponding program.
All these interrupt instructions are standard R-type instructions, with the same OpCode of custom0 (0001011).
Figure 2-26 shows the format of standard R-type instructions. Note the fields funct3 (f3) and rs2 are ignored in
these instructions.
e
od
t7
pC
ct
nc
O
rd
fu
rs
rs
fu
31 25 24 20 19 15 14 12 11 7 6 0
This instruction copies the value of Qx into a general purpose register rd.
e
od
pC
2
qs
O
rd
f3
f7
rs
31 25 24 20 19 15 14 12 11 7 6 0
qd
O
f3
f7
rs
rs
31 25 24 20 19 15 14 12 11 7 6 0
This instruction copies the value of Q0 to CPU PC, and enables interrupt again.
e
od
pC
2
O
rd
f3
f7
rs
rs
31 25 24 20 19 15 14 12 11 7 6 0
This instruction copies the value of Q1 to the register rd, and copies the value of register rs to Q1.
de
o
pC
2
O
rd
f3
f7
rs
rs
31 25 24 20 19 15 14 12 11 7 6 0
The interrupts from some sensors, software, and RTC I2C can be routed to ULP-RISC-V. To enable the
interrupts, please set the register SENS_SAR_COCPU_INT_ENA_REG, see Table 2-11.
Note:
• Besides the above-mentioned interrupts, ULP-RISC-V can also handle the interrupt from RTC_IO by simply
configuring RTC_IO as input mode. Users can configure RTCIO_GPIO_PINn_INT_TYPE to select the
interrupt trigger modes, but only level trigger modes are available. For more details about RTC_IO
configuration, see Chapter 6 IO MUX and GPIO Matrix (GPIO, IO MUX).
• The interrupt from RTC_IO can be cleared by releasing RTC_IO and its source can be read from the register
RTCIO_RTC_GPIO_STATUS_REG.
• For the information about RTC I2C interrupts, please refer to Section 2.7.4.
Note:
The timing parameters are configured in cycles of RTC_FAST_CLK running at 17.5 MHz.
1. Set the low and high SCL half-periods by configuring RTC_I2C_SCL_LOW_PERIOD_REG and
RTC_I2C_SCL
_HIGH_PERIOD_REG in RTC_FAST_CLK cycles (e.g. RTC_I2C_SCL_LOW_PERIOD_REG = 40, RTC_I2C_
SCL_HIGH_PERIOD_REG = 40 for 100 kHz frequency).
2. Set the number of cycles between the SDA switch and the falling edge of SCL by using
RTC_I2C_SDA_DUTY
_REG in RTC_FAST_CLK (e.g. RTC_I2C_SDA_DUTY_REG = 16).
3. Set the waiting time after the START signal by using RTC_I2C_SCL_START_PERIOD_REG (e.g. RTC_I2C
_SCL_START_PERIOD = 30).
4. Set the waiting time before the END signal by using RTC_I2C_SCL_STOP_PERIOD_REG (e.g. RTC_I2C_
SCL_STOP_PERIOD = 44).
6. Configure the RTC I2C controller into master mode by setting the bit RTC_I2C_MS_MODE in
RTC_I2C_CTRL
_REG.
• If ULP-RISC-V or main CPU is used, then write the slave address to SENS_SAR_I2C_CTRL_REG[9:0].
• If ULP-FSM is used, then write the slave address to SENS_I2C_SLAVE_ADDRn (n: 0-7)
Up to eight slave addresses can be pre-programmed. One of these addresses can then be selected for
each transaction as part of the RTC I2C instruction.
Once RTC I2C is configured, the main CPU or the ULP coprocessor can communicate with the external I2C
devices.
The format of RTC I2C instruction is consistent with that of I2C0/I2C1, see Section I2C CMD Controller in
Chapter 27 I2C Controller (I2C). The only difference is that RTC I2C provides fixed instructions for different
operations, as follows:
• Configure the instruction list of RTC I2C (see Section CMD_Controller in Chapter 27 I2C Controller (I2C)),
including instruction order, instruction code, read data number (byte_num), and other information.
• When an RTC_I2C_RX_DATA_INT interrupt is received, transfer the read data stored in RTC_I2C_RDATA to
SRAM RTC slow memory, or use the data directly.
The I2C_RD instruction performs the following operations (see Figure 2-31):
2. Master sends slave address, with r/w bit set to 0 (“write”). Slave address is obtained from
SENS_I2C_SLAVE_ADDRn.
9. Master checks whether the number of transmitted bytes reaches the number set by the current instruction
(byte_num). If yes, master jumps out of the read instruction and sends an NACK signal. Otherwise master
repeats Step 8 and waits for the slave to send the next byte.
1 2 3 4 5 6 7 8 9 10
RSTRT
START
NACK
STOP
ACK
Slave Data(n)
Note:
The RTC I2C peripheral samples the SDA signals on the falling edge of SCL. If the slave changes SDA in less
than 0.38 ms, the master may receive incorrect data.
• Configure RTC I2C instruction list, including instruction order, instruction code, and the data to be written in
byte (byte_num). See the configuration of I2C0/I2C1 in Section CMD_Controller in Chapter 27 I2C
Controller (I2C).
• Configure the slave register address by setting the register SENS_SAR_I2C_CTRL[18:11], and the data to
be transmitted in SENS_SAR_I2C_CTRL[26:19].
The I2C_WR instruction performs the following operations, see Figure 2-32.
2. Master sends slave address, with r/w bit set to 0 (“write”). Slave address is obtained from
SENS_I2C_SLAVE_ADDRn.
9. Slave generates ACK. Master checks whether the number of transmitted bytes reaches the number set by
the current instruction (byte_num). If yes, master jumps out of the write instruction and starts the next
instruction. Otherwise the master repeats Step 8 and sends the next byte.
1 2 3 4 5 6 7 8 9 10
RSTRT
START
STOP
Master Slave Address W Reg Address Slave Address W Data(n)
ACK
ACK
ACK
Slave
Applications can query specific bits in the RTC_I2C_INT_ST_REG register to check if the transaction is
successful. To enable checking for specific communication events, their corresponding bits should be set in
register RTC_I2C_INT_ENA_REG. Note that the bit map is shifted by 1. If a specific communication event is
detected and its corresponding bit in register RTC_I2C_INT_ST_REG is set, the event can then be cleared using
register RTC_I2C_INT_CLR_REG.
Peripheral(s) Base Register Main Bus Address ULPFSM Base ULPRISCV Base
RTC Control DR_REG_RTCCNTL_BASE 0x60008000 0x8000 0x8000
RTC GPIO DR_REG_RTC_IO_BASE 0x60008400 0x8400 0xA400
ADC, Touch, TSENS DR_REG_SENS_BASE 0x60008800 0x8800 0xC800
RTC I2C DR_REG_RTC_I2C_BASE 0x60008C00 0x8C00 0xEC00
To find more information about registers for these peripherals, please check the following chapters.
• ULP (ALWAYS_ON) registers: not reset due to power down of RTC_PERI domain. See Chapter 10
Low-power Management (RTC_CNTL).
• ULP (RTC_PERI) registers: reset due to power down of RTC_PERI domain. See Chapter 10 Low-power
Management (RTC_CNTL).
• RTC I2C registers: I2C related registers, including RTC I2C (RTC_PERI) and RTC I2C (I2C) registers.
2.10 Registers
2.10.1 ULP (ALWAYS_ON) Registers
The addresses in this section are relative to low-power management base address provided in Table 4-3 in
Chapter 4 System and Memory.
A
P_ R
EN
EU _CL
O AK N
AK P
U
E
G _W R_
_W E
P_ IO E
_C GP TIM
T
NI
LP P_ P_
_I
PI
PC
_U _C SL
TL LP P_
P_
CN L_U _C
_C
C_ T LP
P
UL
RT CN L_U
L_
C_ NT
T
d)
CN
ve
RT _C
er
C_
C
s
RT
RT
(re
31 30 29 28 11 10 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
)
ed
CN
rv
C_
se
RT
(re
31 8 7 0
200 0 0 0 0 0 0 0 0 Reset
P
TO
T_
CL T AR
_C RE E P
P_ SE _ST
LP P_ RC TO
FO
_U _C FO T_
TL LP P_ AR
K_
CN L_U _C ST
C_ NT LP P_
RT _C L_U P_C
C NT L
RT C L_U
C_ NT
d)
ve
R T _C
er
C
s
RT
(re
31 30 29 28 27 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
S
DI
N
ER
T_
IS
N
_E
_E
_D
SE
G
TR
E
IG
CN L_C CP DO NT EN
ET
LK
RC
RE
IN
TL OC U_D NE _TR
ES
C_ NT O U_ _I E_
_C
2_
2_
U_ L O F
RT _C L_C CP SW AT
_R
FO
_2
T_
T_
CP S _
O U_ NE
C NT O U_ KG
UT
UT
AR
AR
K_
HU
_C P O
SH
SH
RT _C L_C CP CL
CL
E
ST
ST
_S
C NT O U_
U_
U_
U_
U_
U
RT _C L_C CP
CP
CP
CP
CP
CP
C NT O
O
RT C L_C
_C
_C
_C
_C
_C
TL
TL
TL
TL
TL
C_ NT
)
ed
CN
CN
CN
CN
CN
RT _C
rv
C_
C_
C_
C_
C_
se
C
RT
RT
RT
RT
RT
RT
(re
31 28 27 26 25 24 23 22 21 14 13 12 7 6 1 0
0 0 0 0 000000 0 0 0 1 0 40 0 16 8 0 Reset
RTC_CNTL_COCPU_DONE DONE signal. Write 1 to this bit, ULP-RISC-V will go to HALT and the
timer starts counting. (R/W)
W
RA
T_
IN
E_
W N
N O U_ AR _R W IN OP W
RA DO
SE _C CP ST NT RA T_ LO RA
T_ _
NS O U_ _I T_ OU H_ T_
A W
SE S_C CP SW _IN IME AC _IN
_I NT RA
RA W
N O U_ D T O NE
NE E_I T_
U_ UC H_ INT AW
H_ ACT IVE W
W
NT _R
DO IV _IN
SE S_C CP SW H_ PPR DO
T A
_C PU TO D _IN W
NS CO U_ RA IN AW
R
TO H_ AC _R
_
N O U_ UC A N_
O _T U C1 T_
NS OC U_ RA 2 A
SE _C CP SA DC _R
SE S_C CP TS T_ AW
SA S_ _R
SE S_C CP TO H_ CA
CP O C _
NS O U_ EN INT
N O U_ UC S
SE S_C CP TO H_
UC IN
N O U_ UC
SE _C CP TO
NS O U_
SE S_C CP
CP
N O
)
ed
SE S_C
SE _
rv
se
N
SE
(re
31 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SENS_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_RAW TOUCH_APPROACH_LOOP_DONE_INT
interrupt raw bit. (RO)
A
EN
T_
IN
E_
A N
EN DO
N O U_ AR _E A IN OP A
SE _C CP ST NT EN T_ LO EN
T_ _
NS O U_ _I T_ OU H_ T_
NT _E A
SE S_C CP SW _IN IME AC _IN
_I NT EN
NA A
N
N O U_ D T O NE
NE E_I T_
U_ UC H_ NT NA
UC IN TIV NA
DO IV IN
SE S_C CP SW H_ PPR DO
_E
H_ ACT E_
E
TO H_ AC _E
NS OC U_ RA 2_ NA
NS O U_ RA INT NA
N O U_ UC A N_
O _T UC 1 T_
C E
SE _C P SA S_ _E
SE S_C CP TS T_ NA
_C PU O DC IN
SE S_C CP TO H_ CA
_ I
NS O U_ EN INT
N O U_ UC S
SE S_C CP TO H_
D
N O U_ UC
SE _C CP TO
SE C P A S
T
CP O
NS O U_
SE S_C CP
C
C
N O
)
ed
SE S_C
_
rv
se
N
SE
(re
31 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SENS_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_ENA TOUCH_APPROACH_LOOP_DONE_INT
interrupt enable bit. (R/W)
T
_S
NT
_I
NE
ST DO
SE _C CP ST NT ST T_ LO ST
T_ P_
NS O U_ _I T_ OU H_ T_
T
IN O
T _S
SE S_C CP SW _IN IME AC _IN
_I E_ ST
_S T
N O U_ D T O NE
NE TIV T_
NT IN
DO AC IN
SE S_C CP SW H_ PPR DO
U_ OU H_ NT T
UC H_ TIV T
H_ IN E_
_I S
TO C AC _S
N O U_ UC A N_
O U_ UC 1 T_
NS O U_ RA 2_ T
NS O U_ RA INT T
SE _C P SA DC _S
SE _C P SA S_ _S
_C CP TO DC IN
SE S_C CP TO H_ CA
SE S_C CP TS T_ T
NS O U_ EN INT
N O U_ AR _S
N O U_ UC S
SE S_C CP TO H_
N O U_ UC
SE _C CP TO
CP T
NS O U_
SE S_C CP
C
C
N O
)
ed
SE S_C
rv
se
N
SE
(re
31 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SENS_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_ST TOUCH_APPROACH_LOOP_DONE_INT
interrupt status bit. (RO)
R
CL
T_
IN
E_
R N
CL DO
N O U_ AR _C R IN OP R
SE _C CP ST NT CL T_ LO CL
T_ _
NS O U_ _I T_ OU H_ T_
NT _C R
SE S_C CP SW _IN IME AC _IN
_I NT CL
LR
N O U_ D T O NE
NE E_I T_
LR
U_ UC H_ NT LR
UC IN TIV LR
DO IV IN
SE S_C CP SW H_ PPR DO
_C
C
TO H_ AC _C
H_ ACT E_
NS OC U_ RA 2_ LR
NS O U_ RA INT LR
N O U_ UC A N_
O _T UC 1 T_
C C
SE _C P SA S_ _C
SE S_C CP TS T_ LR
_C PU O DC IN
SE S_C CP TO H_ CA
_ I
NS O U_ EN INT
N O U_ UC S
SE S_C CP TO H_
D
N O U_ UC
SE _C CP TO
SE C P A S
T
CP O
NS O U_
SE S_C CP
C
C
N O
)
ed
SE S_C
_
rv
se
N
SE
(re
31 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SENS_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_CLR TOUCH_APPROACH_LOOP_DONE_INT
interrupt clear bit. (WO)
C E
RT OR
TA _F
_S RT
RL
2C A
CT
_I _ST
C_
AR 2C
I2
_S _I
R_
NS AR
SA
)
ed
SE _S
_
rv
NS
NS
se
SE
SE
(re
31 30 29 28 27 0
0 0 0 0 0 Reset
SENS_SAR_I2C_START_FORCE 0: RTC I2C started by FSM; 1: RTC I2C started by software. (R/W)
R1
DD
DD
_A
_A
E
E
AV
AV
SL
SL
C_
C_
d)
2
e
_I
_I
rv
NS
NS
se
SE
SE
(re
31 22 21 11 10 0
R3
DD
DD
_A
_A
VE
E
AV
LA
SL
_S
C_
2C
)
ed
I2
_I
S_
rv
NS
se
N
SE
SE
(re
31 22 21 11 10 0
R4
R5
DD
DD
_A
_A
E
VE
AV
LA
L
_S
S
C_
2C
d)
2
ve
_I
_I
NS
NS
er
s
SE
SE
(re
31 22 21 11 10 0
R6
R7
DD
DD
_A
_A
E
E
AV
AV
SL
SL
C_
C_
d)
I2
ve
_I
S_
NS
r
se
N
SE
SE
(re
31 22 21 11 10 0
I2
rv
C_
se
RT
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0x100 Reset
RTC_I2C_SCL_LOW_PERIOD This register is used to configure how many clock cycles SCL remains
low. (R/W)
D
IO
P ER
H_
IG
_H
S CL
C_
d)
ve
I2
er
C_
s
RT
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0x100 Reset
RTC_I2C_SCL_HIGH_PERIOD This register is used to configure how many cycles SCL remains high.
(R/W)
UM
_N
UTY
_D
DA
_S
)
ed
C
I2
rv
C_
se
RT
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0x010 Reset
RTC_I2C_SDA_DUTY_NUM The number of clock cycles between the SDA switch and the falling
edge of SCL. (R/W)
I2
rv
C_
se
RT
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 8 Reset
D
O
RI
PE
P_
TO
_S
CL
_S
d)
2C
ve
I
er
C_
s
RT
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 8 Reset
UT
E_ T
E
RC _OU
AT
O
C C_ AN FI T
C_ L_ E T
C_ C_ _M STA T
RT _I2 TR SB_ IRS
I2 SC OD R
_G
RT _I2 MS S_ RS
FO E
A_ RC
LK
C C_ L F
RT _I2 TX_ SB_
_C
SD FO
CT T
C_ SE
RL
C C_ _L
I2 RE
RT _I2 RX
C_ C_
C C_
C d)
)
ed
RT rve
RT _I2
RT _I2
rv
se
se
C
RT
(re
(re
31 30 29 28 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_I2C_TRANS_START Set this bit to 1, RTC I2C starts sending data. (R/W)
RTC_I2C_TX_LSB_FIRST This bit is used to control the sending mode. 0: send data from the most
significant bit; 1: send data from the least significant bit. (R/W)
RTC_I2C_RX_LSB_FIRST This bit is used to control the storage mode for received data. 0: receive
data from the most significant bit; 1: receive data from the least significant bit. (R/W)
D
SE
C_ C_ B_ SY ES
RT I2 BU _A S
RT _I2 AR BU DR
C_ C_ AVE AN
K_ RW
T
C C_ S_ D
C
C_ AV S
RT _I2 SL _TR
NT
I2 SL LO
RE
AC _ E
_C
C _ E T
C_ OP
RT I2 Y B
C_
C_ C_
d)
C
ve
I2
RT I2
er
C_
s
RT
RT
(re
31 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_I2C_ARB_LOST When the RTC I2C loses control of SCL line, the register changes to 1. (RO)
RTC_I2C_BUS_BUSY 0: RTC I2C bus is in idle state; 1: RTC I2C bus is busy transferring data. (RO)
RTC_I2C_SLAVE_ADDRESSED When the address sent by the master matches the address of the
slave, then this bit will be set. (RO)
I2
rv
C_
se
RT
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0x10000 Reset
d)
2C
e
rv
I
C_
se
RT
(re
31 30 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_I2C_ADDR_10BIT_EN This field is used to enable the slave 10-bit addressing mode. (R/W)
T_ C LR
P_ N _C
CL LR
_C OS P_ LR
M T_I NT
AN _L M _C
R
IN T_
R
I
RT _I2 TIM ER INT LR CL
TR N CO T
E_ TIO N_ _IN
C C_ K_ _ C T_
AV A A TE
RT I2C A S_C T_ LR
RT _I2 AC ATA NT_ _IN
C_ RB R_ P R
RT _I2 TR OU INT LR
M L
SL ITR TR LE
C_ _ N _I C
C_ _ ST O C
C C_ E R_ _C
C C_ _D _I T
O
RT _I2 RX ATA TAR
N
C C_ D _S
T
RT _I2 TX_ CT
E
C C_ TE
A
RT I2 DE
M
A
C_ C_
d)
C
ve
RT _I2
I2
er
C
s
RT
(re
31 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
T_ R AW
RA AW
_C OS P_ AW
P_ N _R
M T_I NT
W
AN _L M _R
W
IN T_
I
RT _I2 TIM ER INT AW RA
TR N CO T
E_ TIO N_ _IN
C C_ K_ _ R T_
RT I2C A S_C T_ AW
AV A A TE
C_ RB R_ P W
RT _I2 TR OU INT AW
RT _I2 AC ATA NT_ _IN
M A
SL ITR TR LE
C_ _ N _I R
C_ _ ST O R
C C_ E R_ _R
C C_ _D _I T
O
RT _I2 RX ATA TAR
N
C C_ D _S
T
RT _I2 TX_ CT
E
C C_ TE
A
RT _I2 DE
M
A
C C_
)
ed
C
RT _I2
I2
rv
se
C
RT
(re
31 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
IN T_ T
P_ N _S
S T
_C OS P_ T
M T_I NT
T_ S
AN _L M _S
T
I
TR N CO T
RT _I2 TIM ER INT T ST
E_ TIO N_ _IN
C C_ K_ _ S T_
AV A A TE
RT _I2 AC ATA NT_ _IN
RT I2C A S_C T_ T
M T
RT _I2 TR OU INT T
SL ITR TR LE
C_ C_ AN T_I _S
C_ _ ST O S
C C_ E R_ _S
C C_ _D _I T
O
RT _I2 RX ATA TAR
C_ RB R_ P
N
C C_ D _S
RT _I2 TX_ CT
E
C C_ TE
RT I2 DE
M
A
C_ C_
d)
ve
RT _I2
I2
er
C
s
RT
(re
31 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
T_ EN A
IN T_ N
EN A
P_ N _E
_C OS P_ NA
M T_I NT
AN _L M _E
A
A
I
RT _I2 TIM ER INT NA EN
TR N CO T
E_ TIO N_ _IN
C C_ K_ _ E T_
AV A A TE
RT I2C A S_C T_ NA
C_ RB R_ P A
RT _I2 AC ATA NT_ _IN
RT _I2 TR OU INT NA
C_ _ ST O EN
SL ITR TR LE
C_ _ N _I E
C C_ E R_ _E
C C_ _D _I T
O
RT _I2 RX ATA TAR
M
N
C C_ D _S
T
RT _I2 TX_ CT
E
C C_ TE
A
RT _I2 DE
M
A
C C_
)
ed
C
RT _I2
I2
rv
se
C
RT
(re
31 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
A
E
NE
AT
AV
DO
RD
SL
C_
C_
C_
)
ed
I2
I2
I2
rv
C_
C_
C_
se
RT
RT
RT
(re
31 30 16 15 8 7 0
NE
O
_D
D0
D0
AN
AN
M
M
M
M
O
CO
_C
C_
)
ed
C
I2
I2
v
er
C_
C_
s
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x903 Reset
RTC_I2C_COMMAND0 Content of command 0. For more information, please refer to the register
I2C_COMD0_REG in Chapter I2C Controller. (R/W)
D1
AN
AN
M
M
M
M
CO
O
_C
C_
)
ed
C
I2
I2
rv
C_
C_
se
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x1901 Reset
RTC_I2C_COMMAND1 Content of command 1. For more information, please refer to the register
I2C_COMD1_REG in Chapter I2C Controller. (R/W)
D2
AN
AN
M
M
M
M
O
CO
_C
C_
d )
2C
ve
I2
I
r
C_
C_
se
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x902 Reset
RTC_I2C_COMMAND2 Content of command 2. For more information, please refer to the register
I2C_COMD2_REG in Chapter I2C Controller. (R/W)
NE
O
_D
D3
D3
AN
AN
M
M
M
M
O
CO
_C
C_
)
ed
C
I2
I2
v
er
C_
C_
s
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x101 Reset
RTC_I2C_COMMAND3 Content of command 3. For more information, please refer to the register
I2C_COMD3_REG in Chapter I2C Controller. (R/W)
D4
AN
AN
M
M
M
M
CO
O
_C
C_
)
ed
C
I2
I2
rv
C_
C_
se
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x901 Reset
RTC_I2C_COMMAND4 Content of command 4. For more information, please refer to the register
I2C_COMD4_REG in Chapter I2C Controller. (R/W)
D5
AN
AN
M
M
M
M
O
CO
_C
C_
d )
2C
ve
I2
I
r
C_
C_
se
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x1701 Reset
RTC_I2C_COMMAND5 Content of command 5. For more information, please refer to the register
I2C_COMD5_REG in Chapter I2C Controller. (R/W)
NE
O
_D
D6
D6
AN
AN
M
M
M
M
O
CO
_C
C_
)
ed
C
I2
I2
v
er
C_
C_
s
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x1901 Reset
RTC_I2C_COMMAND6 Content of command 6. For more information, please refer to the register
I2C_COMD6_REG in Chapter I2C Controller. (R/W)
D7
AN
AN
M
M
M
M
CO
O
_C
C_
)
ed
C
I2
I2
rv
C_
C_
se
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x904 Reset
RTC_I2C_COMMAND7 Content of command 7. For more information, please refer to the register
I2C_COMD7_REG in Chapter I2C Controller. (R/W)
D8
AN
AN
M
M
M
M
O
CO
_C
C_
d )
2C
ve
I2
I
r
C_
C_
se
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x1901 Reset
RTC_I2C_COMMAND8 Content of command 8. For more information, please refer to the register
I2C_COMD8_REG in Chapter I2C Controller. (R/W)
NE
O
_D
D9
D9
AN
AN
M
M
M
M
O
CO
_C
C_
)
ed
C
I2
I2
v
er
C_
C_
s
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x903 Reset
RTC_I2C_COMMAND9 Content of command 9. For more information, please refer to the register
I2C_COMD9_REG in Chapter I2C Controller. (R/W)
0
D1
D1
AN
AN
M
M
M
M
CO
O
_C
C_
)
ed
C
I2
I2
rv
C_
C_
se
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x101 Reset
RTC_I2C_COMMAND10 Content of command 10. For more information, please refer to the register
I2C_COMD10_REG in Chapter I2C Controller. (R/W)
1
D1
D1
AN
AN
M
M
M
M
CO
O
_C
C_
)
ed
2C
I2
rv
I
C_
C_
se
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x901 Reset
RTC_I2C_COMMAND11 Content of command 11. For more information, please refer to the register
I2C_COMD11_REG in Chapter I2C Controller. (R/W)
NE
DO
2_
2
D1
D1
AN
AN
M
M
M
M
O
CO
_C
C_
d)
C
ve
I2
I2
er
C_
C_
s
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x1701 Reset
RTC_I2C_COMMAND12 Content of command 12. For more information, please refer to the register
I2C_COMD12_REG in Chapter I2C Controller. (R/W)
3
D1
D1
AN
AN
M
M
M
M
O
CO
_C
C_
)
ed
C
I2
I2
rv
C_
C_
se
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x1901 Reset
RTC_I2C_COMMAND13 Content of command 13. For more information, please refer to the register
I2C_COMD13_REG in Chapter I2C Controller. (R/W)
4
D1
D1
AN
AN
M
M
M
M
O
CO
_C
C_
d)
2C
I2
rv
I
C_
C_
se
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x00 Reset
RTC_I2C_COMMAND14 Content of command 14. For more information, please refer to the register
I2C_COMD14_REG in Chapter I2C Controller. (R/W)
NE
DO
5_
5
D1
D1
AN
AN
M
M
M
M
O
CO
_C
C_
d)
C
ve
I2
I2
er
C_
C_
s
RT
RT
(re
31 30 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x00 Reset
RTC_I2C_COMMAND15 Content of command 15. For more information, please refer to the register
I2C_COMD15_REG in Chapter I2C Controller. (R/W)
TE
DA
C_
d)
ve
I2
r
C_
se
RT
(re
31 28 27 0
0 0 0 0 0x1905310 Reset
3.1 Overview
General Direct Memory Access (GDMA) is a feature that allows peripheral-to-memory, memory-to-peripheral, and
memory-to-memory data transfer at a high speed. The CPU is not involved in the GDMA transfer, and therefore it
becomes more efficient with less workload.
The GDMA controller in ESP32-S3 has ten independent channels, i.e. five transmit channels and five receive
channels. These ten channels are shared by peripherals with GDMA feature, namely SPI2, SPI3, UHCI0, I2S0,
I2S1, LCD/CAM, AES, SHA, ADC, and RMT. You can assign the ten channels to any of these peripherals. Every
channel supports access to internal RAM or external RAM.
The GDMA controller uses fixed-priority and round-robin channel arbitration schemes to manage peripherals’
needs for bandwidth.
3.2 Features
The GDMA controller has the following features:
3.3 Architecture
In ESP32-S3, all modules that need high-speed data transfer support GDMA. The GDMA controller and CPU
data bus have access to the same address space in internal and external RAM. Figure 3-2 shows the basic
architecture of the GDMA engine.
The GDMA controller has ten independent channels, i.e. five transmit channels and five receive channels. Every
channel can be connected to different peripherals. In other words, channels are general-purpose, shared by
peripherals.
The GDMA engine has two independent AHB bus referred to as AHB_BUS1 and AHB_BUS2 respectively.
AHB_BUS1 is used to read data from or write data to internal RAM, whereas AHB_BUS2 is used to read data
from or write data to external RAM. For available address range of RAM, please see Chapter 4 System and
Memory.
Software can use the GDMA engine through linked lists. These linked lists, stored in internal RAM, consist of
outlinkn and inlinkn, where n indicates the channel number (ranging from 0 to 4). The GDMA controller reads an
outlinkn (i.e. a linked list of transmit descriptors) from internal RAM and transmits data in corresponding RAM
according to the outlinkn, or reads an inlinkn (i.e. a linked list of receive descriptors) and stores received data into
specific address space in RAM according to the inlinkn.
Figure 3-3 shows the structure of a linked list. An outlink and an inlink have the same structure. A linked list is
formed by one or more descriptors, and each descriptor consists of three words. Linked lists should be in
internal RAM for the GDMA engine to be able to use them. The meaning of each field is as follows:
• Owner (DW0) [31]: Specifies who is allowed to access the buffer that this descriptor points to.
1’b0: CPU can access the buffer;
1’b1: The GDMA controller can access the buffer.
When the GDMA controller stops using the buffer, this bit in a transmit descriptor is automatically cleared by
hardware, and this bit in a receive descriptor is automatically cleared by hardware only if
GDMA_OUT_AUTO_WRBACK_CHn is set to 1. When software loads a linked list, this bit should be set to
1.
Note: GDMA_OUT is the prefix of transmit channel registers, and GDMA_IN is the prefix of receive channel
registers.
• suc_eof (DW0) [30]: Specifies whether this descriptor is the last descriptor in the list.
1’b0: This descriptor is not the last one;
1’b1: This descriptor is the last one.
Software clears suc_eof bit in receive descriptors. When a frame or packet has been received, this bit in
the last receive descriptor is set by hardware, and this bit in the last transmit descriptor is set by software.
• Reserved (DW0) [29]: Reserved. Value of this bit does not matter.
• err_eof (DW0) [28]: Specifies whether the received data have errors.
This bit is used only when UHCI0 uses GDMA to receive data. When an error is detected in the received
frame or packet, this bit in the receive descriptor is set to 1 by hardware.
• Length (DW0) [23:12]: Specifies the number of valid bytes in the buffer that this descriptor points to. This
field in a transmit descriptor is written by software and indicates how many bytes can be read from the
buffer; this field in a receive descriptor is written by hardware automatically and indicates how many valid
bytes have been stored into the buffer.
• Size (DW0) [11:0]: Specifies the size of the buffer that this descriptor points to.
• Next descriptor address (DW2): Address of the next descriptor. If the current descriptor is the last one
(suc_eof = 1), this value is 0. This field can only point to internal RAM.
If the length of data received is smaller than the size of the buffer, the GDMA controller will not use available
space of the buffer in the next transaction.
Every transmit and receive channel can be connected to any peripheral with GDMA feature. Table 3-1 illustrates
how to select the peripheral to be connected via registers. When a channel is connected to a peripheral, the rest
channels can not be connected to that peripheral. All transmit and receive channels support access to internal
and external RAM. For details, please refer to Section 3.4.8 and Section 3.4.9.
GDMA_PERI_IN_SEL_CHn
Peripheral
GDMA_PERI_OUT_SEL_CHn
0 SPI2
1 SPI3
2 UHCI0
3 I2S0
4 I2S1
5 LCD/CAM
6 AES
7 SHA
8 ADC
9 RMT
As every transmit and receive channel can be used to access internal and external RAM, there are four data
transfer modes:
In some cases, you may want to append more descriptors to a DMA transfer that is already started. Naively, it
would seem to be possible to do this by clearing the EOF bit of the final descriptor in the existing list and setting
its next descriptor address pointer field (DW2) to the first descriptor of the to-be-added list. However, this
strategy fails if the existing DMA transfer is almost or entirely finished. Instead, the GDMA engine has specialized
logic to make sure a DMA transfer can be continued or restarted: if it is still ongoing, it will make sure to take the
appended descriptors into account; if the transfer has already finished, it will restart with the new descriptors.
This is implemented in the Restart function.
When using the Restart function, software needs to rewrite the address of the first descriptor in the new list to
DW2 of the last descriptor in the loaded list, and set GDMA_INLINK_RESTART_CHn bit or
GDMA_OUTLINK_RESTART_CHn bit (these two bits are cleared automatically by hardware). As shown in Figure
3-5, by doing so hardware can obtain the address of the first descriptor in the new list when reading the last
descriptor in the loaded list, and then read the new list.
• Buffer address pointer (DW1) check. If the buffer address pointer points to 0x3FC88000 ~ 0x3FCFFFFF or
0x3C000000 ~ 0x3DFFFFFF (please refer to Section 3.4.8), it passes the check.
After software detects a descriptor error interrupt, it must reset the corresponding channel, and enable GDMA by
setting GDMA_OUTLINK_START_CHn or GDMA_INLINK_START_CHn bit.
Note: The third word (DW2) in a descriptor can only point to a location in internal RAM, given that the third word
points to the next descriptor to use and that all descriptors must be in internal memory.
3.4.7 EOF
The GDMA controller uses EOF (end of frame) flags to indicate the end of data frame or packet
transmission.
Before the GDMA controller transmits data, GDMA_OUT_TOTAL_EOF_CHn_INT_ENA bit should be set to enable
GDMA_OUT_TOTAL_EOF_CHn_INT interrupt. If data in the buffer pointed by the last descriptor (with EOF) have
been transmitted, a GDMA_OUT_TOTAL_EOF_CHn_INT interrupt is generated.
Before the GDMA controller receives data, GDMA_IN_SUC_EOF_CHn_INT_ENA bit should be set to enable
GDMA_IN_SUC_EOF_CHn_INT interrupt. If a data frame or packet has been received successfully, a
GDMA_IN_SUC_EOF_CHn_INT interrupt is generated. In addition, when GDMA channel is connected to UHCI0,
the GDMA controller also supports GDMA_IN_ERR_CHn_EOF_INT interrupt. This interrupt is enabled by setting
GDMA_IN_ERR_EOF_CHn_INT_ENA bit, and it indicates that a data frame or packet has been received with
errors.
Note: In this chapter, EOF of transmit descriptors refers to suc_eof, while EOF of receive descriptors refers to
both suc_eof and err_eof.
Table 32. Descriptor Field Alignment Requirements for Accessing Internal RAM
Table 3-2 lists the requirements for descriptor field alignment when GDMA accesses internal RAM.
When burst mode is disabled, size, length, and buffer address pointer in both transmit and receive descriptors do
not need to be word-aligned. That is to say, GDMA can read data of specified length (1 ~ 4095 bytes) from any
start addresses in the accessible address range, or write received data of the specified length (1 ~ 4095 bytes) to
any contiguous addresses in the accessible address range.
When burst mode is enabled, size, length, and buffer address pointer in transmit descriptors are also not
necessarily word-aligned. However, size and buffer address pointer in receive descriptors except length should
be word-aligned.
Table 33. Descriptor Field Alignment Requirements for Accessing External RAM
Table 3-3 lists the requirements for descriptor field alignment when GDMA accesses internal RAM. Size, length,
and buffer address pointer in transmit descriptors do not need to be aligned. However, size and buffer address
pointer in receive descriptors except length should be aligned with block size. Table 3-4 illustrates the value of
Table 34. Relationship Between Configuration Register, Block Size and Alignment
Note: For receive descriptors, if the data length received are not aligned with block size, GDMA will pad the data
received with 0 until they are aligned to initiate burst transfer. You can read the length field in receive descriptors
to obtain the length of valid data received.
All peripherals with GDMA feature (i.e. SPI2, SPI3, UHCI0, I2S0, I2S1, LCD/CAM, AES, SHA, ADC, and RMT) do
not have access permissions for Area 0 and Area 3, but their permissions for Area 1 and Area 2 can be
independently managed. The permission control module contains registers to manage such access permissions
for Area 1 and Area 2. For example, the PMS_EDMA_PMS_SPI2_ATTR1 field configures SPI2’s permissions to
read and write Area 1. Specifically, when bit 0 of this field is 1, SPI2 is granted read permission; when bit 1 of this
field is 1, SPI2 is granted write permission. Likewise, the PMS_EDMA_PMS_SPI2_ATTR2 field configures SPI2’s
permissions to read and write Area 2.
Access violations are logged and can trigger the GDMA_ETXMEN_REJECT_INT interrupt. You can check the
address where the address violation occurs, the peripheral involved, channel number and read or write attribute
via GDMA_ETXMEM_REJECT_ADDR, GDMA_ETXMEN_REJECT_PERI_NUM,
GDMA_ETXMEN_REJECT_CHANNEL_NUM, and GDMA_ETXMEM_REJECT_ATTR respectively.
3.4.12 Arbitration
To ensure timely response to peripherals running at a high speed with low latency (such as SPI, LCD/CAM), the
GDMA controller implements a fixed-priority channel arbitration scheme. That is to say, each channel can be
assigned a priority from 0 ~ 9. The larger the number, the higher the priority, and the more timely the response.
When several channels are assigned the same priority, the GDMA controller adopts a round-robin arbitration
scheme.
Please note that the overall throughput of peripherals with GDMA feature cannot exceed the maximum
bandwidth of the GDMA, so that requests from low-priority peripherals can be responded to.
• GDMA_IN_DSCR_EMPTY_CHn_INT: Triggered when the size of the buffer pointed by receive descriptors is
smaller than the length of data to be received via receive channel n.
• GDMA_OUT_DONE_CHn_INT: Triggered when all data corresponding to a transmit descriptor have been
sent via transmit channel n.
• GDMA_IN_ERR_EOF_CHn_INT: Triggered when an error is detected in the data frame or packet received
via receive channel n. This interrupt is used only for UHCI0 peripheral (UART0 or UART1).
• GDMA_IN_SUC_EOF_CHn_INT: Triggered when a data frame or packet has been received via receive
channel n.
• GDMA_IN_DONE_CHn_INT: Triggered when all data corresponding to a receive descriptor have been
received via receive channel n.
1. Set GDMA_OUT_RST_CHn first to 1 and then to 0, to reset the state machine of GDMA’s transmit channel
and FIFO pointer;
2. Load an outlink, and configure GDMA_OUTLINK_ADDR_CHn with address of the first transmit descriptor;
5. Configure and enable the corresponding peripheral (SPI2, SPI3, UHCI0 (UART0, UART1, or UART2), I2S0,
I2S1, AES, SHA, and ADC). See details in individual chapters of these peripherals;
6. Wait for GDMA_OUT_EOF_CHn_INT interrupt, which indicates the completion of data transfer.
1. Set GDMA_IN_RST_CHn first to 1 and then to 0, to reset the state machine of GDMA’s receive channel and
FIFO pointer;
2. Load an inlink, and configure GDMA_INLINK_ADDR_CHn with address of the first receive descriptor;
5. Configure and enable the corresponding peripheral (SPI2, SPI3, UHCI0 (UART0, UART1, or UART2), I2S0,
I2S1, AES, SHA, and ADC). See details in individual chapters of these peripherals;
6. Wait for GDMA_IN_SUC_EOF_CHn_INT interrupt, which indicates that a data frame or packet has been
received.
1. Set GDMA_OUT_RST_CHn first to 1 and then to 0, to reset the state machine of GDMA’s transmit channel
and FIFO pointer;
2. Set GDMA_IN_RST_CHn first to 1 and then to 0, to reset the state machine of GDMA’s receive channel and
FIFO pointer;
3. Load an outlink, and configure GDMA_OUTLINK_ADDR_CHn with address of the first transmit descriptor;
4. Load an inlink, and configure GDMA_INLINK_ADDR_CHn with address of the first receive descriptor;
8. Wait for GDMA_IN_SUC_EOF_CHn_INT interrupt, which indicates that which indicates that a data
transaction has been completed.
3.8 Registers
The addresses in this section are relative to GDMA base address provided in Table 4-3 in Chapter 4 System and
Memory.
_C ST EN H0
H0 H0
ST _TE T_ _C
H0 _C _C
IN O UR T_ 0
A_ _LO _B RS CH
_R P S EN
DM IN C U N_
G A_ DS _B _E
DM IN T NS
G A_ _DA RA
A
R
DM IN _T
A_ EM
d)
DM _M
ve
A
r
DM
se
(re
G
G
G
31 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_IN_RST_CHn This bit is used to reset GDMA channel 0 RX FSM and RX FIFO pointer. (R/W)
GDMA_INDSCR_BURST_EN_CHn Set this bit to 1 to enable INCR burst transfer for RX channel 0
reading descriptor when accessing internal RAM. (R/W)
GDMA_IN_DATA_BURST_EN_CHn Set this bit to 1 to enable INCR burst transfer for RX channel 0
receiving data when accessing internal RAM. (R/W)
GDMA_MEM_TRANS_EN_CHn Set this bit 1 to enable automatic transmitting data from memory to
memory via GDMA. (R/W)
H0
R_ H0
_C
RS
NE _C
0
CH
E
TH
_O _SIZ
L_
UL
K
HE M_B
_F
FO
E
CK
M
FI
A_ XT_
IN
A_
_C
DM _E
DM
IN
IN
d)
ve
A_
A_
er
DM
DM
s
(re
G
31 15 14 13 12 11 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0xc Reset
GDMA_IN_CHECK_OWNER_CHn Set this bit to enable checking the owner attribute of the descrip-
tor. (R/W)
0
CH
0
CH
A_
P_
AT
O
D
_R
_P
O
FO
IF
FI
F
IN
IN
)
ed
A_
A_
rv
DM
DM
se
(re
31 13 12 11 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x800 Reset
GDMA_INFIFO_RDATA_CHn This register stores the data popping from GDMA FIFO (intended for
debugging). (RO)
GDMA_INFIFO_POP_CHn Set this bit to pop data from GDMA FIFO (intended for debugging).
(R/W/SC)
H0
_A P_ H0 0
NK TO _C H
_C
LI S T C
0
O 0
A_ LIN ST AR 0
ET
IN K_ AR T_
CH
UT CH
DM IN K S H
_R
G A_ LIN RE _C
R_
_ K
T
DD
DM IN K R
G A_ LIN PA
_A
_
_
DM IN K
NK
G A_ LIN
LI
DM _IN
IN
)
ed
A_
rv
A
DM
DM
se
(re
G
G
G
31 25 24 23 22 21 20 19 0
0 0 0 0 0 0 0 1 0 0 0 1 0x000 Reset
GDMA_INLINK_ADDR_CHn This register stores the 20 least significant bits of the first receive de-
scriptor’s address. (R/W)
GDMA_INLINK_AUTO_RET_CHn Set this bit to return to current receive descriptor’s address, when
there are some errors in current receiving data. (R/W)
GDMA_INLINK_STOP_CHn Set this bit to stop GDMA’s receive channel from receiving data.
(R/W/SC)
GDMA_INLINK_START_CHn Set this bit to enable GDMA’s receive channel for data transfer.
(R/W/SC)
GDMA_INLINK_PARK_CHn 1: the receive descriptor’s FSM is in idle state; 0: the receive descriptor’s
FSM is working. (RO)
O LO _ E_ N_ 0
_R P RB H0 H0
H0 0
A_ UT_ UTO OD _E _CH
H0 _C CH
UT O W C C
DM O A M S N
_C ST K_
G A_ T_ F_ UR _E
ST _TE AC
T
T
DM O E _B S
G A_ T_ CR UR
B
DM O S _
G A_ TD TA
O
U A
DM O D
G A_ T_
U
U
U
)
DM O
ed
G A_
rv
DM
se
(re
G
31 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 Reset
GDMA_OUT_RST_CHn This bit is used to reset GDMA channel 0 TX FSM and TX FIFO pointer. (R/W)
GDMA_OUT_AUTO_WRBACK_CHn Set this bit to enable automatic outlink-writeback when all the
data in TX FIFO has been transmitted. (R/W)
GDMA_OUT_EOF_MODE_CHn EOF flag generation mode when transmitting data. 1: EOF flag for
TX channel 0 is generated when data need to transmit has been popped from FIFO in GDMA.
(R/W)
GDMA_OUTDSCR_BURST_EN_CHn Set this bit to 1 to enable INCR burst transfer for TX channel
0 reading descriptor when accessing internal RAM. (R/W)
GDMA_OUT_DATA_BURST_EN_CHn Set this bit to 1 to enable INCR burst transfer for TX channel
0 transmitting data when accessing internal RAM. (R/W)
0
CH
E
_O _SIZ
K
HE M_B
W
E
CK
M
T_
A_ _EX
_C
UT
UT
d)
)
O
ed
e
A_
rv
rv
DM
DM
se
se
(re
(re
G
31 15 14 13 12 11 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_OUT_CHECK_OWNER_CHn Set this bit to enable checking the owner attribute of the de-
scriptor. (R/W)
0
CH
H0
_C
_
TA
SH
DA
U
_W
_P
FO
OF
FI
FI
UT
UT
)
O
ed
A_
A_
rv
DM
DM
se
(re
G
31 10 9 8 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
GDMA_OUTFIFO_WDATA_CHn This register stores the data that need to be pushed into GDMA
FIFO. (R/W)
GDMA_OUTFIFO_PUSH_CHn Set this bit to push data into GDMA FIFO. (R/W/SC)
H0
0
LI _S TA 0
CH
UT K S H
NK TA RT
_C
O IN RE _C
DR
A_ TL K_ RK
D
DM O IN A
G A_ TL K_P
_A
NK
DM O IN
LI
G A_ TL
UT
U
U
U
d)
DM _O
O
e
A_
rv
A
DM
DM
se
(re
G
G
31 24 23 22 21 20 19 0
0 0 0 0 0 0 0 0 1 0 0 0 0x000 Reset
GDMA_OUTLINK_ADDR_CHn This register stores the 20 least significant bits of the first transmit
descriptor’s address. (R/W)
GDMA_OUTLINK_STOP_CHn Set this bit to stop GDMA’s transmit channel from transferring data.
(R/W/SC)
GDMA_OUTLINK_START_CHn Set this bit to enable GDMA’s transmit channel for data transfer.
(R/W/SC)
GDMA_OUTLINK_RESTART_CHn Set this bit to restart a new outlink from the last address.
(R/W/SC)
GDMA_OUTLINK_PARK_CHn 1: the transmit descriptor’s FSM is in idle state; 0: the transmit de-
scriptor’s FSM is working. (RO)
RC PU
PD
O E_
E_
RA _F _FO
_F C
M OR
A_ AM LK
DM _R _C
A_ MA AM
DM D R
G A_ A_
M
)
)
DM D
ed
ed
G A_
rv
rv
DM
se
se
(re
(re
G
31 7 6 5 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 Reset
GDMA_DMA_RAM_FORCE_PD Set this bit to force power down GDMA internal memory. (R/W)
GDMA_DMA_RAM_FORCE_PU Set this bit to force power up GDMA internal memory. (R/W)
GDMA_DMA_RAM_CLK_FO 1: Force to open the clock and bypass the gate-clock when accessing
the RAM in GDMA; 0: A gate-clock will be used when accessing the RAM in GDMA. (R/W)
_I ER
ER
ST XT
NT
_R T_E
AH _ DIS
BM RS
A_ HBM RI_
N
DM A P
DM d E
G A_ B_
G rve K_
R
se CL
d)
)
DM A
ve
(re A_
G A_
r
DM
se
(re
G
31 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_AHBM_RST_INTER Set this bit, then clear this bit to reset the internal AHB FSM. (R/W)
GDMA_AHBM_RST_EXTER Set this bit, then clear this bit to reset the external AHB FSM. (R/W)
GDMA_CLK_EN 1: Force clock on for registers; 0: Support clock only when application writes reg-
isters. (R/W)
O O H0 _IN T_ W
_C CH INT _R AW
_D _E _C 0 IN RA
H0 0_ _R AW
NE F_ _ T R
AW W
IN UC OF CH 0_ T_
_I INT AW
_R RA
A_ _S _E R_ CH _IN
NT _
DM IN R ER Y 0
G A_ _ER R_ PT CH
_
_
DM IN C EM M
G A_ _DS R_ _W
DM IN C LL
G A_ _DS FU
_
DM IN O
G A_ FIF
DM IN
)
ed
G A_
v
er
DM
s
(re
G
31 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_IN_DONE_CHn_INT_RAW The raw interrupt bit turns to high level when the last data pointed
by one receive descriptor has been received for RX channel 0. (R/WTC/SS)
GDMA_IN_SUC_EOF_CHn_INT_RAW The raw interrupt bit turns to high level when the last data
pointed by one receive descriptor has been received for RX channel 0. For UHCI0, the raw interrupt
bit turns to high level when the last data pointed by one receive descriptor has been received and
no data error is detected for RX channel 0. (R/WTC/SS)
GDMA_IN_ERR_EOF_CHn_INT_RAW The raw interrupt bit turns to high level when data error is
detected only in the case that the peripheral is UHCI0 for RX channel 0. For other peripherals, this
raw interrupt is reserved. (R/WTC/SS)
GDMA_IN_DSCR_ERR_CHn_INT_RAW The raw interrupt bit turns to high level when detecting re-
ceive descriptor error, including owner error, the second and third word error of receive descriptor
for RX channel 0. (R/WTC/SS)
GDMA_IN_DSCR_EMPTY_CHn_INT_RAW The raw interrupt bit turns to high level when RX FIFO
pointed by inlink is full and receiving data is not completed, but there is no more inlink for RX
channel 0. (R/WTC/SS)
GDMA_INFIFO_FULL_WM_CHn_INT_RAW The raw interrupt bit turns to high level when received
data byte number is up to threshold configured by GDMA_DMA_INFIFO_FULL_THRS_CH0 in RX
FIFO of RX channel 0. (R/WTC/SS)
_D _E _C 0 IN ST
_C CH INT _ST T
NE F_ _ T S
IN UC OF CH 0_ T_
O O H0 _IN T_
_S ST
A_ _S _E R_ CH _IN
_I INT T
H0 0_ _S
NT _
DM IN R ER Y 0
T
G A_ _ER R_ PT CH
_
_
DM IN C EM M
G A_ _DS R_ _W
DM IN C LL
G A_ _DS FU
_
DM IN O
G A_ FIF
DM IN
)
ed
G A_
v
er
DM
s
(re
G
31 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_IN_DONE_CHn_INT_ST The raw interrupt status bit for the GDMA_IN_DONE_CH_INT inter-
rupt. (RO)
O O H0 _IN T_ A
_C CH INT _EN NA
_D _E _C 0 IN EN
H0 0_ _E A
NE F_ _ T E
IN UC OF CH 0_ T_
NA A
_I INT NA
_E EN
A_ _S _E R_ CH _IN
NT _
DM IN R ER Y 0
G A_ _ER R_ PT CH
_
_
DM IN C EM M
G A_ _DS R_ _W
DM IN C LL
G A_ _DS FU
_
DM IN O
G A_ FIF
DM IN
)
ed
G A_
rv
DM
se
(re
G
31 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
_C CH INT _C LR LR
NE F_ _ T C _C
O O H0 _IN T_ NT
_D _E _C 0 IN _I
H0 0_ _C LR
IN UC OF CH 0_ H0
LR R
_I INT LR
_C CL
A_ _S _E R_ CH _C
NT _
DM IN R ER Y M
G A_ _ER R_ PT _W
L
_
DM IN C EM L
G A_ _DS R_ FU
_
DM IN C O
G A_ _DS FIF
DM IN IN
G A_ A_
M
)
DM D
ed
G A_
v
er
DM
s
(re
G
31 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
H0 _R NT AW
W
_I AW _RA
_C INT 0_I _R
AW
T
O H0 _C _IN
_R
_D _C R H0
NT
NE _ H
UT F ER C
O EO R_ F_
A_ UT_ SC EO
_
DM O D L
G A_ T_ TA
U O
DM O T
G A_ T_
U
)
DM O
ed
G A_
rv
DM
se
(re
G
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_OUT_DONE_CHn_INT_RAW The raw interrupt bit turns to high level when the last data
pointed by one transmit descriptor has been transmitted to peripherals for TX channel 0.
(R/WTC/SS)
GDMA_OUT_EOF_CHn_INT_RAW The raw interrupt bit turns to high level when the last data pointed
by one transmit descriptor has been read from memory for TX channel 0. (R/WTC/SS)
GDMA_OUT_DSCR_ERR_CHn_INT_RAW The raw interrupt bit turns to high level when detecting
transmit descriptor error, including owner error, the second and third word error of transmit de-
scriptor for TX channel 0. (R/WTC/SS)
GDMA_OUT_TOTAL_EOF_CHn_INT_RAW The raw interrupt bit turns to high level when data cor-
responding a outlink (includes one descriptor or few descriptors) is transmitted out for TX channel
0. (R/WTC/SS)
H0 _S NT T
_I T _ST
_C INT 0_I _S
T
O H0 _C _IN
T
_S
_D _C R H0
NT
NE _ H
UT F ER C
O EO R_ F_
A_ UT_ SC EO
_
DM O D L
G A_ T_ TA
U O
DM O T
G A_ T_
U
d)
DM O
ve
G A_
er
DM
s
(re
G
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_OUT_EOF_CHn_INT_ST The raw interrupt status bit for the GDMA_OUT_EOF_CH_INT in-
terrupt. (RO)
H0 _E NT NA
A
_I NA _EN
_C INT 0_I _E
T
NA
O H0 _C _IN
_E
_D _C R H0
NT
NE _ H
UT F ER C
O EO R_ F_
A_ UT_ SC EO
_
DM O D L
G A_ T_ TA
U O
DM O T
G A_ T_
U
d)
DM O
ve
G A_
r
DM
se
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
H0 _C NT LR
LR
_C INT 0_I _C
_I LR _C
T
LR
O H0 _C _IN
_C
_D _C R H0
NT
NE _ H
UT F ER C
O EO R_ F_
A_ UT_ SC EO
_
DM O D L
G A_ T_ TA
O
DM O T
G A_ T_
U
U
d)
DM _O
ve
A
er
DM
s
(re
G
G
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
AW
_R
NT
_I
CT
JE
E
_R
EM
TM
EX
)
ed
A_
rv
DM
se
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_EXTMEM_REJECT_INT_RAW The raw interrupt bit turns to high level when accessing ex-
ternal RAM is rejected by permission control. (R/WTC/SS)
ST
T_
IN
T_
EC
EJ
_R
EM
TM
EX
d)
ve
A_
r
DM
se
(re
G
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
NA
_E
NT
_I
CT
JE
E
_R
EM
TM
EX
d )
ve
A_
er
DM
s
(re
G
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
R
CL
T_
IN
T_
EC
EJ
_R
EM
TM
EX
e d)
A_
rv
DM
se
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
DM IN O P _ H0
_F PTY _C 0
_C H0
H
A_ FIF FU TY_ H0
UL _ H0
H0
H0
H0
H0
G A_ FIF EM _L3 _C
FI EM _L _C
L1 C
L_ L1_
C
DM IN O LL L3
IN O_ LL L2
_C
_C
_C
2
G A_ FIF FU Y_
L3
L2
L1
_ T
T_
DM IN O P
NT
NT
G A_ FIF EM
N
_C
_C
_C
_
_
FO
FO
FO
DM IN O
FO
G A_ IF
FI
FI
FI
F
IN
IN
IN
DM IN
)
ed
re rved
re rved
re rved
re rved
ed
A_
A_
A_
G A_
rv
rv
DM
DM
DM
DM
se
e
se
se
se
se
s
(re
G
re
31 29 28 27 26 25 24 23 19 18 12 11 6 5 4 3 2 1 0
0 0 0 0 1 1 1 1 0 0 0 1 1 1 0 1 0 Reset
GDMA_INFIFO_CNT_L1_CHn The register stores the byte number of the data in L1 RX FIFO for RX
channel 0. (RO)
GDMA_INFIFO_CNT_L2_CHn The register stores the byte number of the data in L2 RX FIFO for RX
channel 0. (RO)
GDMA_INFIFO_CNT_L3_CHn The register stores the byte number of the data in L3 RX FIFO for RX
channel 0. (RO)
ed
ed
A_
rv
rv
DM
se
er
se
s
(re
G
re
re
31 23 22 20 19 18 17 0
0 0 0 0 0 0 0 0 0 0 0 0 Reset
0
_CH
DR
AD
S_
DE
F_
O
_E
UC
_S
IN
A_
DM
G
31 0
0x000000 Reset
H0
_C
DDR
_A
ES
D
F_
EO
R_
R
_E
IN
A_
DM
G
31 0
0x000000 Reset
31 0
0 Reset
0
CH
F0_
_B
CR
_ DS
NK
LI
IN
A_
DM
G
31 0
0 Reset
0
CH
1_
F
_B
CR
DS
K_
LIN
IN
A_
DM
G
31 0
0 Reset
DE _2B 3_ 0
1B 3_ 0
3_ 0
0
UN ER B_L CH
R_ _L CH
_L CH
CH
N_ D 3 3_
AI UN R_ _L
A_ UTF O_ PT _C H0
_F PTY _C 0
_C H0
EM IN_ DE 4B
H
O IF FU Y_ H0
UL _ H0
H0
0
DM O IF M L C
FI _EM _L 2_C
L1 C
_R A UN R_
CH
CH
CH
L_ 1_
UT EM _ DE
UT O LL L
L
3_
2_
1_
2
DM O IF U Y_
O R AIN N
_L
_L
_L
A_ UT_ EM _U
G A_ TF O_F PT
NT
NT
NT
N
DM O IF M
DM O R I
_C
_C
_C
G A_ T_ MA
G A_ TF O_E
FO
FO
FO
FO
U E
DM O IF
DM O R
FI
FI
FI
G A_ TF
G A_ T_
UT
UT
UT
U
U
U
U
U
)
DM _O
DM _O
ed
A_
A_
A_
rv
A
DM
DM
DM
DM
DM
se
(re
G
G
G
G
31 27 26 25 24 23 22 18 17 11 10 6 5 4 3 2 1 0
0 0 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 0 Reset
GDMA_OUTFIFO_CNT_L1_CHn The register stores the byte number of the data in L1 TX FIFO for
TX channel 0. (RO)
GDMA_OUTFIFO_CNT_L2_CHn The register stores the byte number of the data in L2 TX FIFO for
TX channel 0. (RO)
GDMA_OUTFIFO_CNT_L3_CHn The register stores the byte number of the data in L3 TX FIFO for
TX channel 0. (RO)
H0
_C
H0
DR
_C
D
E
_A
AT
0
CR
H
ST
_C
DS
R_
E
AT
K_
SC
ST
IN
_D
L
_
UT
UT
UT
)
O
ed
A_
A_
A_
rv
DM
DM
DM
se
(re
G
31 23 22 20 19 18 17 0
0 0 0 0 0 0 0 0 0 0 0 0 Reset
0
CH
R_
DD
_A
ES
D
F_
O
_E
UT
O
A_
DM
G
31 0
0x000000 Reset
GDMA_OUT_EOF_DES_ADDR_CHn This register stores the address of the transmit descriptor when
the EOF bit in this descriptor is 1. (RO)
0
CH
R_
DD
_A
ES
_D
BFR
F_
EO
_
UT
O
A_
DM
G
31 0
0x000000 Reset
H0
_C
CR
DS
NK_
LI
UT
O
A_
DM
G
31 0
0 Reset
31 0
0 Reset
H0
_C
F1
_B
CR
_DS
NK
LI
UT
O
A_
DM
G
31 0
0 Reset
H0
_C
RI
_P
RX
)
ed
A_
rv
DM
se
(re
G
31 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_RX_PRI_CHn The priority of RX channel 0. The larger the value, the higher the priority. (R/W)
H0
_C
P RI
X_
d)
T
e
A_
rv
DM
se
(re
31 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_TX_PRI_CHn The priority of TX channel 0. The larger the value, the higher the priority. (R/W)
0
CH
EL_
_S
_IN
RI
PE
)
ed
A_
rv
DM
se
(re
G
31 6 5 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x3f Reset
H0
_C
EL
_S
UT
_O
RI
PE
ed)
A_
rv
DM
se
(re
G
31 6 5 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x3f Reset
31 0
0 Reset
GDMA_EXTMEM_REJECT_ADDR This register store the first address rejected by permission control
when accessing external RAM. (RO)
UM
_N
UM
EL
NN
_N
RR
RI
A
CH
PE
AT
T_
T_
T_
EC
EC
EC
EJ
EJ
EJ
_R
_R
_R
EM
EM
EM
TM
TM
TM
EX
EX
EX
d)
ve
A_
A_
A_
r
DM
DM
DM
se
(re
G
31 12 11 6 5 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GDMA_EXTMEM_REJECT_ATRR Read or write attribute of the rejected access. Bit 0: if this bit is
1, the rejected access is READ. Bit 1: if this bit is 1, the rejected access is WRITE. (RO)
GDMA_EXTMEM_REJECT_CHANNEL_NUM This field indicates the channel used for the rejected
access. (RO)
GDMA_EXTMEM_REJECT_PERI_NUM This bit indicates the peripheral whose access was re-
jected. (RO)
31 0
0x2101180 Reset
4.1 Overview
The ESP32-S3 is a dual-core system with two Harvard Architecture Xtensa® LX7 CPUs. All internal memory,
external memory, and peripherals are located on the CPU buses.
4.2 Features
• Address Space
– 848 KB of internal memory address space accessed from the instruction bus
– 560 KB of internal memory address space accessed from the data bus
– 32 MB of external memory virtual address space accessed from the instruction bus
– 32 MB external memory virtual address space accessed from the data bus
• Internal Memory
• External Memory
• Peripheral Space
– 45 modules/peripherals in total
• GDMA
– 11 GDMA-supported modules/peripherals
0x0000_0000
Reserved
0x3BFF_FFFF
Data bus 0x3C00_0000 32 MB
0x3DFF_FFFF External memory
0x3E00_0000
Reserved
0x3FC8_7FFF
0x3FC8_8000 480 KB Data bus
0x3FCF_FFFF Internal memory
0x3FD0_0000
Reserved
0x3FEF_FFFF
0x3FF0_0000 128 KB Data bus
ROM SRAM
0x3FF1_FFFF Internal memory
Cache 0x3FF2_0000
Reserved
0x3FFF_FFFF
0x4000_0000 384 KB Instruction bus
0x4005_FFFF Internal memory
0x4006_0000
Reserved
0x4036_FFFF
0x4037_0000 448 KB Instruction bus
External 0x403D_FFFF Internal memory
MMU
memory
0x403E_0000
Reserved
0x41FF_FFFF
Instruction bus 0x4200_0000 32 MB
0x43FF_FFFF External memory GDMA
0x4400_0000
Reserved
0x4FFF_FFFF
Data/Instruction
0x5000_0000 8 KB bus
RTC SLOW Memory
0x5000_1FFF Internal memory
0x5000_2000
Reserved
0x5FFF_FFFF
Data/Instruction RTC Peripheral
0x6000_0000 836 KB bus
0x600D_0FFF Peripherals
RTC Peripheral
0x6010_0000
Reserved
0xFFFF_FFFF
0x600F_E000 8 KB
RTC FAST Memory
0x600F_FFFF Internal memory
0x6010_0000
Reserved
0xFFFF_FFFF
Note:
• The memory or peripheral marked with a red pentagram can be accessed by the ULP co-processor.
• The range of addresses available in the address space may be larger than the actual available memory of a particular
type.
Addresses below 0x4000_0000 are accessed using the data bus. Addresses in the range of 0x4000_0000 ~
0x4FFF_FFFF are accessed using the instruction bus. Addresses over and including 0x5000_0000 are shared by
both data bus and instruction bus.
Both data bus and instruction bus are little-endian. The CPU can access data via the data bus using single-byte,
double-byte, 4-byte and 16-byte alignment. The CPU can also access data via the instruction bus, but only in
4-byte aligned manner; non-aligned data access will cause a CPU exception.
• directly access the internal memory via both data bus and instruction bus;
• directly access the external memory which is mapped into the address space via cache;
Figure 4-1 lists the address ranges on the data bus and instruction bus and their corresponding target
memory.
Some internal and external memory can be accessed via both data bus and instruction bus. In such cases, the
CPU can access the same memory using multiple addresses.
• Internal ROM (384 KB): The internal ROM is a read-only memory and cannot be programmed. Internal
ROM contains the ROM code (software instructions and some software read-only data) of some low level
system software.
• Internal SRAM (512 KB): The Internal Static RAM (SRAM) is a volatile memory that can be quickly accessed
by the CPU (generally within a single CPU clock cycle).
– A part of the SRAM can be configured to operate as a cache for external memory access, which
cannot be accessed by CPU in such case.
– Some parts of the SRAM can only be accessed via the CPU’s instruction bus.
– Some parts of the SRAM can only be accessed via the CPU’s data bus.
– Some parts of the SRAM can be accessed via both the CPU’s instruction bus and the CPU’s data bus.
• RTC Memory (16 KB): The RTC (Real Time Clock) memory implemented as Static RAM (SRAM) and thus is
volatile. However, RTC memory has the added feature of being persistent throughout deep sleep (i.e., the
RTC memory retains its values throughout deep sleep).
– RTC FAST Memory (8 KB): RTC FAST memory can only be accessed by the CPU, and cannot be
accessed by the ULP co-processor. It is generally used to store instructions and data that needs to
persist across a deep sleep.
– RTC SLOW Memory (8 KB): The RTC SLOW memory can be accessed by both the CPU and the ULP
co-processor, and thus is generally used to store instructions and share data between the CPU and
the ULP co-processor.
Based on the three different types of internal memory described above, the internal memory of the ESP32-S3 is
split into four segments: Internal ROM (384 KB), Internal SRAM (512 KB), RTC FAST Memory (8 KB) and RTC
SLOW Memory (8 KB). However, within each segment, there may be different bus access restrictions (e.g., some
parts of the segment may only be accessible by the CPU’s instruction bus). Therefore, some segments are also
further divided down into parts. Table 4-1 describes each part of internal memory and their address ranges on
the data bus and/or instruction bus.
Boundary Address
Bus Type Size (KB) Target
Low Address High Address
0x3FF0_0000 0x3FF1_FFFF 128 Internal ROM 1
0x3FC8_8000 0x3FCE_FFFF 416 Internal SRAM 1
Data bus
0x3FCF_0000 0x3FCF_FFFF 64 Internal SRAM 2
0x4000_0000 0x4003_FFFF 256 Internal ROM 0
0x4004_0000 0x4005_FFFF 128 Internal ROM 1
Instruction bus 0x4037_0000 0x4037_7FFF 32 Internal SRAM 0
0x4037_8000 0x403D_FFFF 416 Internal SRAM 1
0x5000_0000 0x5000_1FFF 8 RTC SLOW Memory
Data/Instruction bus
0x600F_E000 0x600F_FFFF 8 RTC FAST Memory
Note:
All of the internal memories are managed by Permission Control module. An internal memory can only be accessed
when it is allowed by Permission Control, then the internal memory can be available to the CPU. For more information
about Permission Control, please refer to Chapter 15 Permission Control (PMS).
1. Internal ROM 0
Internal ROM 0 is a 256 KB, read-only memory space, addressed by the CPU only through the instruction bus,
as shown in Table 4-1.
2. Internal ROM 1
Internal ROM 1 is a 128 KB, read-only memory space, addressed by the CPU through the instruction bus via
0x4004_0000 ~ 0x4005_FFFF or through the data bus via 0x3FF0_0000 ~ 0x3FF1_FFFF in the same order, as
shown in Table 4-1.
This means, for example, address 0x4005_0000 and 0x3FF0_0000 correspond to the same word, 0x4005_0004
and 0x3FF0_0004 correspond to the same word, 0x4005_0008 and 0x3FF0_0008 correspond to the same
word, etc (same below).
3. Internal SRAM 0
Internal SRAM 0 is a 32 KB, read-and-write memory space, addressed by the CPU through the instruction bus,
as shown in Table 4-1.
A 16 KB or the total 32 KB of this memory space can be configured as instruction cache (ICache) to store
instructions or read-only data of the external memory. In this case, the occupied memory space cannot be
accessed by the CPU, while the remaining can still can be accessed by the CPU.
4. Internal SRAM 1
Internal SRAM 1 is a 416 KB, read-and-write memory space, addressed by the CPU through the data bus or
instruction bus in the same order, as shown in Table 4-1.
The total 416 KB memory space comprises multiple 8 KB and 16 KB memory (sub-memory) blocks. A memory
block (up to 16 KB) can be used as a Trace Memory, in which case this block can still be accessed by the
CPU.
5. Internal SRAM 2
Internal SRAM 2 is a 64 KB, read-and-write memory space, addressed by the CPU through the data bus, as
shown in Table 4-1.
A 32 KB or the total 64 KB can be configured as data cache (DCache) to cache data of the external memory. The
space used as DCache cannot be accessed by the CPU, while the remaining space can still be accessed by the
CPU.
RTC FAST Memory is a 8 KB, read-and-write SRAM, addressed by the CPU through the data/instruction bus via
the shared address 0x600F_E000 ~ 0x600F_FFFF, as described in Table 4-1.
RTC SLOW Memory is a 8 KB, read-and-write SRAM, addressed by the CPU through the data/instruction bus
via shared address 0x5000_E000 ~ 0x5001_FFFF, as described in Table 4-1.
RTC SLOW Memory can also be used as a peripheral addressable to the CPU via 0x6002_1000 ~
0x6002_2FFF.
The CPU accesses the external memory via the cache. According to information inside the MMU (Memory
Management Unit), the cache maps the CPU’s instruction/data bus address into a physical address of the
external flash and RAM. Due to this address mapping, ESP32-S3 can address up to 1 GB external flash and 1
GB external RAM.
Using the cache, ESP32-S3 is able to support the following address space mappings at a time:
• Up to 32 MB instruction bus address space can be mapped to the external flash or RAM as individual 64
KB blocks via the ICache. 4-byte aligned reads and fetches are supported.
• Up to 32 MB data bus address space can be mapped to the external RAM as individual 64 KB blocks via
the DCache. Single-byte, double-byte, 4-byte, 16-byte aligned reads and writes are supported. This
address space can also be mapped to the external flash or RAM for read operations only.
Table 4-2 lists the mapping between the cache and the corresponding address ranges on the data bus and
instruction bus.
Boundary Address
Bus Type Size (MB) Target
Low Address High Address
Data bus 0x3C00_0000 0x3DFF_FFFF 32 DCache
Instruction bus 0x4200_0000 0x43FF_FFFF 32 ICache
Note:
Only if the CPU obtains permission for accessing the external memory, can it be responded for memory access.
For more detailed information about permission control, please refer to Chapter 15 Permission Control (PMS).
4.3.3.2 Cache
As shown in Figure 4-2, ESP32-S3 has a dual-core-shared ICache and DCache structure, which allows prompt
response upon simultaneous requests from the instruction bus and data bus. Some internal memory space can
be used as cache (see Internal SRAM 0 and Internal SRAM 2 in Section 4.3.2).
When the instruction bus of two cores initiate a request on ICache simultaneously, the arbiter determines which
core gets the access to the ICache first; when the data bus of two cores initiate a request on DCache
simultaneously, the arbiter determines which gets the access to the DCache first. When a cache miss occurs, the
cache controller will initiate a request to the external memory. When ICache and DCache initiate requests on the
external memory simultaneously, the arbiter determines which gets the access to the external memory first. The
size of ICache can be configured to 16 KB or 32 KB, while its block size can be configured to 16 B or 32 B.
When an ICache is configured to 32 KB, its block cannot be 16 B. The size of DCache can be configured to 32
KB or 64 KB, while its block size can be configured to 16 B, 32 B or 64 B. When a DCache is configured to 64
KB, its block cannot be 16 B.
1. WriteBack: This operation is used to clear the dirty bits in dirty blocks and update the new data to the
external memory. After the write-back operation finished, both the external memory and the cache are
bearing the new data. The CPU can then read/write the data directly from the cache. Only DCache has this
function.
If the data in the cache is newer than the one stored in the external memory, then the new data will be
considered as a dirty block. The cache tracks these dirty blocks through their dirty bits. When the dirty bits
of a data are cleared, the cache will consider the data as new.
2. Clean: This operation is used to clear dirty bits in the dirty block, without updating data to the external
memory. After the clean operation finish, there will still be old data stored in the external memory, while the
cache keeps the new one (but the cache does not know about this). The CPU can then read/write the data
directly from the cache. Only DCache has this function.
3. Invalidate: This operation is used to remove valid data in the cache. Even if the data is a dirty block
mentioned above, it will not be updated to the external memory. But for the non-dirty data, it will be only
stored in the external memory after this operation. The CPU needs to access the external memory in order
to read/write this data. As for the dirty blocks, they will be totally lost with only old data in the external
memory after this operation. There are two types of invalidate operation: automatic invalidation
(Auto-Invalidate) and manual invalidation (Manual-Invalidate). Manual-Invalidate is performed only on data in
the specified area in the cache, while Auto-Invalidate is performed on all data in the cache. Both ICache
and DCache have this function.
4. Preload: This operation is to load instructions and data into the cache in advance. The minimum unit of
preload-operation is one block. There are two types of preload-operation: manual preload
(Manual-Preload) and automatic preload (Auto-Preload). Manual-Preload means that the hardware
prefetches a piece of continuous data according to the virtual address specified by the software.
Auto-Preload means the hardware prefetches a piece of continuous data according to the current address
where the cache hits or misses (depending on configuration). Both ICache and DCache have this function.
5. Lock/Unlock: The lock operation is used to prevent the data in the cache from being easily replaced.
There are two types of lock: prelock and manual lock. When prelock is enabled, the cache locks the data
in the specified area when filling the missing data to cache memory, while the data outside the specified
area will not be locked. When manual lock is enabled, the cache checks the data that is already in the
cache memory and locks the data only if it falls in the specified area, and leaves the data outside the
specified area unlocked. When there are missing data, the cache will replace the data in the unlocked way
first, so the data in the locked way is always stored in the cache and will not be replaced. But when all
ways within the cache are locked, the cache will replace data, as if it was not locked. Unlocking is the
reverse of locking, except that it only can be done manually. Both ICache and DCache have this function.
Please note that the writing-back, cleaning and Manual-Invalidate operations will only work on the unlocked
data. If you expect to perform such operations on the locked data, please unlock them first.
GDMA uses the same addresses as the CPU’s data bus to access Internal SRAM 1 and Internal SRAM 2.
Specifically, GDMA uses address range 0x3FC8_8000 ~ 0x3FCE_FFFF to access Internal SRAM 1 and
0x3FCF_0000 ~ 0x3FCF_FFFF to access Internal SRAM 2. Note that GDMA cannot access the internal memory
occupied by cache.
In addition, GDMA can access the external memory (only RAM) via the same address as CPU accessing DCache
(0x3C00_0000 ~ 0x3DFF_FFFF). When DCache and GDMA access the external memory simultaneously, the
software needs to make sure the data is consistent.
Besides, some peripherals/modules of the ESP32-S3 can work together with GDMA. In these cases, GDMA can
provide the following powerful services for them:
There are 11 peripherals/modules that can work together with GDMA. As shown in Figure 4-3, these 11 vertical
lines in turn correspond to these 11 peripherals/modules with GDMA function, the horizontal line represents a
certain channel of GDMA (can be any channel), and the intersection of the vertical line and the horizontal line
indicates that a peripheral/module has the ability to access the corresponding channel of GDMA. If there are
multiple intersections on the same line, it means that these peripherals/modules cannot enable the GDMA
function at the same time.
These peripherals/modules can access any memory available to GDMA. For more information, please refer to
Chapter 3 GDMA Controller (GDMA).
Note:
When accessing a memory via GDMA, a corresponding access permission is needed, otherwise this access may
fail. For more information about permission control, please refer to Chapter 15 Permission Control (PMS).
4.3.5 Modules/Peripherals
The CPU can access modules/peripherals via 0x6000_0000 ~ 0x600D_0FFF shared by the data/instruction
bus.
Table 4-3 lists all the modules/peripherals and their respective address ranges. Note that the address space of
specific modules/peripherals is defined by ”Boundary Address” (including both Low Address and High
Address).
Boundary Address
Target Size (KB) Notes
Low Address High Address
UART Controller 0 0x6000_0000 0x6000_0FFF 4
Reserved 0x6000_1000 0x6000_1FFF
SPI Controller 1 0x6000_2000 0x6000_2FFF 4
SPI Controller 0 0x6000_3000 0x6000_3FFF 4
GPIO 0x6000_4000 0x6000_4FFF 4
Reserved 0x6000_5000 0x6000_6FFF
Cont’d on next page
Note:
2. The CPU needs to obtain the access permission to a certain module/peripheral when initiating a request to access
it, otherwise it may fail. For more information of permission control, please see Chapter 15 Permission Control (PMS).
5 eFuse Controller
5.1 Overview
The ESP32-S3 contains a 4-Kbit eFuse to store parameters. These parameters are burned and read by an eFuse
Controller. Once an eFuse bit is programmed to 1, it can never be reverted to 0. The eFuse controller programs
individual bits of parameters in eFuse according to users configurations. Some of these parameters can be read
by users using the eFuse controller. If read-protection for some data is not enabled, that data is readable from
outside the chip. If read-protection is enabled, that data can not be read from outside the chip. In all cases,
however, some keys stored in eFuse can still be used internally by hardware cryptography modules such as
Digital Signature, HMAC, etc., without exposing this data to the outside world.
5.2 Features
• 4-Kbit in total, with 1792 bits available for users
BLOCK0, which holds most parameters, has 25 bits that are readable but useless to users (the details are
showed in Section 5.3.2), and 29 further bits are reserved for future use.
Table 5-1 lists all the parameters in BLOCK0 and their offsets, bit widths, as well as information on whether they
can be used by hardware, which bits are write-protected, and corresponding descriptions.
The EFUSE_WR_DIS parameter is used to disable the writing of other parameters, while EFUSE_RD_DIS is
used to disable users from reading BLOCK4 ~ BLOCK10. For more information on these two parameters, please
see Section 5.3.1.1 and Section 5.3.1.2.
5 eFuse Controller
Table 51. Parameters in eFuse BLOCK0
ProgrammingProtection
Bit Accessible
Parameters by EFUSE_WR_DIS Description
Width by Hardware
Bit Number
GoBack
EFUSE_SPI_BOOT_CRYPT_CNT 3 Y 4 Represents whether SPI boot encrypt/decrypt is disabled.
Cont’d on next page
Espressif Systems
5 eFuse Controller
Table 51 – cont’d from previous page
ProgrammingProtection
Bit Accessible
Parameters by EFUSE_WR_DIS Description
Width by Hardware
Bit Number
EFUSE_SECURE_BOOT_KEY_ REVOKE0 1 N 5 Represents whether the first secure boot key is revoked.
EFUSE_SECURE_BOOT_KEY_ REVOKE1 1 N 6 Represents whether the second secure boot key is revoked.
EFUSE_SECURE_BOOT_KEY_ REVOKE2 1 N 7 Represents whether the third secure boot key is revoked.
EFUSE_KEY_PURPOSE_0 4 Y 8 Represents Key0 purpose, see Table 5-2.
EFUSE_KEY_PURPOSE_1 4 Y 9 Represents Key1 purpose, see Table 5-2.
EFUSE_KEY_PURPOSE_2 4 Y 10 Represents Key2 purpose, see Table 5-2.
EFUSE_KEY_PURPOSE_3 4 Y 11 Represents Key3 purpose, see Table 5-2.
EFUSE_KEY_PURPOSE_4 4 Y 12 Represents Key4 purpose, see Table 5-2.
Submit Documentation Feedback
is enabled.
Represents whether the function of usb_serial_jtag that
EFUSE_DIS_USB_JTAG 1 Y 2
switch usb to jtag is disabled.
EFUSE_DIS_USB_SERIAL_JTAG 1 Y 2 Represents whether usb_serial_jtag function is disabled.
Represents whether to enable selection between
EFUSE_STRAP_JTAG_SEL 1 Y 2 usb_to_jtag or pad_to_jtag through GPIO3. 0: pad_to_jtag;
1: usb_to_jtag.
Represents the connection relationship between internal
EFUSE_USB_PHY_SEL 1 Y 2
ESP32-S3 TRM (Version 1.1)
GoBack
Cont’d on next page
Espressif Systems
5 eFuse Controller
Table 51 – cont’d from previous page
ProgrammingProtection
Bit Accessible
Parameters by EFUSE_WR_DIS Description
Width by Hardware
Bit Number
GoBack
5 eFuse Controller GoBack
Table 5-2 lists all key purpose and their values. Setting the eFuse parameter EFUSE_KEY_PURPOSE_n declares
the purpose of KEYn (n: 0 ~ 5).
Key
Purpose Purposes
Values
0 User purposes
1 Reserved
2 XTS_AES_256_KEY_1 (flash/SRAM encryption and decryption)
3 XTS_AES_256_KEY_2 (flash/SRAM encryption and decryption)
4 XTS_AES_128_KEY (flash/SRAM encryption and decryption)
5 HMAC Downstream mode
6 JTAG in HMAC Downstream mode
7 Digital Signature peripheral in HMAC Downstream mode
8 HMAC Upstream mode
9 SECURE_BOOT_DIGEST0 (secure boot key digest)
10 SECURE_BOOT_DIGEST1 (secure boot key digest)
11 SECURE_BOOT_DIGEST2 (secure boot key digest)
5 eFuse Controller
Table 53. Parameters in BLOCK1 to BLOCK10
[60:65] N 20 N/A D7
EFUSE_WAFER_VERSION [0:2] N 20 N/A System data
EFUSE_PKG_VERSION [0:2] N 20 N/A System data
EFUSE_SYS_DATA_PART0 72 N 20 N/A System data
BLOCK2 EFUSE_OPTIONAL_UNIQUE_ID 128 N 20 N/A System data
EFUSE_SYS_DATA_PART1 128 N 21 N/A System data
BLOCK2 EFUSE_SYS_DATA_PART1 256 N 21 N/A System data
BLOCK3 EFUSE_USR_DATA 256 N 22 N/A User data
ESP32-S3 TRM (Version 1.1)
GoBack
BLOCK9 EFUSE_KEY5_DATA 256 Y 28 5 KEY5 or user data
Cont’d on next page
Espressif Systems
5 eFuse Controller
Table 53 – cont’d from previous page
Write Protection Read Protection
Accessible
BLOCK Parameters Bit Width by EFUSE_WR_DIS by EFUSE_RD_DIS Description
by Hardware
Bit Number Bit Number
GoBack
5 eFuse Controller GoBack
Among these blocks, BLOCK4 ~ 9 store KEY0 ~ 5, respectively. Up to six 256-bit keys can be written into eFuse.
Whenever a key is written, its purpose value should also be written (see table 5-2). For example, when a key for
the JTAG function in HMAC Downstream mode is written to KEY3 (i.e., BLOCK7), its key purpose value 6 should
also be written to EFUSE_KEY_PURPOSE_3.
BLOCK1 ~ BLOCK10 use the RS coding scheme, so there are some restrictions on writing to these parameters.
For more detailed information, please refer to Section 5.3.1.3 and 5.3.2.
5.3.1.1 EFUSE_WR_DIS
Parameter EFUSE_WR_DIS determines whether individual eFuse parameters are write-protected. After
EFUSE_WR_DIS has been programmed, execute an eFuse read operation to let the new values take effect (see
Section 5.3.3).
Column “Write Protection by EFUSE_WR_DIS Bit Number” in Table 5-1 and Table 5-3 list the specific bits in
EFUSE_WR_DIS that disable writing.
When the write protection bit of a parameter is set to 0, it means that this parameter is not write-protected and
can be programmed.
Setting the write protection bit of a parameter to 1 enables write-protection for it and none of its bits can be
modified afterwards. Non-programmed bits always remain 0 while programmed bits always remain 1.
5.3.1.2 EFUSE_RD_DIS
Only the eFuse blocks BLOCK4 ~ BLOCK10 can be individually read protected to prevent any access from
outside the chip, as shown in column “Read Protection by EFUSE_RD_DIS Bit Number” of Table 5-3. After
EFUSE_RD_DIS has been programmed, execute an eFuse read operation to let the new values take effect (see
Section 5.3.3).
If a bit in EFUSE_RD_DIS is 0, then the eFuse block can be read by users; if a bit in EFUSE_RD_DIS is 1, then the
parameter controlled by this bit is user read protected.
Other parameters that are not in BLOCK4 ~ BLOCK10 can always be read by users.
When BLOCK4 ~ BLOCK10 are set to be read-protected, the data in these blocks are not readable by users, but
they can still be used internally by hardware cryptography modules, if the EFUSE_KEY_PURPOSE_n bit is set
accordingly.
According to the different types of eFuse bits, eFuse controller use two hardware encoding schemes to protect
eFuse bits from corruption.
All BLOCK0 parameters except for EFUSE_WR_DIS are stored with four backups, meaning each bit is stored
four times. This scheme is transparent to the user. This encoding scheme is invisible for users.
BLOCK1 ~ BLOCK10 store key data and some parameters and use RS (44, 32) coding scheme that supports up
to 6 bytes of automatic error correction. The primitive polynomial of RS (44, 32) is
p(x) = x8 + x4 + x3 + x2 + 1.
The shift register circuit shown in Figure 5-1 and 5-2 processes 32 data bytes using RS (44, 32). This coding
scheme encodes 32 bytes of data into 44 bytes:
• Bytes [32:43] are the encoded parity bytes stored in 8-bit flip-flops DFF1, DFF2, ..., DFF12 (gf_mul_n,
where n is an integer, is the result of multiplying a byte of data ...)
After that, the hardware burns into eFuse the 44-byte codeword consisting of the data bytes followed by the
parity bytes.
When the eFuse block is read back, the eFuse controller automatically decodes the codeword and applies error
correction if needed.
Because the RS check codes are generated on the entire 256-bit eFuse block, each block can only be written
once.
Before programming, make sure the eFuse programming voltage VDDQ is configured correctly as described in
Section 5.3.4.
Programming BLOCK0
• EFUSE_PGM_DATA1_REG[27:31]
• EFUSE_PGM_DATA1_REG[21:24]
• EFUSE_PGM_DATA2_REG[7:15]
• EFUSE_PGM_DATA2_REG[0:3]
• EFUSE_PGM_DATA3_REG[26:27]
• EFUSE_PGM_DATA4_REG[30]
Programming BLOCK1
Programming BLOCK2 ~ 10
Programming process
5. Poll register EFUSE_CMD_REG until it is 0x0, or wait for a PGM_DONE interrupt. For more information on
how to identify a PGM_DONE interrupt, please see the end of Section 5.3.3.
6. In order to avoid programming content leakage, please clear the parameters in EFUSE_PGM_DATA0_REG
~ EFUSE_PGM_DATA7_REG and
EFUSE_PGM_CHECK_VALUE0_REG ~ EFUSE_PGM_CHECK_VALUE2_REG.
7. Trigger an eFuse read operation (see Section 5.3.3) to update eFuse registers with the new values.
8. Check error record registers. If the values read in error record registers are not 0, the programming process
should be performed again following above steps 1 ~ 7. Please check the following error record registers
for different eFuse blocks:
• BLOCK10: EFUSE_RD_RS_ERR1_REG[2:0][6:4]
Limitations
In BLOCK0, each bit can be programmed separately. However, we recommend to minimize programming cycles
and program all the bits of a parameter in one programming action. In addition, after all parameters controlled by
a certain bit of EFUSE_WR_DIS are programmed, that bit should be immediately programmed. The
programming of parameters controlled by a certain bit of EFUSE_WR_DIS, and the programming of the bit itself
can even be completed at the same time. Repeated programming of already programmed bits is strictly
forbidden, otherwise, programming errors will occur.
The eFuse Controller reads internal eFuses to update corresponding registers. This read operation happens on
system reset and can also be triggered manually by users as needed (e.g., if new eFuse values have been
programmed). The process of triggering a read operation by users is as follows:
3. Poll register EFUSE_CMD_REG until it is 0x0, or wait for a READ_DONE interrupt. Information on how to
identify a READ_DONE interrupt is provided below in this section.
The eFuse read registers will hold all values until the next read operation.
Error detection
Error record registers allow users to detect if there are any inconsistencies in the stored backup eFuse
parameters.
Registers EFUSE_RD_REPEAT_ERR0 ~ 3_REG indicate if there are any errors of programmed parameters
(except for EFUSE_WR_DIS) in BLOCK0 (value 1 indicates an error is detected, and the bit becomes invalid;
value 0 indicates no error).
Registers EFUSE_RD_RS_ERR0 ~ 1_REG store the number of corrected bytes as well as the result of RS
decoding during eFuse reading BLOCK1 ~ BLOCK10.
The values of above registers will be updated every time after the eFuse read registers have been updated.
The methods to identify the completion of a program/read operation are described below. Please note that bit 1
corresponds to a program operation, and bit 0 corresponds to a read operation.
• Method one:
1. Poll bit 1/0 in register EFUSE_INT_RAW_REG until it becomes 1, which represents the completion of a
program/read operation.
• Method two:
1. Set bit 1/0 in register EFUSE_INT_ENA_REG to 1 to enable the eFuse Controller to post a
PGM_DONE or READ_DONE interrupt.
2. Configure the Interrupt Matrix to enable the CPU to respond to eFuse interrupt signals, see Chapter 9
Interrupt Matrix (INTERRUPT).
Note
When eFuse controller updating its registers, it will use EFUSE_PGM_DATAn_REG (n=0�1�..,7) again to store
data. So please do not write important data into these registers before this updating process initiated.
During the chip boot process, eFuse controller will update eFuse data into registers which can be accessed by
users automatically. You can get programmed eFuse data by reading corresponding registers. Thus, it is no need
to update eFuse read registers in such case.
• EFUSE_DAC_NUM (store the rising period of VDDQ): The default value of VDDQ is 2.5 V and the voltage
increases by 0.01 V in each clock cycle. Thus, the default value of this parameter is 255;
• EFUSE_DAC_CLK_DIV (the clock divisor of VDDQ): The clock period to program VDDQ should be larger
than 1 µs;
• EFUSE_PWR_ON_NUM (the power-up time for VDDQ): The programming voltage should be stabilized after
this time, which means the value of this parameter should be configured to exceed the value of
EFUSE_DAC_CLK_DIV multiply by EFUSE_DAC_NUM;
• EFUSE_PWR_OFF_NUM (the power-out time for VDDQ): The value of this parameter should be larger than
10 µs.
5.3.6 Interrupts
• PGM_DONE interrupt: Triggered when eFuse programming has finished. Set
EFUSE_PGM_DONE_INT_ENA to enable this interrupt;
• READ_DONE interrupt: Triggered when eFuse reading has finished. Set EFUSE_READ_DONE_INT_ENA to
enable this interrupt.
07
5.5 Registers
The addresses in this section are relative to eFuse Controller base address provided in Table 4-3 in Chapter 4
System and Memory.
0
A_
AT
_D
M
PG
E_
US
EF
31 0
0x000000 Reset
EFUSE_PGM_DATA_0 Configures the content of the 0th 32-bit data to be programmed. (R/W)
1
A_
AT
_D
M
PG
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
EFUSE_PGM_DATA_2 Configures the content of the 2nd 32-bit data to be programmed. (R/W)
3
A_
AT
_D
M
PG
E_
US
EF
31 0
0x000000 Reset
EFUSE_PGM_DATA_3 Configures the content of the 3rd 32-bit data to be programmed. (R/W)
4
A_
AT
_D
M
PG
E_
US
EF
31 0
0x000000 Reset
EFUSE_PGM_DATA_4 Configures the content of the 4th 32-bit data to be programmed. (R/W)
31 0
0x000000 Reset
EFUSE_PGM_DATA_5 Configures the content of the 5th 32-bit data to be programmed. (R/W)
31 0
0x000000 Reset
EFUSE_PGM_DATA_6 Configures the content of the 6th 32-bit data to be programmed. (R/W)
7
A_
AT
_D
M
PG
E_
US
EF
31 0
0x000000 Reset
EFUSE_PGM_DATA_7 Configures the content of the 7th 32-bit data to be programmed. (R/W)
_0
TA
DA
S_
_R
M
PG
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
2
A_
AT
_D
S
_R
M
PG
E_
US
EF
31 0
0x000000 Reset
S
DI
R_
W
E_
US
EF
31 0
0x000000 Reset
T
YP
CR
EN
L_
AC E
HE
UA
IC H
E_ S_I AC OA DC D
RP CA HE D_ AC
US DI DC L D_ OA
AN
EF SE_ IS_ WN OA NL
AG _M
D3
S
G LE
U D DO L W
IN
JT D
AG
CH AB
VE
EF SE_ IS_ WN DO
D_ OA
_P
EF SE_ IS_ RC G
EF E_ S_ AI U
ER
JT
EX EN
U D FO OT
U D DO E_
US DI W P
PA NL
_R E
EF E_ S_ P_C
_
T4 CH
ES
B_ Y_
EF SE_ IS_ B_
IS
S_ W
_D
US PH
DI O
IS
U D US
US DI AP
E_ S_D
_D
FT
E_ T_
EF E_ S_
SO
RD
US EX
US DI
US DI
d)
)
ed
EF SE_
EF E_
E_
EF E_
E_
ve
rv
US
US
US
US
er
se
U
s
EF
EF
EF
EF
EF
(re
(re
31 27 26 25 24 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 0
EFUSE_DIS_FORCE_DOWNLOAD Represents whether the function that forces chip into download
mode is disabled or enabled. 1: Disabled. 0: Enabled. (RO)
EFUSE_SOFT_DIS_JTAG Represents whether JTAG is disabled in the soft way or not. Odd number
of 1: Disabled. Users can re-enable JTAG by HMAC module again. Even number of 1: Enabled.
(RO)
Note: The eFuse has a design flaw and does not move the pullup (needed to detect USB speed),
resulting in the PC thinking the chip is a low-speed device, which stops communication. For
detailed information, please refer to Chapter 33 USB Serial/JTAG Controller (USB_SERIAL_JTAG).
Y_ VO E2
VO E1
0
KE
KE RE K
RE K
T_ _ O
O EY V
O _K RE
T
CN
_B OT EY_
T_
RE BO _K
_1
_0
EL
YP
SP TIE E
D_ I_ RC
CU E_ OT
SE
SE
_S
CR
I_ H
D
SE R O
VD SP O
O
XP
AY
T_
E_ CU _B
E_ D_ I_F
P
RP
EL
UR
O
E
US VD SP
PU
_D
US SE R
_P
B
EF SE_ ECU
EF SE_ D_
Y_
DT
I_
EY
U VD
SP
KE
)
K
U S
ed
ed
E_
E_
EF E_
E_
E_
EF SE_
rv
rv
US
US
US
US
US
se
se
U
EF
EF
EF
EF
EF
EF
(re
(re
31 28 27 24 23 22 21 20 18 17 16 15 7 6 5 4 3 0
EFUSE_VDD_SPI_XPD Represents whether or not Flash Voltage Regulator is powered up. 1: Pow-
ered up. 0: Not powered up. (RO)
EFUSE_VDD_SPI_TIEH Represents whether or not Flash Voltage Regulator output is short con-
nected to VDD3P3_RTC_IO. 1: Short connected to VDD3P3_RTC_IO. 0: connect to 1.8 V Flash
Voltage Regulator. (RO)
EFUSE_VDD_SPI_FORCE Represents whether or not to force using the parameters in eFuse, includ-
ing EFUSE_VDD_SPI_XPD and EFUSE_VDD_SPI_TIEH, to configure flash voltage LDO. 1: Use.
0: Not use. (RO)
KE
VO
RE
E_
IV
SS
EN RE
AG
T_ G
CU E_ G JT
O G
D0
SE R JTA L_
US SE US SE EL
O A
_5
_4
_3
_2
_
E_ CU B_ RIA
VE
EF E_ S_ B_ _S
_B OT
SE
SE
SE
SE
EF SE_ IS_ _JT EL
W
ER
US DI US AG
RE BO
O
U D P S
PU
RP
RP
RP
RP
EF E_ RA Y_
ES
_T
US ST PH
PU
PU
PU
PU
_R
SH
EF SE_ SB_
T4
Y_
Y_
Y_
Y_
A
RP
KE
KE
KE
KE
FL
d)
U U
E_
EF E_
E_
E_
E_
E_
E_
ve
US
US
US
US
US
US
US
s er
EF
EF
EF
EF
EF
EF
EF
(re
31 28 27 26 25 24 23 22 21 20 19 16 15 12 11 8 7 4 3 0
EFUSE_DIS_USB_JTAG Represents whether USB OTG function that can be switched to JTAG in-
terface is disabled or enabled. 1: Disabled. 0: Enabled. (RO)
EFUSE_USB_PHY_SEL Represents the connection relationship between internal PHY, external PHY
and USB OTG, USB Serial/JTAG. 0: internal PHY is assigned to USB Serial/JTAG while external
PHY is assigned to USB OTG. 1: internal PHY is assigned to USB OTG while external PHY is
assigned to USB Serial/JTAG. (RO)
EFUSE_FLASH_TPUW Represents flash waiting time after power-up. Measurement unit: ms. If the
value is less than 15, the waiting time is the configurable value. Otherwise, the waiting time is
always 30ms. (RO)
DE
O
_M
AD
DE
O
O D
O
NL
S_ GA IN E _D OA
_M
W
DI E PR D G L
AD
E_ S_L B_ MO JTA WN
CO ION
O
_M OT
DE
L
E
US DI S C_ L_ O
NL
RO
M
AD O
O
CT
H_ _EN SU
EF E_ S_ EC RIA Y_
W
NT
O I_B
E
N
O
LE
US DI H_ SE IT
C RE
IZ
IO
_D
NL P
EF SE_ AS B_ UR
EF SE_ T_P _SE
DO C T
_S
W Y_S
RS
FL _EC D_
TG
_
U FL US EC
E
EF E_ AB NT
H EN
R
VE
PO P
_O
EF _UA WE
US N_ TY
RI
E_
AS _S
) SB
PI H_
R
EF _FL CE
U D L
ed U
U
CU
AS
E_ AS
rv IS_
R
E R
US EN
US FO
SE
US FL
se D
(re SE_
E_
EF SE_
E_
EF SE_
E
US
US
U
U
EF
EF
EF
EF
EF
31 30 29 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EFUSE_FLASH_ECC_MODE Represents the flash ECC mode in ROM. 0: 16-to-18 byte mode. 1:
16-to-17 byte mode. (RO)
EFUSE_UART_PRINT_CONTROL Represents the default UART boot message output mode. 00:
Enabled. 01: Enabled when GPIO46 is low at reset. 10: Enabled when GPIO46 is high at reset.
11: Disabled. (RO)
EFUSE_FLASH_TYPE Represents the maximum data lines of SPI flash. 0: four lines. 1: eight lines.
(RO)
EFUSE_FLASH_PAGE_SIZE Represents flash page size. 0: 256 Byte. 1: 512 Byte. 2: 1 KB. 3: 2
KB. (RO)
EFUSE_FLASH_ECC_EN Represents whether ECC for flash boot is enabled or disabled. 1: Enabled.
0: Disabled. (RO)
EFUSE_SECURE_VERSION Represents the values of version control register (used by ESP-IDF anti-
rollback feature). (RO)
D2
VE
ER
ES
_R
T4
RP
d)
E_
ve
US
r
se
EF
(re
31 24 23 0
0 0 0 0 0 0 0 0 0x0000 Reset
31 0
0x000000 Reset
_1
PA
AC
I_
SP
M
E_
E_
US
US
EF
EF
31 16 15 0
_1
NF
O
_C
AD
_P
PI
E _S
US
EF
31 0
0x000000 Reset
_2
N
O
AR
NF
N
SI
O
_P
O
ER
SI
_C
TA
_V
ER
D
DA
ER
PA
_V
S_
AF
G
I_
PK
SP
SY
W
E_
E_
E_
E_
US
US
US
US
EF
EF
EF
EF
31 24 23 21 20 18 17 0
EFUSE_SYS_DATA_PART0_0 Represents the bits 0~7 of the first part of system data. (RO)
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART0_1 Represents the bits 8~39 of the first part of system data. (RO)
_2
T0
AR
_P
TA
DA
S_
SY
E_
US
EF
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART0_2 Represents the bits 40~71 of the first part of system data. (RO)
0
D_
_I
UE
IQ
UN
L_
NA
IO
PT
O
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
2
D_
_I
UE
Q
NI
_U
L
NA
IO
PT
O
E_
US
EF
31 0
0x000000 Reset
3
D_
_I
UE
IQ
UN
L_
NA
IO
PT
O
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART1_0 Represents the first 32 bits of the second part of system data. (RO)
_1
T1
AR
_P
TA
DA
S_
SY
E_
US
EF
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART1_1 Represents the second 32 bits of the seconde part of system data.
(RO)
_2
T1
AR
_P
TA
DA
S_
SY
E_
US
EF
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART1_2 Represents the third 32 bits of the second part of system data. (RO)
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART1_3 Represents the fourth 32 bits of the second part of system data. (RO)
0
TA
DA
R_
US
E_
US
EF
31 0
0x000000 Reset
1
TA
DA
R_
US
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
4
TA
DA
R_
US
E_
US
EF
31 0
0x000000 Reset
5
TA
DA
R_
US
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A0
AT
_D
Y0
KE
E_
US
EF
31 0
0x000000 Reset
A1
AT
_D
Y0
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A4
AT
_D
Y0
KE
E_
US
EF
31 0
0x000000 Reset
A5
AT
_D
Y0
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A0
AT
_D
Y1
KE
E_
US
EF
31 0
0x000000 Reset
A1
AT
_D
Y1
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A4
AT
_D
Y1
KE
E_
US
EF
31 0
0x000000 Reset
A5
AT
_D
Y1
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A0
AT
_D
Y2
KE
E_
US
EF
31 0
0x000000 Reset
A1
AT
_D
Y2
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A4
AT
_D
Y2
KE
E_
US
EF
31 0
0x000000 Reset
A5
AT
_D
Y2
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A0
AT
_D
Y3
KE
E_
US
EF
31 0
0x000000 Reset
A1
AT
_D
Y3
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A4
AT
_D
Y3
KE
E_
US
EF
31 0
0x000000 Reset
A5
AT
_D
Y3
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A0
AT
_D
Y4
KE
E_
US
EF
31 0
0x000000 Reset
A1
AT
_D
Y4
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A4
AT
_D
Y4
KE
E_
US
EF
31 0
0x000000 Reset
A5
AT
_D
Y4
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A0
AT
_D
Y5
KE
E_
US
EF
31 0
0x000000 Reset
A1
AT
_D
Y5
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
A4
AT
_D
Y5
KE
E_
US
EF
31 0
0x000000 Reset
A5
AT
_D
Y5
KE
E_
US
EF
31 0
0x000000 Reset
31 0
0x000000 Reset
31 0
0x000000 Reset
_0
T2
AR
_P
TA
DA
S_
SY
E_
US
EF
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART2_0 Represents the first 32 bits of the third part of system data. (RO)
_1
RT2
PA
A_
AT
D
S_
SY
E_
US
EF
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART2_1 Represents the second 32 bits of the third part of system data. (RO)
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART2_2 Represents the third 32 bits of the third part of system data. (RO)
_3
T2
AR
_P
TA
DA
S_
SY
E_
US
EF
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART2_3 Represents the fourth 32 bits of the third part of system data. (RO)
_4
RT2
PA
A_
AT
D
S_
SY
E_
US
EF
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART2_4 Represents the fifth 32 bits of the third part of system data. (RO)
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART2_5 Represents the sixth 32 bits of the third part of system data. (RO)
_6
T2
AR
_P
TA
DA
S_
SY
E_
US
EF
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART2_6 Represents the seventh 32 bits of the third part of system data. (RO)
_7
T2
R
PA
A_
AT
D
S_
SY
E_
US
EF
31 0
0x000000 Reset
EFUSE_SYS_DATA_PART2_7 Represents the eighth 32 bits of the third part of system data. (RO)
RR
_E
PT
RY
NC
_E R
RR
C_ _E R HE ER
S_ C _ IC H R
_E
DI CA HE D_ AC ER
RT HE ER AC E_
R
AL
E_ S_I AC OA DC D_
ER
RR U
R
S_ R
US DI DC L D_ OA
_E AN
T_
ER
IN R
RR
_P _E
EF SE_ IS_ WN OA NL
O
AG _M
EF SE_ IS_ WN DO R
EF E_ S_ B_ R R
O
_E
G LE
U D DO E_ ER
US DI US ER ER
U D DO L W
RA RR
_B
JT D
AG
CH AB
EF SE_ IS_ RC G_
D_ OA
EF E_ _ I_ _
M
U
JT
EX EN
U D FO OT
RR
US DI TW P
PA NL
EF E_ S_ P_C
_
B_ Y_
IS
_E
S_ W
A
_D
US PH
DI O
IS
US DI AP
E_ S_D
_D
FT
E_ T_
EF E_ _ S
S
SO
RD
US EX
US DI
US DI
d)
)
ed
EF SE_
EF E_
E_
EF E_
E_
ve
rv
US
US
US
US
er
se
U
s
EF
EF
EF
EF
EF
(re
(re
31 27 26 25 24 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 0
EFUSE_RD_DIS_ERR Represents a programming error to corresponding eFuse bit if any bit in this
field is 1. (RO)
EFUSE_DIS_TWAI_ERR Represents a programming error to corresponding eFuse bit if any bit in this
field is 1. (RO)
VO E1_ R
0_ R
R
RE K ER
KE ER
ER
Y_ VO E2_
RR
KE RE K
T_ _ O
E
O EY V
T_
O _K RE
RR
RR
RR
CN
XP E R
_B OT EY_
I_ H_ ER
_E
_E
_E
D_ RR
T_
R
RE BO _K
SP TIE E_
ER
_1
_0
EL
YP
D_ I_ RC
CU E_ OT
SE
SE
_S
CR
SE R O
VD SP O
PO
PO
AY
T_
E_ CU _B
E_ D_ I_F
EL
UR
UR
O
E
US VD SP
O
_D
US SE R
_P
_P
B
EF E_ CU
EF SE_ D_
DT
I_
EY
EY
U VD
SP
US SE
)
_K
_K
ed
ed
EF E_
E_
E_
EF SE_
E
SE
rv
rv
US
US
US
US
se
se
U
U
EF
EF
EF
EF
EF
EF
(re
(re
31 28 27 24 23 22 21 20 18 17 16 15 7 6 5 4 3 0
RR
_E
KE
O
EV
_R
RR IVE
R
_B OT R _ER
_E SS
EN E
R
SE R JTA L_ R
RE BO _ER AG
RR
RR
RR
RR
R
ER
E_ CU B_ RIA _ER
T_ G
CU E_ G JT
EF E_ S_ B_ _S R
_E
_E
_E
_E
_
O G
RR
D0
US DI US AG ER
US SE US SE EL
O _A
_5
_4
_3
_2
_E
VE
EF SE_ IS_ _JT EL_
SE
SE
SE
SE
W
ER
O
U D P S
PU
RP
RP
RP
RP
EF E_ RA Y_
ES
_T
US ST PH
PU
PU
PU
PU
_R
SH
EF SE_ SB_
T4
Y_
Y_
Y_
Y_
LA
RP
KE
KE
KE
KE
d)
U U
_F
EF E_
E_
E_
E_
E_
E_
ve
E
US
US
US
US
US
US
US
ser
EF
EF
EF
EF
EF
EF
EF
(re
31 28 27 26 25 24 23 22 21 20 19 16 15 12 11 8 7 4 3 0
RR
_E
DE
O
RR
_M
LO R
_E
AD
W Y_S ER R WN _ER
DE
DO C T_ ER O D
O
S_ GA IN E_ _D OA
_M
RO RR
DE R
RR
US DI S C_ L_ O R
RR
DI E PR D G L
O _ER
ER
AD
_E
E_ S_L B_ MO JTA WN
_E
R _E
L_
CO ION
O
_M OT
R_ RR R
RR
_E ME
NL
ER
D
_S R
AD O
NL P R
CT
E
H_ _EN SU
NT
N_
O I_B
E
O
LE
U D H_ SE IT
C RE
IZ
IO
_D
EF SE_ AS B_ UR
SE
EF _UA WE _E
RS
FL _EC D_
TG
_
U FL US EC
E
O E
EF SE_ AB INT
H EN
VE
P
_O
_P Y
E_
AS _S
U EN PR
T
) SB
PI H_
UR
EF _FL CE
U D L
_
ed U
U
RT
AS
E_ AS
rv IS_
E R
EC
N
US FO
US FL
se D
_S
(re SE_
EF SE_
E_
EF SE_
EF E_
E
E
US
US
US
US
U
U
EF
EF
EF
EF
EF
31 30 29 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RR
_E
D2
VE
ER
ES
_R
T4
RP
d)
E_
ve
US
r
se
EF
(re
31 24 23 0
0 0 0 0 0 0 0 0 0x0000 Reset
UM
UM
_N
L
_N
AI
RR
M
_F
UM
UM
UM
RR
NU
L
_E
IL
U
NU
AI
M
FA
_N
_N
_N
_N
M
_E
_F
1_
_8
R_
1_
_8
TA
TA
RR
RR
RR
RR
RT
L
IL
PI
AI
AI
AI
AI
T
ER
PI
FA
_S
DA
DA
AR
PA
_E
_E
_E
_F
_F
_F
_F
_S
2_
1_
1_
AC
R_
R_
Y4
Y4
Y3
Y3
Y2
Y0
Y0
_P
S_
AC
EY
EY
EY
_M
US
US
YS
KE
KE
KE
KE
KE
KE
KE
SY
M
_K
_K
_K
SE
_S
E_
E_
E_
E_
E_
E_
E_
E_
E_
E_
E_
E
E
US
US
US
US
US
US
US
US
US
US
US
US
SE
US
US
FU
FU
EE
EF
EF
EF
EF
EF
EF
EF
EF
EF
EF
EF
EF
EF
EF
3 30 28 31 26 24 27 22 20 23 18 16 19 14 12 15 10 8 11 6 4 3 2 0
EFUSE_MAC_SPI_8M_FAIL Represents whether or not the data is reliable. 0: Means no failure and
that the data of MAC_SPI_8M is reliable. 1: Means that programming data of MAC_SPI_8M has
failed and the number of error bytes is over 6. (RO)
EFUSE_SYS_PART1_NUM Represents the number of error bytes during programming system part1.
(RO)
EFUSE_SYS_PART1_FAIL Represents whether or not the data is reliable. 0: Means no failure and
that the data of system part1 is reliable. 1: Means that programming data of system part1 failed
and the number of error bytes is over 6. (RO)
EFUSE_USR_DATA_FAIL Represents whether or not the data is reliable. 0: Means no failure and
that the user data is reliable. 1: Means that programming user data failed and the number of error
bytes is over 6. (RO)
EFUSE_KEY0_ERR_NUM Represents the number of error bytes during programming KEY0. (RO)
EFUSE_KEY0_FAIL Represents whether or not the data is reliable. 0: Means no failure and that the
data of key0 is reliable. 1: Means that programming key0 failed and the number of error bytes is
over 6. (RO)
EFUSE_KEY1_ERR_NUM Represents the number of error bytes during programming KEY1. (RO)
EFUSE_KEY1_FAIL Represents whether or not the data is reliable. 0: Means no failure and that the
data of key1 is reliable. 1: Means that programming key1 failed and the number of error bytes is
over 6. (RO)
EFUSE_KEY2_ERR_NUM Represents the number of error bytes during programming KEY2. (RO)
EFUSE_KEY2_FAIL Represents whether or not the data is reliable. 0: Means no failure and that the
data of key2 is reliable. 1: Means that programming key2 failed and the number of error bytes is
over 6. (RO)
EFUSE_KEY3_ERR_NUM Represents the number of error bytes during programming KEY3. (RO)
EFUSE_KEY3_FAIL Represents whether or not the data is reliable. 0: Means no failure and that the
data of key3 is reliable. 1: Means that programming key3 failed and the number of error bytes is
over 6. (RO)
EFUSE_KEY4_ERR_NUM Represents the number of error bytes during programming KEY4. (RO)
EFUSE_KEY4_FAIL Represents whether or not the data is reliable. 0: Means no failure and that the
data of KEY4 is reliable. 1: Means that programming data of KEY4 failed and the number of error
bytes is over 6. (RO)
UM
_N
RR
L
UM
AI
_E
_F
_N
T2
T2
RR
L
AI
R
R
PA
PA
_E
_F
Y5
Y5
S_
S_
SY
SY
KE
KE
)d
E_
E_
E_
E_
ve
US
US
US
US
er
s
EF
EF
EF
EF
(re
31 8 7 6 4 7 2 0
EFUSE_KEY5_ERR_NUM Represents the number of error bytes during programming KEY5. (RO)
EFUSE_KEY5_FAIL Represents whether or not the data is reliable. 0: Means no failure and that the
data of KEY5 is reliable. 1: Means that programming data of KEY5 failed and the number of error
bytes is over 6. (RO)
EFUSE_SYS_PART2_FAIL Represents whether or not the data is reliable. 0: Means no failure and
that the data of system part2 is reliable. 1: Means that programming data of system part2 failed
and the number of error bytes is over 6. (RO)
_F E_O PU
PD
O N
EM C _
E_
M OR CE
RC
E_ _F OR
U S LK _F
EF _C M
E_ EM ME
EN
US M E_
EF SE_ US
K_
CL
U EF
)
)
ed
ed
E_
EF SE_
rv
rv
US
se
se
U
EF
EF
(re
(re
31 17 16 15 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 Reset
EFUSE_CLK_EN Configures whether or not to enable clock signal of eFuse registers. 1: Enable. 0:
No effect. (R/W)
DE
CO
P_
O
d)
E_
ve
US
r
se
EF
(re
31 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x00 Reset
D
AD MD
M
UM
_C
RE _C
_N
E_ M
LK
US PG
)
_B
ed
EF E_
E
v
US
US
er
s
EF
EF
(re
31 6 5 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 0 0 Reset
V
DI
K_
M
NU
CL
R
CL
C_
C_
E_
DA
DA
O
)
)
ed
ed
E_
E_
E_
rv
rv
US
US
US
se
se
EF
EF
EF
(re
(re
31 18 17 16 9 8 7 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 28 Reset
EFUSE_DAC_CLK_DIV Configures the division factor of the clock for the programming voltage. (R/W)
EFUSE_OE_CLR Configures whether or not to reduce the power supply of the programming voltage.
1: Reduce. 0: No effect. (R/W)
d)
E_
e
rv
US
se
EF
(re
31 24 23 0
0x12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
M
NU
N_
O
R_
PW
)
)
ed
ed
E_
rv
rv
US
se
se
EF
(re
(re
31 24 23 8 7 0
0 0 0 0 0 0 0 0 0x2880 0 0 0 0 0 0 0 0 Reset
UM
_N
FF
O
R_
PW
d)
E_
ve
US
r
se
EF
(re
31 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x190 Reset
E
PE
AT
RE
ST
d)
)
ed
E_
E_
e
rv
rv
US
US
se
se
EF
EF
(re
(re
31 18 17 10 9 4 3 0
AW
NT W
_I RA
_R
NE _
O INT
_D E_
AD ON
RE _D
E_ M
US PG
)
ed
EF SE_
rv
se
U
EF
(re
31 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
T
_I ST
_S
NE _
NT
O INT
_D E_
AD ON
RE _D
E_ M
US PG
d)
EF SE_
e
rv
se
U
EF
(re
31 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
NA
NT A
_I EN
_E
NE _
O INT
_D E_
AD ON
RE _D
E_ M
US PG
d)
EF SE_
e
rv
se
U
EF
(re
31 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
LR
NT R
_I CL
_C
NE _
O INT
_D E_
AD ON
RE _D
E_ M
US PG
d)
EF SE_
ve
er
U
s
EF
(re
31 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
TE
DA
)
ed
E_
rv
US
se
EF
(re
31 28 27 0
0 0 0 0 0x2003310 Reset
6.1 Overview
The ESP32-S3 chip features 45 physical GPIO pins. Each pin can be used as a general-purpose I/O, or be
connected to an internal peripheral signal. Through GPIO matrix, IO MUX, and RTC IO MUX, peripheral input
signals can be from any GPIO pin, and peripheral output signals can be routed to any GPIO pin. Together these
modules provide highly configurable I/O.
Note that the 45 GPIO pins are numbered from 0 ~ 21 and 26 ~ 48. All these pins can be configured either
as input or output.
6.2 Features
GPIO Matrix Features
• A full-switching matrix between the peripheral input/output signals and the GPIO pins.
• 175 digital peripheral input signals can be sourced from the input of any GPIO pins.
• The output of any GPIO pins can be from any of the 184 digital peripheral output signals.
• Supports signal synchronization for peripheral inputs based on APB clock bus.
IO MUX Features
• Provides one configuration register IO_MUX_GPIOn_REG for each GPIO pin. The pin can be configured to
• Supports some high-speed digital signals (SPI, JTAG, UART) bypassing GPIO matrix for better
high-frequency digital performance. In this case, IO MUX is used to connect these pins directly to
peripherals.
1. Only part of peripheral input signals (marked “yes” in column “Direct input through IO MUX” in Table 6-2)
can bypass GPIO matrix. The other input signals can only be routed to peripherals via GPIO matrix.
2. There are only 45 inputs from GPIO SYNC to GPIO matrix, since ESP32-S3 provides 45 GPIO pins in total.
3. The pins supplied by VDD3P3_CPU or by VDD3P3_RTC are controlled by the signals: IE, OE, WPU, and
WPD.
4. Only part of peripheral outputs (marked “yes” in column “Direct output through IO MUX” in Table 6-2) can
be routed to pins bypassing GPIO matrix.
5. There are only 45 outputs (GPIO pin X: 0 ~ 21, 26 ~ 48) from GPIO matrix to IO MUX.
Figure 6-2 shows the internal structure of a pad, which is an electrical interface between the chip logic and the
GPIO pin. The structure is applicable to all 45 GPIO pins and can be controlled using IE, OE, WPU, and WPD
signals.
Note:
• Bonding pad: a terminal point of the chip logic used to make a physical connection from the chip die to GPIO pin
in the chip package.
Figure 63. GPIO Input Synchronized on APB Clock Rising Edge or on Falling Edge
Figure 6-3 shows the functionality of GPIO SYNC. In the figure, negative sync and positive sync mean GPIO input
is synchronized on APB clock falling edge and on APB clock rising edge, respectively.
Note that some peripheral signals have no valid GPIO_SIGy_IN_SEL bit, namely, these peripherals can only
receive input signals via GPIO matrix.
2. Optionally enable the filter for pin input signals by setting the register IO_MUX_FILTER_EN. Only the signals
with a valid width of more than two APB clock cycles can be sampled, see Figure 6-4.
3. Synchronize GPIO input. To do so, please set GPIO_PINx_REG corresponding to GPIO pin X as follows:
• Set GPIO_PINx_SYNC1_BYPASS to enable input signal synchronized on rising edge or on falling edge
in the first clock, see Figure 6-3.
• Set GPIO_PINx_SYNC2_BYPASS to enable input signal synchronized on rising edge or on falling edge
in the second clock, see Figure 6-3.
4. Configure IO MUX register to enable pin input. For this end, please set IO_MUX_X_REG corresponding to
GPIO pin x as follows:
For example, to connect RMT channel 0 input signal3 (rmt_sig_in0, signal index 81) to GPIO40, please follow the
steps below. Note that GPIO40 is also named as MTDO pin.
Note:
3. It is possible to have a peripheral read a constantly low or constantly high input value without connecting this input
to a pin. This can be done by selecting a special GPIO_FUNCy_IN_SEL input, instead of a GPIO number:
• When GPIO_FUNCy_IN_SEL is set to 0x3C, input signal is always 0.
• When GPIO_FUNCy_IN_SEL is set to 0x38, input signal is always 1.
The output signal is routed from the peripheral into GPIO matrix and then into IO MUX. IO MUX must be
configured to set the chosen pin to GPIO function. This enables the output GPIO signal to be connected to the
pin.
Note:
There is a range of peripheral output signals (208 ~ 212 in Table 6-2) which are not connected to any peripheral, but to the
input signals (208 ~ 212) directly. These can be used to input a signal from one GPIO pin and output directly to another
GPIO pin.
• If the signal should always be enabled as an output, set the bit GPIO_FUNCx_OEN_SEL in register
GPIO_FUNCx_OUT_SEL_CFG_REG and the bit in register GPIO_ENABLE/ENABLE1_W1TS_REG,
corresponding to GPIO pin X. To have the output enable signal decided by internal logic (for example,
the SPIQ_oe in column “Output enable signal when GPIO_FUNCn_OEN_SEL = 0” in Table 6-2), clear
the bit GPIO_FUNCx_OEN_SEL instead.
2. For an open drain output, set the bit GPIO_PINx_PAD_DRIVER in register GPIO_PINx_REG corresponding
to GPIO pin X.
3. Configure IO MUX register to enable output via GPIO matrix. Set the IO_MUX_x_REG corresponding to
GPIO pin X as follows:
• Set the field IO_MUX_MCU_SEL to desired IO MUX function corresponding to GPIO pin X. This is
Function 1 (GPIO function), numeric value 1, for all pins.
• Set the field IO_MUX_FUN_DRV to the desired value for output strength (0 ~ 3). The higher the driver
strength, the more current can be sourced/sunk from the pin.
– 0: ~5 mA
– 1: ~10 mA
– 3: ~40 mA
Note:
1. The output signal from a single peripheral can be sent to multiple pins simultaneously.
• Set GPIO matrix GPIO_FUNCn_OUT_SEL with a special peripheral index 256 (0x100);
• Set the corresponding bit in GPIO_OUT_REG[31:0] or GPIO_OUT1_REG[21:0] to the desired GPIO output
value.
Note:
• Recommended operation: use corresponding W1TS and W1TC registers, such as GPIO_OUT_W1TS/GPIO_OUT_
W1TC to set or clear the registers GPIO_OUT_REG/GPIO_OUT1_REG.
Eight out of the 256 peripheral outputs (index: 93 ~ 100 in Table 6-2) support 1-bit second-order sigma delta
modulation. By default output is enabled for these eight channels. This Sigma Delta modulator can also output
PDM (pulse density modulation) signal with configurable duty cycle. The transfer function is:
After scaling, the clock cycle is equal to one pulse output cycle from the modulator.
GPIO_SDn_IN is a signed number with a range of [-128, 127] and is used to control the duty cycle 1 of PDM
output signal.
• GPIO_SDn_IN = 127, the duty cycle of the output signal is close to 100%.
The formula for calculating PDM signal duty cycle is shown as below:
GP IO_SDn_IN + 128
Duty_Cycle =
256
Note:
For PDM signals, duty cycle refers to the percentage of high level cycles to the whole statistical period (several pulse
• Route one of SDM outputs to a pin via GPIO matrix, see Section 6.5.2.
This option is less flexible than routing signals via GPIO matrix, as the IO MUX register for each GPIO pin can only
select from a limited number of functions, but high-frequency digital performance can be improved.
1. IO_MUX_MCU_SEL for the GPIO pin must be set to the required pin function. For the list of pin functions,
please refer to Section 6.12.
To bypass GPIO matrix for peripheral output signals, IO_MUX_MCU_SEL for the GPIO pin must be set to the
required pin function. For the list of pin functions, please refer to Section 6.12.
Note:
Not all signals can be connected to peripheral via IO MUX. Some input/output signals can only be connected to peripheral
via GPIO matrix.
When configured as RTC GPIOs, the output pins can still retain the output level value when the chip is in
Deep-sleep mode, and the input pins can wake up the chip from Deep-sleep.
If RTC_IO_TOUCH/RTC_PADn_MUX_SEL is set to 1, then input/output signals to and from that pin is routed to
the RTC subsystem. In this mode, RTC_IO_TOUCH/RTC_PADn_REG is used to control RTC low power pins.
Note that RTC_IO_TOUCH/RTC_PADn_REG applies the RTC GPIO pin numbering, not the GPIO pin numbering.
See Table 6-4 for RTC functions of RTC IO MUX pins.
• Set RTC_IO_TOUCH/RTC_PADn_MUX_SEL, to select RTC IO MUX to route input and output signals.
Note:
If IO_MUX_SLP_SEL is set to 0, pin functions remain the same in both normal execution and Light-sleep mode. Please
refer to Section 6.5.2 for how to enable output in normal execution.
Note:
• For digital pins, to maintain pin input/output status in Deep-sleep mode, users can set RTC_CNTL_DG_PAD_
FORCE_UNHOLD to 0 before powering down. For RTC pins, the input and output values are controlled by the
corresponding bits of register RTC_CNTL_PAD_HOLD_REG, and users can set it to 1 to hold the value or set it to
0 to unhold the value.
• To disable the hold function after the chip is woken up, users can set RTC_CNTL_DG_PAD_FORCE_UNHOLD to
1. To maintain the hold function of the pin, users can set the corresponding bit in register RTC_CNTL_PAD_
HOLD_REG to 1.
• VDD3P3_RTC: the input power supply for both RTC and CPU
VDD_SPI can be configured to use an internal LDO. The LDO input and output both are 1.8 V. If the LDO is not
enabled, VDD_SPI is connected directly to the same power supply as VDD3P3_RTC.
The VDD_SPI configuration is determined by the value of strapping pin GPIO45, or can be overriden by eFuse
and/or register settings. See ESP32-S3 Datasheet sections Power Scheme and Strapping Pins for more
details.
• GPIO_FUNCn_OEN_SEL = 0: use the output enable signal from peripheral, for example SPIQ_oe in the
column “Output enable signal when GPIO_FUNCn_OEN_SEL = 0” of Table 6-2. Note that the signals such
as SPIQ_oe can be 1 (1’d1) or 0 (1’d0), depending on the configuration of corresponding peripherals. If it’s
1’d1 in the “Output enable signal when GPIO_FUNCn_OEN_SEL = 0”, it indicates that once the register
GPIO_FUNCn_OEN_SEL is cleared, the output signal is always enabled by default.
Note:
Signals are numbered consecutively, but not all signals are valid.
• Only the signals with a name assigned in the column ”Input signal” in Table 6-2 are valid input signals.
• Only the signals with a name assigned in the column ”Output signal” in Table 6-2 are valid output signals.
Direct Direct
Signal Default Output enable signal when
Input Signal Input via Output Signal Output via
No. value GPIO_FUNCn_OEN_SEL = 0
IO MUX IO MUX
0 SPIQ_in 0 yes SPIQ_out SPIQ_oe yes
1 SPID_in 0 yes SPID_out SPID_oe yes
2 SPIHD_in 0 yes SPIHD_out SPIHD_oe yes
3 SPIWP_in 0 yes SPIWP_out SPIWP_oe yes
4 - - - SPICLK_out_mux SPICLK_oe yes
5 - - - SPICS0_out SPICS0_oe yes
6 - - - SPICS1_out SPICS1_oe yes
Submit Documentation Feedback
GoBack
24 I2S0O_WS_in 0 no I2S0O_WS_out 1’d1 no
Espressif Systems
33 pcnt_sig_ch0_in0 0 no - 1’d1 no
34 pcnt_sig_ch1_in0 0 no - 1’d1 no
35 pcnt_ctrl_ch0_in0 0 no - 1’d1 -
36 pcnt_ctrl_ch1_in0 0 no - 1’d1 -
469
37 pcnt_sig_ch0_in1 0 no - 1’d1 -
38 pcnt_sig_ch1_in1 0 no - 1’d1 -
39 pcnt_ctrl_ch0_in1 0 no - 1’d1 -
40 pcnt_ctrl_ch1_in1 0 no - 1’d1 -
41 pcnt_sig_ch0_in2 0 no - 1’d1 -
42 pcnt_sig_ch1_in2 0 no - 1’d1 -
43 pcnt_ctrl_ch0_in2 0 no - 1’d1 -
44 pcnt_ctrl_ch1_in2 0 no - 1’d1 -
ESP32-S3 TRM (Version 1.1)
45 pcnt_sig_ch0_in3 0 no - 1’d1 -
46 pcnt_sig_ch1_in3 0 no - 1’d1 -
47 pcnt_ctrl_ch0_in3 0 no - 1’d1 -
48 pcnt_ctrl_ch1_in3 0 no - 1’d1 -
49 - - - - 1’d1 -
GoBack
50 - - - - 1’d1 -
51 I2S0I_SD1_in 0 no - 1’d1 -
Espressif Systems
64 - - - usb_srp_chrgvbus 1’d1 no
65 - - - usb_srp_dischrgvbus 1’d1 no
66 SPI3_CLK_in 0 no SPI3_CLK_out_mux SPI3_CLK_oe no
67 SPI3_Q_in 0 no SPI3_Q_out SPI3_Q_oe no
68 SPI3_D_in 0 no SPI3_D_out SPI3_D_oe no
69 SPI3_HD_in 0 no SPI3_HD_out SPI3_HD_oe no
70 SPI3_WP_in 0 no SPI3_WP_out SPI3_WP_oe no
71 SPI3_CS0_in 0 no SPI3_CS0_out SPI3_CS0_oe no
ESP32-S3 TRM (Version 1.1)
72 - - - SPI3_CS1_out SPI3_CS1_oe no
73 ext_adc_start 0 no ledc_ls_sig_out0 1’d1 no
74 - - - ledc_ls_sig_out1 1’d1 no
75 - - - ledc_ls_sig_out2 1’d1 no
76 - - - ledc_ls_sig_out3 1’d1 no
GoBack
77 - - - ledc_ls_sig_out4 1’d1 no
78 - - - ledc_ls_sig_out5 1’d1 no
Espressif Systems
87 - - - - 1’d1 -
88 - - - - 1’d1 -
89 I2CEXT0_SCL_in 1 no I2CEXT0_SCL_out I2CEXT0_SCL_oe no
90 I2CEXT0_SDA_in 1 no I2CEXT0_SDA_out I2CEXT0_SDA_oe no
471
99 - - - gpio_sd6_out 1’d1 no
100 - - - gpio_sd7_out 1’d1 no
101 FSPICLK_in 0 yes FSPICLK_out_mux FSPICLK_oe yes
102 FSPIQ_in 0 yes FSPIQ_out FSPIQ_oe yes
103 FSPID_in 0 yes FSPID_out FSPID_oe yes
GoBack
104 FSPIHD_in 0 yes FSPIHD_out FSPIHD_oe yes
105 FSPIWP_in 0 yes FSPIWP_out FSPIWP_oe yes
Espressif Systems
GoBack
131 Core1_gpio_in2 0 no Core1_gpio_out2 1’d1 no
132 - - - LCD_CS 1’d1 no
Espressif Systems
GoBack
158 SUBSPID7_in 0 yes SUBSPID7_out SUBSPID7_oe no
159 SUBSPIDQS_in 0 yes SUBSPIDQS_out SUBSPIDQS_oe no
Espressif Systems
GoBack
184 sdhost_cdata_in_14 1 no sdhost_cdata_out_14 sdhost_cdata_out_en_14 no
185 sdhost_cdata_in_15 1 no sdhost_cdata_out_15 sdhost_cdata_out_en_15 no
Espressif Systems
206 - - - - 1’d1 no
207 - - - - 1’d1 no
208 sig_in_func_208 0 no sig_in_func208 1’d1 no
209 sig_in_func_209 0 no sig_in_func209 1’d1 no
210 sig_in_func_210 0 no sig_in_func210 1’d1 no
GoBack
211 sig_in_func_211 0 no sig_in_func211 1’d1 no
212 sig_in_func_212 0 no sig_in_func212 1’d1 no
Espressif Systems
233 - - - - 1’d1 -
234 - - - - 1’d1 -
235 - - - - 1’d1 -
236 - - - - 1’d1 -
237 - - - - 1’d1 -
GoBack
238 - - - - 1’d1 -
239 - - - - 1’d1 -
Espressif Systems
248 - - - - 1’d1 -
249 - - - - 1’d1 -
250 - - - - 1’d1 -
251 usb_jtag_tdo_bridge 0 no usb_jtag_trst 1’d1 no
477
GoBack
6 IO MUX and GPIO Matrix (GPIO, IO MUX) GoBack
GPIO Pin Name Function 0 Function 1 Function 2 Function 3 Function 4 DRV RST Notes
0 GPIO0 GPIO0 GPIO0 - - - 2 3 R
1 GPIO1 GPIO1 GPIO1 - - - 2 1 R
2 GPIO2 GPIO2 GPIO2 - - - 2 1 R
3 GPIO3 GPIO3 GPIO3 - - - 2 1 R
4 GPIO4 GPIO4 GPIO4 - - - 2 0 R
5 GPIO5 GPIO5 GPIO5 - - - 2 0 R
6 GPIO6 GPIO6 GPIO6 - - - 2 0 R
7 GPIO7 GPIO7 GPIO7 - - - 2 0 R
8 GPIO8 GPIO8 GPIO8 - SUBSPICS1 - 2 0 R
9 GPIO9 GPIO9 GPIO9 - SUBSPIHD FSPIHD 2 1 R
10 GPIO10 GPIO10 GPIO10 FSPIIO4 SUBSPICS0 FSPICS0 2 1 R
11 GPIO11 GPIO11 GPIO11 FSPIIO5 SUBSPID FSPID 2 1 R
12 GPIO12 GPIO12 GPIO12 FSPIIO6 SUBSPICLK FSPICLK 2 1 R
13 GPIO13 GPIO13 GPIO13 FSPIIO7 SUBSPIQ FSPIQ 2 1 R
14 GPIO14 GPIO14 GPIO14 FSPIDQS SUBSPIWP FSPIWP 2 1 R
15 XTAL_32K_P GPIO15 GPIO15 U0RTS - - 2 0 R
16 XTAL_32K_N GPIO16 GPIO16 U0CTS - - 2 0 R
17 GPIO17 GPIO17 GPIO17 U1TXD - - 2 1 R
18 GPIO18 GPIO18 GPIO18 U1RXD CLK_OUT3 - 2 1 R
19 GPIO19 GPIO19 GPIO19 U1RTS CLK_OUT2 - 3 0 R
20 GPIO20 GPIO20 GPIO20 U1CTS CLK_OUT1 - 3 0 R
21 GPIO21 GPIO21 GPIO21 - - - 2 0 R
26 SPICS1 SPICS1 GPIO26 - - - 2 3 -
27 SPIHD SPIHD GPIO27 - - - 2 3 -
28 SPIWP SPIWP GPIO28 - - - 2 3 -
29 SPICS0 SPICS0 GPIO29 - - - 2 3 -
30 SPICLK SPICLK GPIO30 - - - 2 3 -
31 SPIQ SPIQ GPIO31 - - - 2 3 -
32 SPID SPID GPIO32 - - - 2 3 -
33 GPIO33 GPIO33 GPIO33 FSPIHD SUBSPIHD SPIIO4 2 1 -
34 GPIO34 GPIO34 GPIO34 FSPICS0 SUBSPICS0 SPIIO5 2 1 -
35 GPIO35 GPIO35 GPIO35 FSPID SUBSPID SPIIO6 2 1 -
36 GPIO36 GPIO36 GPIO36 FSPICLK SUBSPICLK SPIIO7 2 1 -
37 GPIO37 GPIO37 GPIO37 FSPIQ SUBSPIQ SPIDQS 2 1 -
38 GPIO38 GPIO38 GPIO38 FSPIWP SUBSPIWP - 2 1 -
39 MTCK MTCK GPIO39 CLK_OUT3 SUBSPICS1 - 2 1* -
40 MTDO MTDO GPIO40 CLK_OUT2 - - 2 1 -
41 MTDI MTDI GPIO41 CLK_OUT1 - - 2 1 -
42 MTMS MTMS GPIO42 - - - 2 1 -
GPIO Pin Name Function 0 Function 1 Function 2 Function 3 Function 4 DRV RST Notes
43 U0TXD U0TXD GPIO43 CLK_OUT1 - - 2 4 -
44 U0RXD U0RXD GPIO44 CLK_OUT2 - - 2 3 -
45 GPIO45 GPIO45 GPIO45 - - - 2 2 -
46 GPIO46 GPIO46 GPIO46 - - - 2 2 -
47 SPICLK_P SPICLK_DIFF GPIO47 SUBSPICLK_P_DIFF - - 2 1 -
48 SPICLK_N SPICLK_DIFF GPIO48 SUBSPICLK_N_DIFF - - 2 1 -
Drive Strength
“DRV” column shows the drive strength of each pin after reset:
• 0 - Drive current = ~5 mA
Reset Configurations
“RST” column shows the default configuration of each pin after reset:
• 0 - IE = 0 (input disabled)
• 1 - IE = 1 (input enabled)
Note:
Please refer to Appendix A – ESP32-S3 Pin Lists in ESP32-S3 Datasheet for more details.
RTC Function
RTC GPIO Num GPIO Num Pin Name
0 1 2 3
0 0 GPIO0 RTC_GPIO0 - - sar_i2c_scl_0a
1 1 GPIO1 RTC_GPIO1 - - sar_i2c_sda_0a
2 2 GPIO2 RTC_GPIO2 - - sar_i2c_scl_1a
3 3 GPIO3 RTC_GPIO3 - - sar_i2c_sda_1a
Cont’d on next page
Table 6-5 shows the RTC pins, their corresponding GPIO pins and analog functions.
Analog Function
RTC GPIO Num GPIO Num Pin Name
0 1
0 0 GPIO0 - -
1 1 GPIO1 TOUCH1 ADC1_CH0
2 2 GPIO2 TOUCH2 ADC1_CH1
3 3 GPIO3 TOUCH3 ADC1_CH2
4 4 GPIO4 TOUCH4 ADC1_CH3
5 5 GPIO5 TOUCH5 ADC1_CH4
6 6 GPIO6 TOUCH6 ADC1_CH5
7 7 GPIO7 TOUCH7 ADC1_CH6
8 8 GPIO8 TOUCH8 ADC1_CH7
9 9 GPIO9 TOUCH9 ADC1_CH8
10 10 GPIO10 TOUCH10 ADC1_CH9
11 11 GPIO11 TOUCH11 ADC2_CH0
12 12 GPIO12 TOUCH12 ADC2_CH1
13 13 GPIO13 TOUCH13 ADC2_CH2
14 14 GPIO14 TOUCH14 ADC2_CH3
Analog Function
RTC GPIO Num GPIO Num Pin Name
0 1
15 15 XTAL_32K_P XTAL_32K_P ADC2_CH4
16 16 XTAL_32K_N XTAL_32K_N ADC2_CH5
17 17 GPIO17 - ADC2_CH6
18 18 GPIO18 - ADC2_CH7
19 19 GPIO19 USB_D- ADC2_CH8
20 20 GPIO20 USB_D+ ADC2_CH9
21 21 GPIO21 - -
6.15 Registers
L
SE
T_
_B
O
PI
G
31 0
0x000000 Reset
G
RI
O
A_
AT
_D
UT
_O
O
PI
G
31 0
0x000000 Reset
GPIO_OUT_DATA_ORIG GPIO0 ~ 21 and GPIO26 ~ 31 output values in simple GPIO output mode.
The values of bit0 ~ bit21 correspond to the output values of GPIO0 ~ 21, and bit26 ~ bit31 to
GPIO26 ~ 31. Bit22 ~ bit25 are invalid. (R/W)
31 0
0x000000 Reset
GPIO_OUT_W1TS GPIO0 ~ 31 output set register. If the value 1 is written to a bit here, the corre-
sponding bit in GPIO_OUT_REG will be set to 1. Recommended operation: use this register to set
GPIO_OUT_REG. (WO)
C
1T
W_
UT
_O
O
PI
G
31 0
0x000000 Reset
GPIO_OUT_W1TC GPIO0 ~ 31 output clear register. If the value 1 is written to a bit here, the cor-
responding bit in GPIO_OUT_REG will be cleared. Recommended operation: use this register to
clear GPIO_OUT_REG. (WO)
G
RI
_ O
TA
DA
1_
UT
d )
_O
ve
r
O
se
PI
(re
G
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
GPIO_OUT1_DATA_ORIG GPIO32 ~ 48 output value in simple GPIO output mode. The values of
bit0 ~ bit16 correspond to GPIO32 ~ GPIO48. Bit17 ~ bit21 are invalid. (R/W)
_O
rv
O
se
PI
(re
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
GPIO_OUT1_W1TS GPIO32 ~ 48 output value set register. If the value 1 is written to a bit here, the
corresponding bit in GPIO_OUT1_REG will be set to 1. Recommended operation: use this register
to set GPIO_OUT1_REG. (WO)
C
1T
1 _W
UT
)
ed
_O
rv
O
se
PI
(re
G
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
GPIO_OUT1_W1TC GPIO32 ~ 48 output value clear register. If the value 1 is written to a bit here, the
corresponding bit in GPIO_OUT1_REG will be cleared. Recommended operation: use this register
to clear GPIO_OUT1_REG. (WO)
EL
_S
O
DI
d)
_S
ve
r
O
se
PI
(re
G
31 8 7 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
31 0
0x000000 Reset
S
1T
_W
LE
N AB
_E
O
PI
G
31 0
0x000000 Reset
GPIO_ENABLE_W1TS GPIO0 ~ 31 output enable set register. If the value 1 is written to a bit here,
the corresponding bit in GPIO_ENABLE_REG will be set to 1. Recommended operation: use this
register to set GPIO_ENABLE_REG. (WO)
C
1T
W
E_
BL
NA
_E
O
PI
G
31 0
0x000000 Reset
GPIO_ENABLE_W1TC GPIO0 ~ 31 output enable clear register. If the value 1 is written to a bit here,
the corresponding bit in GPIO_ENABLE_REG will be cleared. Recommended operation: use this
register to clear GPIO_ENABLE_REG. (WO)
N
ed
_E
rv
O
se
PI
(re
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
S
1T
W
1_
E
BL
NA
)d
_E
ve
er
O
s
PI
(re
G
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
GPIO_ENABLE1_W1TS GPIO32 ~ 48 output enable set register. If the value 1 is written to a bit here,
the corresponding bit in GPIO_ENABLE1_REG will be set to 1. Recommended operation: use this
register to set GPIO_ENABLE1_REG. (WO)
C
1T
_W
E1
BL
NA
d)
_E
r ve
O
se
PI
(re
G
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
GPIO_ENABLE1_W1TC GPIO32 ~ 48 output enable clear register. If the value 1 is written to a bit
here, the corresponding bit in GPIO_ENABLE1_REG will be cleared. Recommended operation:
use this register to clear GPIO_ENABLE1_REG. (WO)
_S
rv
O
se
PI
(re
31 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GPIO_STRAPPING GPIO strapping values: bit5 ~ bit2 correspond to stripping pins GPIO3, GPIO45,
GPIO0, and GPIO46 respectively. (RO)
XT
NE
A_
AT
D
N_
_I
O
PI
G
31 0
0 Reset
GPIO_IN_DATA_NEXT GPIO0 ~ 31 input value. Each bit represents a pin input value, 1 for high level
and 0 for low level. (RO)
E XT
_N
1
TA
DA
N_
d)
ve
_I
r
O
se
PI
(re
G
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0 Reset
GPIO_IN_DATA1_NEXT GPIO32 ~ 48 input value. Each bit represents a pin input value. (RO)
LE
SS
AB
_D PAS
PA
EN
NC ER
_P PAD BY
BY
P_
SY RIV
PE
NA
PI Nn_ C1_
2_
IG
EU
TY
NF
_E
AK
T_
_P SYN
NT
IN
W
_C
I
n_
n_
n_
PI Nn_
n_
n
IN
IN
IN
IN
IN
d)
)
ed
I
_P
_P
_P
_P
_P
ve
rv
er
O
se
s
PI
PI
PI
PI
PI
(re
(re
G
G
31 18 17 13 12 11 10 9 7 6 5 4 3 2 1 0
GPIO_PINn_SYNC2_BYPASS For the second stage synchronization, GPIO input data can be syn-
chronized on either edge of the APB clock. 0: no synchronization; 1: synchronized on falling edge;
2 and 3: synchronized on rising edge. (R/W)
GPIO_PINn_PAD_DRIVER Pin driver selection. 0: normal output; 1: open drain output. (R/W)
GPIO_PINn_SYNC1_BYPASS For the first stage synchronization, GPIO input data can be synchro-
nized on either edge of the APB clock. 0: no synchronization; 1: synchronized on falling edge; 2
and 3: synchronized on rising edge. (R/W)
GPIO_PINn_INT_TYPE Interrupt type selection. 0: GPIO interrupt disabled; 1: rising edge trigger; 2:
falling edge trigger; 3: any edge trigger; 4: low level trigger; 5: high level trigger. (R/W)
GPIO_PINn_WAKEUP_ENABLE GPIO wake-up enable bit, only wakes up the CPU from Light-sleep.
(R/W)
GPIO_PINn_INT_ENA Interrupt enable bits. bit13: CPU interrupt enabled; bit14: CPU non-maskable
interrupt enabled. (R/W)
L
SE
IN
_I L
Cy SE
N_
N_
UN N_
_I
Cy
_F _I
O y
UN
PI SIG
d)
_F
e
rv
_
O
O
se
PI
PI
(re
G
G
31 8 7 6 5 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
GPIO_FUNCy_IN_SEL Selection control for peripheral input signal Y, selects a pin from the 48 GPIO
matrix pins to connect this input signal. Or selects 0x38 for a constantly high input or 0x3C for a
constantly low input. (R/W)
GPIO_FUNCy_IN_INV_SEL 1: Invert the input value; 0: Do not invert the input value. (R/W)
GPIO_SIGy_IN_SEL Bypass GPIO matrix. 1: route signals via GPIO matrix, 0: connect signals directly
to peripheral configured in IO MUX. (R/W)
UT EL EL
EL
_O _S _S
_S
EL
Cx EN NV
NV
_S
UN _O _I
_I
_F Cx N
UT
O N OE
_O
PI U _
G F Cx
Cx
O N
UN
d)
PI FU
ve
_F
_
_
er
O
s
PI
PI
(re
G
G
G
31 12 11 10 9 8 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x100 Reset
GPIO_FUNCx_OUT_INV_SEL 0: Do not invert the output value; 1: Invert the output value. (R/W)
GPIO_FUNCx_OEN_SEL 0: Use output enable signal from peripheral; 1: Force the output enable
signal to be sourced from GPIO_ENABLE_REG[x]. (R/W)
GPIO_FUNCn_OEN_INV_SEL 0: Do not invert the output enable signal; 1: Invert the output enable
signal. (R/W)
N
_E
LK
d)
_C
rve
O
se
PI
(re
31 1
G
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
GPIO_CLK_EN Clock gating enable bit. If set to 1, the clock is free running. (R/W)
31 0
0x000000 Reset
T
UP
RR
E
NT
_I
S1
TU
TA
)
ed
_S
rv
O
se
PI
(re
G
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
T
IN
P U_
_C
O
PI
G
31 0
0x000000 Reset
GPIO_CPU_INT GPIO0 ~ 31 CPU interrupt status. This interrupt status is corresponding to the bit in
GPIO_STATUS_REG when assert (high) enable signal (bit13 of GPIO_PINn_REG). (RO)
31 0
0x000000 Reset
T
IN
1_
PU
)
ed
_C
rv
O
se
PI
(re
G
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
GPIO_CPU1_INT GPIO32 ~ 48 CPU interrupt status. This interrupt status is corresponding to the bit
in GPIO_STATUS1_REG when assert (high) enable signal (bit 13 of GPIO_PINn_REG). (RO)
TN
_I
I1
NM
U_
)
P
ed
_C
rv
O
se
PI
(re
G
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
31 0
0x000000 Reset
GPIO_STATUS_W1TS GPIO0 ~ 31 interrupt status set register. If the value 1 is written to a bit here,
the corresponding bit in GPIO_STATUS_INTERRUPT will be set to 1. Recommended operation:
use this register to set GPIO_STATUS_INTERRUPT. (WO)
C
1T
W
S_
TU
TA
_S
O
PI
G
31 0
0x000000 Reset
GPIO_STATUS_W1TC GPIO0 ~ 31 interrupt status clear register. If the value 1 is written to a bit here,
the corresponding bit in GPIO_STATUS_INTERRUPT will be cleared. Recommended operation:
use this register to clear GPIO_STATUS_INTERRUPT. (WO)
S
1T
_W
S1
TU
TA
)
ed
_S
rv
O
se
PI
(re
G
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
GPIO_STATUS1_W1TS GPIO32 ~ 48 interrupt status set register. If the value 1 is written to a bit here,
the corresponding bit in GPIO_STATUS1_REG will be set to 1. Recommended operation: use this
register to set GPIO_STATUS1_REG. (WO)
_S
e
rv
O
se
PI
(re
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
GPIO_STATUS1_W1TC GPIO32 ~ 48 interrupt status clear register. If the value 1 is written to a bit
here, the corresponding bit in GPIO_STATUS1_REG will be cleared. Recommended operation:
use this register to clear GPIO_STATUS1_REG. (WO)
T
EX
T _N
UP
RR
TE
IN
S_
TU
TA
_S
O
PI
G
31 0
0x000000 Reset
GPIO_STATUS_INTERRUPT_NEXT Interrupt source signal of GPIO0 ~ 31, could be rising edge in-
terrupt, falling edge interrupt, level sensitive interrupt and any edge interrupt. (RO)
XT
NE
T_
UP
RR
TE
N
_I
S1
TU
TA
d)
_S
e
rv
O
se
PI
(re
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
_D
e
rv
O
se
PI
(re
31 28 27 0
0 0 0 0 0x1907040 Reset
M
TR
NU
K3
K2
K1
_C
T_
CL
CL
CL
ER
L_
L_
L_
_P
W
TR
TR
TR
O
CH
_P
_C
_C
_C
IT
D
IN
IN
IN
W
PA
_S
_P
_P
_P
)
_
ed
UX
UX
UX
UX
UX
rv
_M
_M
_M
_M
_M
se
(re
IO
IO
IO
IO
IO
31 16 15 14 12 11 8 7 4 3 0
IO_MUX_SWITCH_PRT_NUM GPIO pin power switch delay, delay unit is one APB clock. (R/W)
IO_MUX_PAD_POWER_CTRL Select power voltage for GPIO33 ~ 37. 1: select VDD_SPI 1.8 V; 0:
select VDD3P3_CPU 3.3 V. (R/W)
_M _S U_ U
_M _S D
N
RV
UX N_W U
PD
L
IO UX UN V
IO UX C WP
UX LP WP
E
CU EL
E
U P
E
_M _F DR
IO UX C IE
R_
_O
IO UX U_D
_S
IO X_F _W
U UN E
_M _M U_
_M _M U_
_ M _F _I
_
E
CU
UN
LT
_M MC
IO UX C
_M
_ M _M
FI
_F
d)
_
UX
UX
UX
IO UX
ve
r
_M
_M
_M
_M
_M
se
(re
IO
IO
IO
IO
IO
31 16 15 14 12 11 10 9 8 7 6 5 4 3 2 1 0
IO_MUX_MCU_OE Output enable of the pin in sleep mode. 1: Output enabled; 0: Output disabled.
(R/W)
IO_MUX_SLP_SEL Sleep mode selection of this pin. Set to 1 to put the pin in sleep mode. (R/W)
IO_MUX_MCU_WPD Pull-down enable of the pin during sleep mode. 1: Internal pull-down enabled;
0: Internal pull-down disabled. (R/W)
IO_MUX_MCU_WPU Pull-up enable of the pin during sleep mode. 1: Internal pull-up enabled; 0:
Internal pull-up disabled.
IO_MUX_MCU_IE Input enable of the pin during sleep mode. 1: Input enabled; 0: Input disabled.
(R/W)
IO_MUX_FUN_WPU Pull-up enable of the pin. 1: Internal pull-up enabled; 0: Internal pull-up dis-
abled. (R/W)
IO_MUX_FUN_IE Input enable of the pin. 1: Input enabled; 0: Input disabled. (R/W)
IO_MUX_FUN_DRV Select the drive strength of the pin. 0: ~5 mA: 1: ~10 mA: 2: ~20 mA; 3: ~40
mA. (R/W)
IO_MUX_MCU_SEL Select IO MUX function for this signal. 0: Select Function 0; 1: Select Function
1, etc. (R/W)
IO_MUX_FILTER_EN Enable filter for pin input signals. 1: Filter enabled; 0: Filter disabled. (R/W)
LE
S CA
RE
N
_P
_I
Dn
Dn
)
ed
_S
_S
rv
O
se
PI
PI
(re
G
31 16 15 8 7 0
GPIO_SDn_IN This field is used to configure the duty cycle of sigma delta modulation output. (R/W)
GPIO_SDn_PRESCALE This field is used to set a divider value to divide APB clock. (R/W)
)
ed
_S
rv
O
se
PI
(re
G
31 30 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GPIO_SD_CLK_EN Clock enable bit of configuration registers for sigma delta modulation. (R/W)
)
PI P
ed
G _S
rv
O
se
PI
(re
G
31 30 29 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
E
AT
_D
)
D
ed
_S
rv
O
se
PI
(re
G
31 28 27 0
0 0 0 0 0x1802260 Reset
)
PI
ed
G
rv
C_
se
RT
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 Reset
)
PI
ed
G
rv
C_
se
RT
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_GPIO_OUT_DATA_W1TS GPIO0 ~ 21 output set register. If the value 1 is written to a bit here,
the corresponding bit in RTC_GPIO_OUT_REG will be set to 1. Recommended operation: use
this register to set RTC_GPIO_OUT_REG. (WO)
C
1T
W
A_
AT
_D
UT
_O
O
)
PI
ed
G
rv
C_
se
RT
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_GPIO_OUT_DATA_W1TC GPIO0 ~ 21 output clear register. If the value 1 is written to a bit here,
the corresponding bit in RTC_GPIO_OUT_REG will be cleared. Recommended operation: use this
register to clear RTC_GPIO_OUT_REG. (WO)
)
PI
ed
G
rv
C_
se
RT
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 Reset
)
PI
ed
G
rv
C_
se
RT
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_GPIO_ENABLE_W1TS GPIO0 ~ 21 output enable set register. If the value 1 is written to a bit
here, the corresponding bit in RTC_GPIO_ENABLE_REG will be set to 1. Recommended opera-
tion: use this register to set RTC_GPIO_ENABLE_REG. (WO)
C
1T
_W
LE
N AB
_E
O
)
PI
ed
G
rv
C_
se
RT
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 Reset
)
PI
ed
G
rv
C_
se
RT
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 Reset
)
PI
d
ve
G
r
C_
se
RT
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 Reset
C
1T
W
T_
IN
S_
TU
TA
_S
O
)
PI
ed
G
rv
C_
se
RT
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 Reset
)
PI
ed
G
rv
C_
se
RT
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 Reset
ER
_E
V
E
UP
RI
YP
_D
E
_T
AK
AD
NT
_W
_P
I
n_
Nn
ed INn
IN
I
_P
_P
se O_P
O
O
d)
d)
)
PI
PI
PI
e
e
G
G
rv
rv
rv
C_
C_
C_
se
se
RT
RT
RT
(re
(re
(re
31 11 10 9 7 6 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_GPIO_PINn_WAKEUP_ENABLE GPIO wake-up enable. This will only wake up the chip from
Light-sleep. (R/W)
H_ Dn LP EL
n_ _SE
CH Dn_ PD T
SE
UN E
A X P
E
PA _S _IE
_F _O
CH AD TI T
U C P _S _S
_I
_P n_ E_O
N_
C_ OU _P n_ AR
AD UX
AD RV
n_ E
E
O H_ Dn P
Dn LP
AD RD
RU
FU
_T C A ST
_T C A SL
M
_D
_P n_
IO OU _P n_
IO OU _P n_
Dn
C_ _T CH AD
H D
C_ _T CH AD
PA
A
UC P
RT _IO OU H_P
_P
RT _IO OU H_P
H_
O H_
H
UC
_T C
C _T C
C _T C
IO OU
RT _IO OU
C_ OU
RT _IO OU
O
_T
C_ T
C _T
_T
C T
)
)
ed
ed
ed
_
_
O
RT _IO
RT _IO
IO
RT IO
rv
rv
rv
I
C_
se
se
se
C
C
RT
RT
RT
RT
RT
(re
(re
(re
31 30 29 28 27 26 23 22 21 20 19 18 17 16 15 14 13 12 0
0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_IO_TOUCH_PADn_MUX_SEL Connect the RTC pin input or digital pin input. 0 is available, i.e.
select digital pin input. (R/W)
RTC_IO_TOUCH_PADn_TIE_OPT The tie option of touch sensor. 0: tie low; 1: tie high. (R/W)
RTC_IO_TOUCH_PADn_RUE Pull-up enable of the pin. 1: internal pull-up enabled; 0: internal pull-
up disabled. (R/W)
RTC_IO_TOUCH_PADn_DRV Select the drive strength of the pin. 0: ~5 mA: 1: ~10 mA: 2: ~20 mA;
3: ~40 mA. (R/W)
UN L
RT _IO 32 SLP L
IO 32 LP EL
E
FU OE
IE
2P X_S
32 SL IE
_S
C_ X _S _S
N_
_X P_ _
P_ P_
V
P_ E
E
U
DR
32 RD
RU
_F
P_
_X _
P_
C _X P_
P
P
C_ 32
IO 32
32
RT _IO 32
X3
_X
C_ _X
_X
C _X
d)
)
ed
ed
_
_
ve
IO
RT IO
IO
IO
RT IO
rv
rv
er
C_
C_
C_
C_
se
se
s
RT
RT
RT
RT
RT
(re
(re
(re
31 30 29 28 27 26 20 19 18 17 16 15 14 13 12 0
0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_IO_X32P_RUE Pull-up enable of the pin. 1: internal pull-up enabled; 0: internal pull-up disabled.
(R/W)
RTC_IO_X32P_RDE Pull-down enable of the pin. 1: internal pull-down enabled, 0: internal pull-down
disabled. (R/W)
RTC_IO_X32P_DRV Select the drive strength of the pin. 0: ~5 mA: 1: ~10 mA: 2: ~20 mA; 3: ~40
mA. (R/W)
_F SEL
RT _IO 32 SLP L
IO 32 LP EL
E
FU OE
IE
32 SL IE
_S
C_ X _S _S
_
N_
_X N_ _
N_ P_
UX
V
N_ E
E
UN
DR
32 RD
RU
M
N_
_X _
N_
C _X N_
N
N
C_ 32
IO 32
C_ 32
C_ 32
RT IO 32
_X
C_ _X
_X
_X
C_ _X
d)
)
ed
ed
_
ve
IO
RT IO
IO
IO
RT IO
rv
rv
er
C_
C_
se
se
s
RT
RT
RT
RT
RT
(re
(re
(re
31 30 29 28 27 26 20 19 18 17 16 15 14 13 12 0
0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_IO_X32N_RUE Pull-up enable of the pin. 1: internal pull-up enabled; 0: internal pull-up dis-
abled. (R/W)
RTC_IO_X32N_RDE Pull-down enable of the pin. 1: internal pull-down enabled, 0: internal pull-down
disabled. (R/W)
RTC_IO_X32N_DRV Select the drive strength of the pin. 0: ~5 mA: 1: ~10 mA: 2: ~20 mA; 3: ~40
mA. (R/W)
Register 6.55. RTC_IO_RTC_PADn_REG (n: 1721) (0x00C8, 0x00CC, 0x00D0, 0x00D4, 0x00D8)
IO TC AD LP L
_P n_ P_ L
n_ _SE
FU OE
TC AD SL SE
IE
AD SL IE
S
N_
N_
_R _P n_ _
n_ P_
UX
V
n_ E
E
DR
AD D
RU
FU
_M
R
C_ R P _S
n_
_P n_
RT ADn
n
AD
TC AD
RT _IO TC AD
PA
_P
_R _P
_P
C _R _P
C_
_
TC
IO TC
TC
RT IO TC
_R
C_ R
_R
C_ _R
)
)
ed
ed
ed
_
_
IO
RT IO
IO
IO
RT IO
rv
rv
rv
C_
C_
C_
C_
C_
se
se
se
RT
RT
RT
RT
RT
(re
(re
(re
31 30 29 28 27 26 20 19 18 17 16 15 14 13 12 0
0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_IO_RTC_PADn_RUE Pull-up enable of the pin. 1: internal pull-up enabled; 0: internal pull-up
disabled. (R/W)
RTC_IO_RTC_PADn_DRV Select the drive strength of the pin. 0: ~5 mA: 1: ~10 mA: 2: ~20 mA; 3:
~40 mA. (R/W)
)
ed
IO
rv
C_
se
RT
(re
31 27 26 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_IO_XTL_EXT_CTR_SEL Select the external crystal power down enable source to get into
sleep mode. 0: select GPIO0; 1: select GPIO1, etc. The input value on this pin XOR
RTC_CNTL_EXT_XTL_CONF_REG[30] is the crystal power down enable signal. (R/W)
EL
EL
_S
_S
DA
CL
_S
_S
2C
2C
_I
_I
AR
AR
_S
_S
d)
ve
IO
IO
er
C_
C_
s
RT
RT
(re
31 30 29 28 27 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_IO_SAR_I2C_SCL_SEL Selects a pin the RTC I2C SCL signal connects to. 0: use RTC GPIO0;
1: use RTC GPIO2. (R/W)
RTC_IO_SAR_I2C_SDA_SEL Selects a pin the RTC I2C SDA signal connects to. 0: use RTC GPIO1;
1: use RTC GPIO3. (R/W)
E
AT
_D
d)
ve
IO
r
C_
se
RT
(re
31 28 27 0
0 0 0 0 0x1903170 Reset
7.1 Reset
7.1.1 Overview
ESP32-S3 provides four reset levels, namely CPU Reset, Core Reset, System Reset, and Chip Reset.
All reset levels mentioned above (except Chip Reset) maintain the data stored in internal memory. Figure 7-1
shows the affected subsystems of the four reset levels.
7.1.3 Features
• Support four reset levels:
– CPU Reset: only resets CPUx core. CPUx can be CPU0 or CPU1 here. Once such reset is released,
programs will be executed from CPUx reset vector. Each CPU core has its own reset logic.
– Core Reset: resets the whole digital system except RTC, including CPU0, CPU1, peripherals, Wi-Fi,
Bluetooth® LE (BLE), and digital GPIOs.
Note:
If CPU Reset is from CPU0, the sensitive registers will be reset, too.
Table 7-1 lists the reset sources and the types of reset they trigger.
7.2 Clock
7.2.1 Overview
ESP32-S3 clocks are mainly sourced from oscillator (OSC), RC, and PLL circuit, and then processed by the
dividers/selectors, which allows most functional modules to select their working clock according to their power
consumption and performance requirements. Figure 7-2 shows the system clock structure.
7.2.3 Features
ESP32-S3 clocks can be classified in two types depending on their frequencies:
• High speed clocks for devices working at a higher frequency, such as CPU and digital peripherals
• Slow speed clocks for low-power devices, such as RTC module and low-power peripherals
– RC_FAST_CLK (17.5 MHz by default): internal fast RC oscillator clock with adjustable frequency
– RC_FAST_DIV_CLK: internal fast RC oscillator clock derived from RC_FAST_CLK divided by 256
– RC_SLOW_CLK (136 kHz by default): internal low RC oscillator clock with adjustable frequency
As Figure 7-2 shows, CPU_CLK is the master clock for CPUx and it can be as high as 240 MHz when CPUx
works in high performance mode. Alternatively, CPUx can run at lower frequencies, such as at 2 MHz, to lower
power consumption.
Users can set PLL_CLK, RC_FAST_CLK or XTAL_CLK as CPU_CLK clock source by configuring register
SYSTEM_SOC_CLK_SEL, see Table 7-2 and Table 7-3. By default, the CPU clock is sourced from XTAL_CLK
with a divider of 2, i.e. the CPU clock is 20 MHz.
eFuse Controller Y Y
SARADC Y Y
USB Y
514
CRYPTO Y
TWAI Controller Y
SDIO HOST Y Y
LEDC Y Y Y Y
LCD_CAM Y Y Y
SYS_TIMER Y Y
ESP32-S3 TRM (Version 1.1)
GoBack
7 Reset and Clock GoBack
APB_CLK
APB_CLK frequency is determined by the clock source of CPU_CLK as shown in Table 7-5.
CRYPTO_PWM_CLK
The frequency of CRYPTO_PWM_CLK is determined by the CPU_CLK source, as shown in Table 7-6.
PLL_F160M_CLK
PLL_D2_CLK
LEDC_CLK
LEDC module uses RC_FAST_CLK as clock source when APB_CLK is disabled. In other words, when the
system is in low-power mode, most peripherals will be halted (APB_CLK is turned off), but LEDC can work
normally via RC_FAST_CLK.
Wi-Fi and Bluetooth LE can work only when CPU_CLK uses PLL_CLK as its clock source. Suspending PLL_CLK
requires that Wi-Fi and Bluetooth LE has entered low-power mode first.
The clock sources for RTC_SLOW_CLK and RTC_FAST_CLK are low-frequency clocks. RTC module can
operate when most other clocks are stopped.
8.1 Overview
ESP32-S3 has four strapping pins:
• GPIO0
• GPIO3
• GPIO45
• GPIO46
These strapping pins are used to control the following functions during chip power-on or hardware reset:
During power-on-reset, RTC watchdog reset, brownout reset, analog super watchdog reset, and crystal clock
glitch detection reset (see Chapter 7 Reset and Clock), hardware captures samples and stores the voltage level of
strapping pins as strapping bit of “0” or “1” in latches, and holds these bits until the chip is powered down or shut
down. Software can read the latch status (strapping value) from the register GPIO_STRAPPING.
By default, GPIO0, GPIO45, and GPIO46 are connected to the chip’s internal pull-up/pull-down resistors. If these
pins are not connected or connected to an external high-impedance circuit, the internal weak pull-up/pull-down
determines the default input level of these strapping pins (see Table 8-1).
To change the strapping bit values, users can apply external pull-down/pull-up resistors, or use host MCU GPIOs
to control the voltage level of these pins when powering on ESP32-S3. After the reset is released, the strapping
pins work as normal-function pins.
Note:
The following section provides description of the chip functions and the pattern of the strapping pins values to invoke
each function. Only documented patterns should be used. If some pattern is not documented, it may trigger unexpected
behavior.
Table 8-2 shows the strapping pin values of GPIO0 and GPIO46, and the associated boot modes. “x” means
that this value is ignored. The ESP32-S3 chip only supports the two boot modes listed above. The strapping
combination of GPIO0 = 0 and GPIO46 = 1 is not supported and will trigger unexpected behavior.
In SPI Boot mode, the CPU boots the system by reading the program stored in SPI flash. SPI Boot mode can be
further classified as follows:
• Normal Flash Boot: supports Security Boot and programs run in RAM.
• Direct Boot: does not support Security Boot and programs run directly in flash. To enable this mode, make
sure that the first two words of the bin file downloading to flash (address: 0x42000000) are 0xaedb041d.
In Download Boot mode, users can download code to flash using UART0 or USB interface. It is also possible to
load a program into SRAM and execute it in this mode.
• EFUSE_DIS_FORCE_DOWNLOAD
If this eFuse is 0 (default), software can force switch the chip from SPI Boot mode to Download Boot mode
by setting register RTC_CNTL_FORCE_DOWNLOAD_BOOT and triggering a CPU reset. If this eFuse is 1,
RTC_CNTL_FORCE_DOWNLOAD_BOOT is disabled.
• EFUSE_DIS_DOWNLOAD_MODE
• EFUSE_ENABLE_SECURITY_DOWNLOAD
If this eFuse is 1, Download Boot mode only allows reading, writing, and erasing plaintext flash and does
not support any SRAM or register operations. Ignore this eFuse if Download Boot mode is disabled.
USB Serial/JTAG Controller can also force the chip into Download Boot mode from SPI Boot mode, as well as
force the chip into SPI Boot mode from Download Boot mode. For detailed information, please refer to Chapter
33 USB Serial/JTAG Controller (USB_SERIAL_JTAG).
Note:
The value of RTC_CNTL_RTC_STORE4_REG[0] can be read and written any number of times, whereas eFuse can only be
burned once. Therefore, RTC_CNTL_RTC_STORE4_REG[0] can be used to temporarily disable ROM messages printing,
while eFuse can be used to permanently disable ROM messages printing.
• GPIO45 = 0, VDD_SPI pin is powered directly from VDD3P3_RTC via resistor RSP I . Typically this voltage is
3.3 V. For more information, see Figure: ESP32-S3 Power Scheme in ESP32-S3 Datasheet.
This functionality can be overridden by setting eFuse bit EFUSE_VDD_SPI_FORCE to 1, in which case the
EFUSE_
VDD_SPI_TIEH determines the VDD_SPI voltage:
9.1 Overview
The interrupt matrix embedded in ESP32-S3 independently allocates peripheral interrupt sources to the two
CPUs’ peripheral interrupts, to timely inform CPU0 or CPU1 to process the interrupts once the interrupt signals
are generated.
Peripheral interrupt sources must be routed to CPU0/CPU1 peripheral interrupts via this interrupt matrix due to
the following considerations:
• ESP32-S3 has 99 peripheral interrupt sources. To map them to 32 CPU0 interrupts or 32 CPU1 interrupts,
this matrix is needed.
• Through this matrix, one peripheral interrupt source can be mapped to multiple CPU0 interrupts or CPU1
interrupts according to application requirements.
9.2 Features
• Accept 99 peripheral interrupt sources as input
• Generate 26 peripheral interrupts to CPU0 and 26 peripheral interrupts to CPU1 as output. Note that the
remaining six CPU0 interrupts and six CPU1 interrupts are internal interrupts.
All the interrupts generated by the peripheral interrupt sources can be handled by CPU0 or CPU1. Users can
configure CPU0 interrupt registers (“Core0 Interrupt Reg” module in Figure 9-1) to allocate peripheral interrupt
sources to CPU0, or configure CPU1 interrupt registers (“Core1 Interrupt Reg” module in Figure 9-1) to allocate
peripheral interrupt sources to CPU1. Peripheral interrupt sources can be allocated both to CPU0 and CPU1
simultaneously, if so, CPU0 and CPU1 will accept the interrupts.
• Column “Configuration Register”: the registers used for routing the peripheral interrupt sources to
CPU0/CPU1 peripheral interrupts
• Column “Status Register”: the registers used for indicating the interrupt status of peripheral interrupt
sources
The register in column “Configuration Register” and the bit in column “Bit” correspond to the peripheral interrupt
source in column “Source”. For example, the configuration register for interrupt source MAC_INTR is
INTERRUPT_COREx_MAC_INTR_MAP_REG, and its status bit in INTERRUPT_COREx_INTR_STATUS_0_REG is
bit0.
Note that COREx in the table can be CORE0 (CPU0) or CORE1 (CPU1).
Status Register
No. Source Configuration Register
Bit Name
0 MAC_INTR INTERRUPT_COREx_MAC_INTR_MAP_REG 0
1 MAC_NMI INTERRUPT_COREx_MAC_NMI_MAP_REG 1
2 PWR_INTR INTERRUPT_COREx_PWR_INTR_MAP_REG 2
3 BB_INT INTERRUPT_COREx_BB_INT_MAP_REG 3
4 BT_MAC_INT INTERRUPT_COREx_BT_MAC_INT_MAP_REG 4
5 BT_BB_INT INTERRUPT_COREx_BT_BB_INT_MAP_REG 5
6 BT_BB_NMI INTERRUPT_COREx_BT_BB_NMI_MAP_REG 6
7 RWBT_IRQ INTERRUPT_COREx_RWBT_IRQ_MAP_REG 7
8 RWBLE_IRQ INTERRUPT_COREx_RWBLE_IRQ_MAP_REG 8
9 RWBT_NMI INTERRUPT_COREx_RWBT_NMI_MAP_REG 9
10 RWBLE_NMI INTERRUPT_COREx_RWBLE_NMI_MAP_REG 10
Submit Documentation Feedback
11 I2C_MST_INT INTERRUPT_COREx_I2C_MST_INT_MAP_REG 11
12 reserved reserved 12
13 reserved reserved 13
14 UHCI0_INTR INTERRUPT_COREx_UHCI0_INTR_MAP_REG 14
522
15 reserved reserved 15
INTERRUPT_COREx_INTR_STATUS_0_REG
16 GPIO_INTERRUPT_CPU INTERRUPT_COREx_GPIO_INTERRUPT_CPU_MAP_REG 16
17 GPIO_INTERRUPT_CPU_NMI INTERRUPT_COREx_GPIO_INTERRUPT_CPU_NMI_MAP_REG 17
18 reserved reserved 18
19 reserved reserved 19
20 SPI_INTR_1 INTERRUPT_COREx_SPI_INTR_1_MAP_REG 20
21 SPI_INTR_2 INTERRUPT_COREx_SPI_INTR_2_MAP_REG 21
22 SPI_INTR_3 INTERRUPT_COREx_SPI_INTR_3_MAP_REG 22
23 reserved reserved 23
24 LCD_CAM_INT INTERRUPT_COREx_LCD_CAM_INT_MAP_REG 24
ESP32-S3 TRM (Version 1.1)
25 I2S0_INT INTERRUPT_COREx_I2S0_INT_MAP_REG 25
26 I2S1_INT INTERRUPT_COREx_I2S1_INT_MAP_REG 26
27 UART_INTR INTERRUPT_COREx_UART_INTR_MAP_REG 27
28 UART1_INTR INTERRUPT_COREx_UART1_INTR_MAP_REG 28
29 UART2_INTR INTERRUPT_COREx_UART2_INTR_MAP_REG 29
30 SDIO_HOST_INTERRUPT INTERRUPT_COREx_SDIO_HOST_INTERRUPT_MAP_REG 30
31 PWM0_INTR INTERRUPT_COREx_PWM0_INTR_MAP_REG 31
GoBack
32 PWM1_INTR INTERRUPT_COREx_PWM1_INTR_MAP_REG 0
33 reserved reserved 1 INTERRUPT_COREx_INTR_STATUS_1_REG
34 reserved reserved 2
Espressif Systems
48 reserved reserved 16
49 reserved reserved 17
50 TG_T0_INT INTERRUPT_COREx_TG_T0_INT_MAP_REG 18
51 TG_T1_INT INTERRUPT_COREx_TG_T1_INT_MAP_REG 19 INTERRUPT_COREx_INTR_STATUS_1_REG
523
52 TG_WDT_INT INTERRUPT_COREx_TG_WDT_INT_MAP_REG 20
53 TG1_T0_INT INTERRUPT_COREx_TG1_T0_INT_MAP_REG 21
54 TG1_T1_INT INTERRUPT_COREx_TG1_T1_INT_MAP_REG 22
55 TG1_WDT_INT INTERRUPT_COREx_TG1_WDT_INT_MAP_REG 23
56 CACHE_IA_INT INTERRUPT_COREx_CACHE_IA_INT_MAP_REG 24
57 SYSTIMER_TARGET0_INT INTERRUPT_COREx_SYSTIMER_TARGET0_INT_MAP_REG 25
58 SYSTIMER_TARGET1_INT INTERRUPT_COREx_SYSTIMER_TARGET1_INT_MAP_REG 26
59 SYSTIMER_TARGET2_INT INTERRUPT_COREx_SYSTIMER_TARGET2_INT_MAP_REG 27
60 SPI_MEM_REJECT_INTR INTERRUPT_COREx_SPI_MEM_REJECT_INTR_MAP_REG 28
61 DCACHE_PRELOAD_INT INTERRUPT_COREx_DCACHE_PRELOAD_INT_MAP_REG 29
ESP32-S3 TRM (Version 1.1)
62 ICACHE_PRELOAD_INT INTERRUPT_COREx_ICACHE_PRELOAD_INT_MAP_REG 30
63 DCACHE_SYNC_INT INTERRUPT_COREx_DCACHE_SYNC_INT_MAP_REG 31
64 ICACHE_SYNC_INT INTERRUPT_COREx_ICACHE_SYNC_INT_MAP_REG 0
65 APB_ADC_INT INTERRUPT_COREX_APB_ADC_INT_MAP_REG 1
66 DMA_IN_CH0_INT INTERRUPT_COREX_DMA_IN_CH0_INT_MAP_REG 2
67 DMA_IN_CH1_INT INTERRUPT_COREx_DMA_IN_CH1_INT_MAP_REG 3
INTERRUPT_COREx_INTR_STATUS_2_REG
68 DMA_IN_CH2_INT INTERRUPT_COREx_DMA_IN_CH2_INT_MAP_REG 4
GoBack
69 DMA_IN_CH3_INT INTERRUPT_COREx_DMA_IN_CH3_INT_MAP_REG 5
70 DMA_IN_CH4_INT INTERRUPT_COREx_DMA_IN_CH4_INT_MAP_REG 6
71 DMA_OUT_CH0_INT INTERRUPT_COREX_DMA_OUT_CH0_INT_MAP_REG 7
Espressif Systems
85 CORE_0_IRAM0_PMS_MONITOR_VIOLATE_INTR INTERRUPT_COREx_CORE_0_IRAM0_PMS_MONITOR_VIOLATE_INTR_MAP_REG 21
86 CORE_0_DRAM0_PMS_MONITOR_VIOLATE_INTR INTERRUPT_COREx_CORE_0_DRAM0_PMS_MONITOR_VIOLATE_INTR_MAP_REG 22
87 CORE_0_PIF_PMS_MONITOR_VIOLATE_INTR INTERRUPT_COREx_CORE_0_PIF_PMS_MONITOR_VIOLATE_INTR_MAP_REG 23
88 CORE_0_PIF_PMS_MONITOR_VIOLATE_SIZE_INTR INTERRUPT_COREx_CORE_0_PIF_PMS_MONITOR_VIOLATE_SIZE_INTR_MAP_REG 24
524
89 CORE_1_IRAM0_PMS_MONITOR_VIOLATE_INTR INTERRUPT_COREx_CORE_1_IRAM0_PMS_MONITOR_VIOLATE_INTR_MAP_REG 25
90 CORE_1_DRAM0_PMS_MONITOR_VIOLATE_INTR INTERRUPT_COREx_CORE_1_DRAM0_PMS_MONITOR_VIOLATE_INTR_MAP_REG 26
91 CORE_1_PIF_PMS_MONITOR_VIOLATE_INTR INTERRUPT_COREx_CORE_1_PIF_PMS_MONITOR_VIOLATE_INTR_MAP_REG 27
92 CORE_1_PIF_PMS_MONITOR_VIOLATE_SIZE_INTR INTERRUPT_COREx_CORE_1_PIF_PMS_MONITOR_VIOLATE_SIZE_INTR_MAP_REG 28
93 BACKUP_PMS_VIOLATE_INT INTERRUPT_COREx_BACKUP_PMS_VIOLATE_INTR_MAP_REG 29
94 CACHE_CORE0_ACS_INT INTERRUPT_COREx_CACHE_CORE0_ACS_INT_MAP_REG 30
95 CACHE_CORE1_ACS_INT INTERRUPT_COREx_CACHE_CORE1_ACS_INT_MAP_REG 31
96 USB_DEVICE_INT INTERRUPT_COREx_USB_DEVICE_INT_MAP_REG 0
97 PERI_BACKUP_INT INTERRUPT_COREx_PERI_BACKUP_INT_MAP_REG 1 INTERRUPT_COREx_INTR_STATUS_3_REG
98 DMA_EXTMEM_REJECT_INT INTERRUPT_COREx_DMA_EXTMEM_REJECT_INT_MAP_REG 2
ESP32-S3 TRM (Version 1.1)
GoBack
9 Interrupt Matrix (INTERRUPT) GoBack
• Peripheral interrupts: triggered by peripheral interrupt sources, include the following types:
– Level-triggered interrupts: triggered by a high level signal. The interrupt sources should hold the level
till the CPUx handles the interrupts.
– Edge-triggered interrupts: triggered on a rising edge. CPUx responds to this kind of interrupts
immediately.
– NMI interrupt: once triggered, the NMI interrupt can not be masked by software using the CPUx
internal registers. World Controller provides a way to mask this kind of interrupt. For more information,
see Chapter 16 World Controller (WCL).
– Timer interrupts: triggered by internal timers and are used to generate periodic interrupts.
Level-triggered and edge-triggered both describe the ways of CPUx to accept interrupt signals. For
level-triggered interrupts, the level of interrupt signal should be kept till the CPU handles the interrupt, otherwise
the interrupt may be lost. For edge-triggered interrupts, when a rising edge is detected, this edge will be
recorded by CPUx, which then allows the interrupt signal to be released.
Interrupt matrix routes the peripheral interrupt sources to any of the CPUx peripheral interrupts. By such way,
CPUx can receive the interrupt signals from peripheral interrupt sources. Table 9-2 lists all the interrupts and their
types as well as priorities.
ESP32-S3 supports the above-mentioned 32 interrupts at six levels as shown in the table below. A higher level
corresponds to a higher priority. NMI has the highest interrupt priority and once triggered, the CPUx must handle
such interrupt. Nested interrupts are also supported, i.e. low-level interrupts can be stopped by high-level
interrupts.
• Source_Y: stands for a peripheral interrupt source, wherein, Y means the number of this interrupt source in
Table 9-1.
• Interrupt_P: stands for the CPUx peripheral interrupt numbered as Num_P. The value of Num_P can be 0 ~
5, 8 ~ 10, 12 ~ 14, 17 ~ 28, and 30 ~ 31. See Table 9-2.
• Interrupt_I: stands for the CPUx internal interrupt numbered as Num_I. The value of Num_I can be 6, 7, 11,
15, 16, and 29. See Table 9-2.
• Disconnect peripheral interrupt sources from NMI interrupt, i.e. the sources routed to NMI interrupt before
are now routed to other interrupts. By such way, the previous NMI interrupt is maskable.
• Connect peripheral interrupt sources with NMI interrupt, but use World Controller module to mask NMI
interrupt. For more information, see Chapter Chapter 16 World Controller (WCL).
GoBack
INTERRUPT_CORE0_SDIO_HOST_INTERRUPT_MAP_REG SDIO_HOST interrupt configuration register 0x0078 R/W
INTERRUPT_CORE0_PWM0_INTR_MAP_REG PWM0 interrupt configuration register 0x007C R/W
Espressif Systems
GoBack
INTERRUPT_CORE0_DMA_IN_CH1_INT_MAP_REG DMA_IN_CH1 interrupt configuration register 0x010C R/W
INTERRUPT_CORE0_DMA_IN_CH2_INT_MAP_REG DMA_IN_CH2 interrupt configuration register 0x0110 R/W
Espressif Systems
0x015C R/W
INTR_MAP_REG
INTERRUPT_CORE0_CORE_0_PIF_PMS_MONITOR_VIOLATE_ core0_PIF_pms_monitor_violatile_size interrupt configuration regis-
0x0160 R/W
SIZE_INTR_MAP_REG ter
INTERRUPT_CORE0_CORE_1_IRAM0_PMS_MONITOR_VIOLATE_ core1_IRam0_pms_monitor_violatile interrupt configuration register
0x0164 R/W
INTR_MAP_REG
GoBack
INTERRUPT_CORE0_CORE_1_DRAM0_PMS_MONITOR_VIOLATE core1_DRam0_pms_monitor_violatile interrupt configuration register
0x0168 R/W
_INTR_MAP_REG
Espressif Systems
GoBack
INTERRUPT_CORE1_PWR_INTR_MAP_REG PWR interrupt configuration register 0x0808 R/W
INTERRUPT_CORE1_BB_INT_MAP_REG BB interrupt configuration register 0x080C R/W
Espressif Systems
GoBack
INTERRUPT_CORE1_RTC_CORE_INTR_MAP_REG RTC_CORE interrupt configuration register 0x089C R/W
INTERRUPT_CORE1_RMT_INTR_MAP_REG RMT interrupt configuration register 0x08A0 R/W
Espressif Systems
GoBack
INTERRUPT_CORE1_DMA_OUT_CH4_INT_MAP_REG DMA_OUT_CH4 interrupt configuration register 0x092C R/W
INTERRUPT_CORE1_RSA_INT_MAP_REG RSA interrupt configuration register 0x0930 R/W
Espressif Systems
_INTR_MAP_REG
INTERRUPT_CORE1_CORE_0_DRAM0_PMS_MONITOR_VIOLATE core0_DRam0_pms_monitor_violatile interrupt configuration register
0x0958 R/W
_INTR_MAP_REG
INTERRUPT_CORE1_CORE_0_PIF_PMS_MONITOR_VIOLATE_ core0_PIF_pms_monitor_violatile interrupt configuration register
534
0x095C R/W
INTR_MAP_REG
INTERRUPT_CORE1_CORE_0_PIF_PMS_MONITOR_VIOLATE_ core0_PIF_pms_monitor_violatile_size interrupt configuration regis-
0x0960 R/W
SIZE_INTR_MAP_REG ter
INTERRUPT_CORE1_CORE_1_IRAM0_PMS_MONITOR_VIOLATE_ core1_IRam0_pms_monitor_violatile interrupt configuration register
0x0964 R/W
INTR_MAP_REG
INTERRUPT_CORE1_CORE_1_DRAM0_PMS_MONITOR_VIOLATE core1_DRam0_pms_monitor_violatile interrupt configuration register
0x0968 R/W
_INTR_MAP_REG
INTERRUPT_CORE1_CORE_1_PIF_PMS_MONITOR_VIOLATE_ core1_PIF_pms_monitor_violatile interrupt configuration register
ESP32-S3 TRM (Version 1.1)
0x096C R/W
INTR_MAP_REG
INTERRUPT_CORE1_CORE_1_PIF_PMS_MONITOR_VIOLATE_ core1_PIF_pms_monitor_violatile_size interrupt configuration regis-
0x0970 R/W
SIZE_INTR_MAP_REG ter
INTERRUPT_CORE1_BACKUP_PMS_VIOLATE_INTR_MAP_REG BACKUP_PMS_MONITOR_VIOLATILE interrupt configuration regis- 0x0974 R/W
ter
GoBack
INTERRUPT_CORE1_CACHE_CORE0_ACS_INT_MAP_REG CACHE_CORE0_ACS interrupt configuration register REG 0x0978 R/W
INTERRUPT_CORE1_CACHE_CORE1_ACS_INT_MAP_REG CACHE_CORE1_ACS interrupt configuration register REG 0x097C R/W
Espressif Systems
Version Register
INTERRUPT_CORE1_DATE_REG Version control register 0x0FFC R/W
535
ESP32-S3 TRM (Version 1.1)
GoBack
9 Interrupt Matrix (INTERRUPT) GoBack
9.5 Registers
9.5.1 CPU0 Interrupt Registers
AP
_M
_Y
CE
UR
SO
0_
RE
CO
T_
UP
d)
ve
RR
r
se
TE
(re
IN
31 5 4 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 Reset
31 0
0x000000 Reset
1
S_
TU
TA
_S
TR
IN
0_
RE
O
_C
PT
RU
R
TE
IN
31 0
0x000000 Reset
2
S_
U
AT
ST
R_
T
IN
0_
RE
O
_C
PT
RU
R
TE
IN
31 0
0x000000 Reset
31 0
0x000000 Reset
INTERRUPT_CORE0_INTR_STATUS_3 This register stores the status of the last 3 interrupt sources.
(RO)
N
_E
LK
_C
0
RE
O
T_C
UP
d)
ve
RR
er
TE
s
(re
IN
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
E
AT
_D
PT
RU
TER
IN
0_
RE
O
_C
PT
)
RU
ed
rv
R
se
TE
(re
IN
31 28 27 0
0 0 0 0 0x2012300 Reset
AP
M
Y_
_
CE
UR
SO
1_
RE
O
_C
T
UP
)
ed
RR
rv
se
TE
(re
IN
31 5 4 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 Reset
0
S_
TU
TA
_S
TR
IN
1_
RE
CO
T_
UP
RR
TE
IN
31 0
0x000000 Reset
1
S_
TU
TA
_S
TR
IN
1_
RE
O
_C
PT
RU
R
TE
IN
31 0
0x000000 Reset
2
S_
U
AT
ST
R_
T
IN
1_
RE
O
_C
PT
RU
R
TE
IN
31 0
0x000000 Reset
31 0
0x000000 Reset
INTERRUPT_CORE1_INTR_STATUS_3 This register stores the status of the last 3 interrupt sources.
(RO)
N
_E
LK
_C
1
RE
O
T_C
UP
d)
ve
RR
er
TE
s
(re
IN
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
E
AT
_D
PT
RU
TER
IN
1_
RE
O
_C
PT
)
RU
ed
rv
R
se
TE
(re
IN
31 28 27 0
0 0 0 0 0x2012300 Reset
10.1 Introduction
ESP32-S3 has an advanced Power Management Unit (PMU), which can flexibly power up different power
domains of the chip, to achieve the best balance among chip performance, power consumption, and wakeup
latency. To simplify power management for typical scenarios, ESP32-S3 has predefined four power modes, which
are preset configurations that power up different combinations of power domains. On top of that, the chip also
allows the users to independently power up any particular power domain to meet more complex requirements.
ESP32-S3 has integrated two Ultra-Low-Power coprocessors (ULP co-processors), which allow the chip to work
when most of the power domains are powered down, thus achieving extremely low-power consumption.
10.2 Features
ESP32-S3’s low-power management supports the following features:
• Four predefined power modes to simplify power management for typical scenarios
In this chapter, we first introduce the working process of ESP32-S3’s low-power management, then introduce
the predefined power modes of the chip, and at last, introduce the RTC boot of the chip.
• Power management unit: controls the power supply to three power domain categories
– Digital
– Analog
For a complete list of 10 power domains grouped in these three power domain categories, see Section
10.4.1.
• Power isolation unit: isolates different power domains, so powered up and powered down domains do not
affect each other.
• Timers:
– RTC timer: logs the status of the RTC main state machine in dedicated registers.
– ULP timer: wakes up the ULP co-processors at a predefined time. For details, please refer to Chapter
2 ULP Coprocessor (ULP-FSM, ULP-RISC-V).
– Touch sensor timer: wakes up the touch sensor at a predefined time. For details, please refer to
Chapter 39 On-Chip Sensors and Analog Signal Processing.
• 8 x 32-bit “always-on” retention registers: These registers are always powered up and are not affected by
any low-power modes, thus can be used for storing data that cannot be lost.
• 22 x “always-on” pins: These pins are always powered up and not affected by any low-power modes. They
can be used as wakeup sources when the chip is working in the low-power modes (for details, please refer
to Section 10.4.4), or can be used as regular GPIOs (for details, please refer to Chapter 6 IO MUX and GPIO
Matrix (GPIO, IO MUX)).
• RTC slow memory: 8 KB SRAM that works under RTC fast clock (rtc_fast_clk), which can be used as
extended memory or to store ULP co-processor directives and data.
• RTC fast memory: 8 KB SRAM that works under CPU clock (CPU_CLK), which can be used as extended
memory.
VDD_SPI
xpd_rtc_reg
xpd_sdio_reg
RTC
Peripherals
xpd_peri
xpd_dg_wrap
Wi-Fi MAC Wi-Fi Baseband
xpd_wireless
Wireless Mac and Baseband
Slow Memory
Power Management
Unit Fast Memory
RTC Digital
Note:
• For a complete list of all power domains and power domain categories, please check Section 10.4.1.
• RTC main state machine: generates power gating, clock gating, and reset signals.
• Power controllers: power up and power down different power domains, according to the power gating
signals from the main state machine.
• Sleep / wakeup controllers: send sleep or wakeup requests to the RTC main state machine.
• Protection Timer: controls the transition interval between main state machine states.
In ESP32-S3’s power management unit, the sleep / wakeup controllers send sleep or wakeup requests to the
RTC main state machine, which then generates power gating, clock gating, and reset signals. Then, the power
controller and clock controller power up and power down different power domains and clock sources, according
to the signals generated by the RTC main state machine, so that the chip enters or exits the low-power modes.
The main workflow is shown in Figure 10-2.
Clock Protection
Controller
Power Controller …... Power Controller
Timer
done
state
state
state
main
main
main
state
main
wait
RTC Main State Machine
sleep accept
coprocessor
touch done
wakeup
wakeup
done
CPU wakeup
Sleep Controller ULP Timer ULP Coprocessor Touch Timer Touch Controller
trig trig
sleep reject
sleep EN
wakeup
wakeup
Wakeup Controller
Note:
1. For a complete list of power domains, please refer to Section 10.4.1.
2. For a complete list of all the available wakeup sources, please refer to Table 10-5.
ESP32-S3
memory, and wireless circuits in the digital domain.
Selection Signal
PMU
RC_SLOW_CLK
0
XTAL32K_CLK
RTC_SLOW_CLK
1 RTC Timer
RC_FAST_DIV_CLK
2
ULP Timer
RTC Slow Clock
ULP Coprocessor
Selection Signal
This diagram applies to ESP32-S3 and ESP
XTAL_DIV_CLK
Sensor Controller
0
RTC_FAST_CLK
RC_FAST_CLK
div n 1 RTC Slow Memory
RTC Clock
Figure 103. RTC Clocks
Selection Signals
XTAL32K_CLK
RC_FAST_CLK
div n
LP_MUX
LOW_POWER_CLK
Wireless
RTC_SLOW_CLK
XTAL_CLK
ower Clock
For more detailed description about clocks, please refer to 7 Reset and Clock.
10.3.3 Timers
ESP32-S3’s low-power management uses 3 timers:
• RTC timer
• ULP timer
• Touch timer
This section only introduces the RTC timer. For detailed description of ULP timer, please refer to Chapters 2 ULP
Coprocessor (ULP-FSM, ULP-RISC-V). For detailed description of touch timer, please refer to Chapters 39
On-Chip Sensors and Analog Signal Processing.
The readable 48-bit RTC timer is a real-time counter (using RTC slow clock) that can be configured to log the
time when one of the following events happens. For details, see Table 10-2.
The RTC timer updates two groups of registers upon any new trigger. The first group logs the time of the current
trigger, and the other logs the previous trigger. Detailed information about these two register groups is shown
below:
• Register group 0: logs the status of RTC timer at the current trigger.
– RTC_CNTL_RTC_TIME_HIGH0_REG
– RTC_CNTL_RTC_TIME_LOW0_REG
• Register group 1: logs the status of RTC timer at the previous trigger.
– RTC_CNTL_RTC_TIME_HIGH1_REG
– RTC_CNTL_RTC_TIME_LOW1_REG
On a new trigger, information on previous trigger is moved from register group 0 to register group 1 (and the
original trigger logged in register group 1 is overwritten), and this new trigger is logged in register group 0.
Therefore, only the last two triggers can be logged at any time.
It should be noted that any reset / sleep other than power-up reset will not stop or reset the RTC timer.
Also, the RTC timer can be used as a wakeup source. For details, see Section 10.4.4.
Note:
For a full list of power domains, please refer to Section 10.4.1.
ESP32-S3’s built-in digital voltage regulator converts the external power supply (typically 3.3 V) to 1.1 V for digital
power domains. This regulator is controlled by xpd_dig_reg (see details in Figure 10-1). For the architecture of
the ESP32-S3 digital voltage regulator, see Figure 10-5.
ESP32-S3’s built-in low-power voltage regulator converts the external power supply (typically 3.3 V) to 1.1 V for
RTC power domains. When the pin CHIP_PU is at a high level, the RTC domain is always-on. The low power
voltage regulator is off when chip enters Light-sleep and Deep-sleep modes. In this case, the RTC domain is
powered by an ultra low-power built-in power supply (This power supply cannot be turned off). For the
architecture of the ESP32-S3 low-power voltage regulator, see Figure 10-1.
VDD3P3_RTC
VREF +
ESP32-S3
RTC
ESP32-S3’s built-in flash voltage regulator can supply a voltage of 3.3 V or 1.8 V to other components outside of
digital and RTC, such as flash. For the architecture of the ESP32-S3 flash voltage regulator, see Figure
10-7.
VDD3P3_RTC
tieh
VREF +
RTC Regulator -
VDD_SPI Regulator
Output
1. Configure XPD_SDIO_REG to select power source to components outside of the digital and RTC:
• 0: the voltage regulator outputs high-impedance. In this case, the voltage is provided by the external
power supply.
• 1: the voltage regulator shorts pin VDD_SPI to pin VDD3P3_RTC, and outputs a voltage of 3.3 V,
which is the voltage of pin VDD3P3_RTC.
• 0: the voltage regulator outputs the reference voltage VREF, which is typically 1.8V.
The brownout detector checks the voltage of pins VDD3P3, VDD3P3_RTC and VDD3P3_CPU. If the voltage of
these pins drops below the predefined threshold (2.7 V by default), the detector would trigger a signal to shut
down some power-consuming blocks (such as LNA, PA, etc.) to allow extra time for the digital to save and
transfer important data.
The brownout detector has ultra-low power consumption and remains enabled whenever the chip is powered up.
For the architecture of the ESP32-S3 brownout detector, see Figure 10-8.
VREF +
RTC_CNTL_RTC_BROWN_OUT_DET indicates the output level of brown-out detector. This register is low level
by default, and outputs high level when the voltage of the detected pin drops below the predefined
threshold.
When a brown-out signal is detected, the brownout detector can handle it in one of the two methods described
below:
• mode0: triggers an interrupt when the counter counts to the thresholds pre-defined in int comparer and rst
comparer, then resets the chip based on the rst_sel configuration. This method can be enabled by setting
ESP32-S3
the bod_mode0_en signal.
bod_mode0_int
bod_mode0_en Int
Comparer
Brown-out
Counter
Chip Reset
Rst
Brown-out bod_mode0_rst_sel System Reset
Comparer
Brown-out Detected
bod_mode0_rst_en
Detector
System Reset
1
0
&&
bod_mode1_rst_en 1
bod_mode1_sel
• bod_mode0_en: RTC_CNTL_BROWN_OUT_ENA
• bod_mode0_rst_en: RTC_CNTL_BROWN_OUT_RST_ENA
• bod_mode1_rst_en: RTC_CNTL_BROWN_OUT_ANA_RST_EN
• RTC
– RTC peripherals, including RTC GPIO, RTC I2C, Temperature Sensor, Touch Sensor, RTC ADC
Controller, and ULP Coprocessor
• Digital
– Digital core
– CPU
– PD peripherals, including SPI2, GDMA, SHA, RSA, AES, HMAC, DS, and Secure Boot
• Analog
– RF circuits
Active
Monitor Sleep
Under different RTC states, different power domains are powered up or down by default, but can also be
force-powered-up (FPU) or force-powered-down (FPD) individually based on actual requirements. For details,
please refer to Table 10-3.
Power Domain
Wireless
Power Mode RTC Digital PD FOSC XTAL RF
PMU CPU Digital PLL
Peripherals System Peripherals _CLK _CLK Circuits
Circuits
Active ON ON ON ON ON ON ON ON ON ON
Modem-sleep ON ON ON ON ON ON* ON ON ON OFF
Light-sleep ON ON ON OFF ON OFF* OFF OFF OFF OFF
Deep-sleep ON ON OFF OFF ON OFF OFF OFF OFF OFF
*
Configurable.
By default, ESP32-S3 first enters the Active mode after system resets, then enters different low-power modes
(including Modem-sleep, Light-sleep, and Deep-sleep) to save power after the CPU stalls for a specific time (For
example, when CPU is waiting to be wakened up by an external event). From modes Active to Deep-sleep, the
number of available functionalities1 and power consumption2 decreases and wakeup latency increases. Also, the
supported wakeup sources for different power modes are different3 . Users can choose a power mode based on
their requirements of performance, power consumption, wakeup latency, and available wakeup sources.
Note:
2. For details on power consumption, please refer to the Current Consumption Characteristics in ESP32-S3 Datasheet.
3. For details on the supported wakeup sources, please refer to Section 10.4.4.
Note:
1. EXT0 can only wake up the chip from Light-sleep / Deep-sleep modes. If RTC_CNTL_EXT_WAKEUP0_LV is 1,
it’s triggered when the pin level is high. Otherwise, it’s triggered when the pin level is low. Users can configure
RTCIO_EXT_WAKEUP0_SEL to select an RTC pin as a wakeup source.
2. EXT1 is especially designed to wake up the chip from any sleep modes, and can be triggered by a combina-
tion of pins. Users should define the combination of wakeup sources by configuring RTC_CNTL_EXT_WAKEUP1
_SEL[17:0] according to the bitmap of selected wakeup source. When RTC_CNTL_EXT_WAKEUP1_LV == 1, the
chip is waken up if any pin in the combination is high level. When RTC_CNTL_EXT_WAKEUP1_LV == 0, the chip
is only waken up if all pins in the combination is low level.
3. In Deep-sleep mode, only the RTC GPIOs (not regular GPIOs) can work as a wakeup source.
4. To wake up the chip with a Wi-Fi source, the chip switches between the Active, Modem-sleep, and Light-sleep
modes. The CPU and RF modules are woken up at predetermined intervals to keep Wi-Fi connections active.
5. A wakeup is triggered when the number of RX pulses received exceeds the setting in the threshold register.
6. A wakeup is triggered when any touch event is detected by the touch sensor.
8. When the 32 kHz crystal is working as RTC slow clock, a wakeup is triggered upon any detection of any crystal
stops by the 32 kHz watchdog timer.
9. A wakeup is triggered when the ULP co-processor starts capturing exceptions (e.g., stack overflow).
All the wakeup sources specified in Table 10-5 can also be configured as the causes to reject sleep.
Users can configure the reject to sleep option via the following registers.
ESP32-S3’s retention DMA stores CPU information to the Internal SRAM Block2 to Block8 before CPU enters
into sleep, and restore such information from Internal SRAM to CPU after CPU wakes up from sleep, thus
enabling the CPU to resume execution from the previous breakpoint.
• Retention DMA operates on date of 128 bits, and only supports address alignment of four words.
• Retention DMA’s link list is specifically designed that it can be used to execute both write and read
transactions. The configuration of Retention DMA is similar to that of GDMA:
1. First allocate enough memory in SRAM before CPU enters sleep to store 432 words*: CPU registers
(428 words) and configuration information (4 words).
2. Then configure the link list according to the memory allocated in the first step. See details in Chapter 3
GDMA Controller (GDMA).
Note:
* Note that if the memory allocated is smaller than 432 words, then chip can only enter the Light-sleep mode and
cannot further power down CPU.
After configuration, users can enable the Retention function by configuring the RTC_CNTL_RETENTION_EN field
in Register RTC_CNTL_RETENTION_CTRL_REG to:
• Use Retention DMA to store CPU information before the chip enters sleep
• Restore information from Retention DMA to CPU after CPU wakes up.
1. Set RTC_CNTL_PROCPU_STAT_VECTOR_SEL to 0.
3. After the CPU is powered up, the reset vector starts resetting from 0x50000000 instead of 0x40000400,
which does not involve any SPI booting. The codes stored in RTC slow memory starts running immediately
after the CPU reset. The code stored in the RTC slow memory only needs to be partially initialized in a C
environment.
1. Set RTC_CNTL_PROCPU_STAT_VECTOR_SEL to 1.
2. Calculate CRC for the RTC fast memory, and save the result in RTC_CNTL_RTC_STORE7_REG[31:0].
5. ROM unpacking and some of the initialization starts after the CPU is powered up. After that, the CRC for
the RTC fast memory will be calculated again. If the result matches with register
RTC_CNTL_RTC_STORE7_REG[31:0], the CPU jumps to the entry address.
Wake up
Running in ROM
reset_vector@ reset_vector@
0x40000400 0x50000000
Initialization
Yes No
CRC right
Jump to entry
point in SPI Boot
RTC fast mem
Run code in
CPU RAM
Yes
Return?
Running in CPU RAM
10.8 Registers
The addresses in this section are relative to low-power management base address provided in Table 4-3 in
Chapter 4 System and Memory.
RS ST
C0
E_ OR
C0
T
RT NT SW C_ RC CE U
W RO RC PU D
U_
C L_ I2 FO R _P
C_ L_S _P FO E_ _P
U_
RC _N
PC U_ D
C_ NT B_ C_ _FO CE
CP
C NT B _I C U
C NT B _I _F D
CP
FO E
_S PU ST
ST
TL _AP CP E_P
RT _C L_B PLL OR E_P
RT _C L_B PLL 2C E_P
P_ RC
RT _C L_B _I2 2C OR
O
R
PP
RT _C L_B PLL CE U
RT _C L_B PLL OR D
_R
PR
RA _FO
C NT B OR _P
C NT B _F _P
G RA ST
C NT B _F C
_A
RT _C L_B _F CE
L_
_D W R
LL
_W P
TL G_ YS_
AL
C NT TL OR
TA
T
RT _C L_X _F
CN L_D _S
_S
C NT TL
C_ NT W
W
RT C L_S
_S
_S
RT _C L_X
TL
C_ NT
C NT
d)
CN
CN
ve
RT _C
R T _C
er
C_
C
C
s
RT
RT
RT
(re
31 30 29 28 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_DG_WRAP_FORCE_RST Set this bit to force reset the digital system in deep-sleep.
(R/W)
RTC_CNTL_DG_WRAP_FORCE_NORST Set this bit to disable force reset to digital system in deep-
sleep. (R/W)
RTC_CNTL_SW_SYS_RST Set this bit to reset the system via SW. (WO)
O
L _L
VA
P_
L
_S
TL
CN
C_
RT
31 0
0x000000 Reset
RTC_CNTL_SLP_VAL_LO Sets the lower 32 bits of the trigger threshold for the RTC timer. (R/W)
I
N_
_H
AI
L
VA
_M
P_
TC
SL
_R
L_
TL
T
)
ed
CN
CN
rv
C_
C_
se
RT
RT
(re
31 17 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x00 Reset
RTC_CNTL_SLP_VAL_HI Sets the higher 16 bits of the trigger threshold for the RTC timer. (R/W)
TE
LL
DA
ER TL ST
TA
YS FF
UP
IM _X _R
_S
_S _O
_T R S
E_
Y
IM
TL IM _S
_T
CN L_T ER
E
C d) TC
C_ T IM
RT rve L_R
RT _C L_T
se NT
C NT
d)
N
ve
(re _C
R T _C
er
C
s
RT
(re
31 30 29 28 27 26 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_TIMER_SYS_STALL Selects the triggering condition for the RTC timer. See details in
Table 10-2. (R/W)
RTC_CNTL_TIMER_XTL_OFF Selects the triggering condition for the RTC timer. See details in Table
10-2. (R/W)
RTC_CNTL_TIMER_SYS_RST Selects the triggering condition for the RTC timer. See details in Table
10-2. (R/W)
RTC_CNTL_RTC_TIME_UPDATE Selects the triggering condition for the RTC timer. See details in
Table 10-2. (WO)
31 0
0x000000 Reset
H
IG
_H
0
UE
AL
_V
ER
IM
_T
TC
_R
TL
d)
CN
ve
er
C_
s
RT
(re
31 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x00 Reset
R
CL
E_
S
NT U
L
SE
_I _CA
E_
PU T
D
_C EC
IN
ID
E_
W EJ
CT P
BR
DI A T
_A U
IV
_S _R
_S _W EC
O KE
C_
CN L_S _R N
TC LP
C_ NT LP _E
TL LP EJ
RT
_R _S
RT _C L_S EEP
B2
TL TC
P
C NT L
CN L_R
RT C L_S
_A
TL
C_ NT
C_ NT
)
)
ed
ed
CN
RT _C
RT _C
rv
rv
C_
se
se
C
C
RT
RT
RT
(re
(re
31 30 29 28 27 23 22 21 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_APB2RTC_BRIDGE_SEL 1: APB to RTC using bridge, 0: APB to RTC using sync (R/W)
T
AI
EN
T
W
AI
AI
L_
_
T
W
_W
LL
AI
L
F_
TA
TA
_W
UF
BU
_S
_S
_B
M
L_
PU
U
K8
TL
CP
PL
_C
_C
_X
_
L_
TL
TL
TL
TL
T
CN
CN
CN
CN
CN
C_
C_
C_
C_
C_
RT
RT
RT
RT
RT
31 24 23 14 13 6 5 1 0
40 80 0x10 1 1 Reset
RTC_CNTL_CPU_STALL_WAIT Sets the CPU stall waiting cycle (using the RTC fast clock). (R/W)
RTC_CNTL_CK8M_WAIT Sets the FOSC waiting cycle (using the RTC slow clock). (R/W)
RTC_CNTL_XTL_BUF_WAIT Sets the XTAL waiting cycle (using the RTC slow clock). (R/W)
RTC_CNTL_PLL_BUF_WAIT Sets the PLL waiting cycle (using the RTC slow clock). (R/W)
AR
_O
ST
8M
H_
UC
CK
O
E_
_T
M
CP
TI
_
LP
IN
_M
_U
TL
TL
)
ed
CN
CN
rv
C_
C_
se
RT
RT
(re
31 24 23 15 14 0
RTC_CNTL_ULPCP_TOUCH_START_WAIT Sets the waiting cycle (using the RTC slow clock) before
the ULP co-processor starts to work. (R/W)
RTC_CNTL_MIN_TIME_CK8M_OFF Sets the minimal cycle for FOSC clock (using the RTC slow
clock) when powered down. (R/W)
AL
_V
LP
_S
IN
_M
TL
d)
)
ed
CN
ve
rv
er
C_
se
s
RT
(re
(re
31 16 15 8 7 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x80 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_MIN_SLP_VAL Sets the minimal sleep cycles (using the RTC slow clock). (R/W)
RC _PU
PD
E_
FO E
R_ RC
O O
_P _F
_R ET _EN
ET OR
ES _P
2C ES T
_I R S
TL 2C_ H_R
CN L_I TC
C_ NT LI
RT C L_G
C_ NT
)
d)
ed
e
RT _C
rv
rv
se
se
C
RT
(re
(re
31 21 20 19 18 17 0
0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_GLITCH_RST_EN Set this bit to enable a reset when the system detects a glitch. (R/W)
C NT E _F CD A RO U R
C NT E PU CD AG PP U R
RT _C L_R SET _O _H _P CP _CL
CN L_P ET LA PR PU _R ET
RT _C L_R PC _O JT _A CP CL
_A C LA AP PU LR ET
C_ NT ES _F G_ PC ON ES
C NT P PU G_ AG RO U_
TL RO _F G_ OC _C ES
R_ EL
C NT E _F G_ AL ON U
L
CP _S PR PU LR
SE
RT _C L_R SET LA _H LT_ CP
RT _C L_R SET LA AP T_ _R
RT _C L_A OC LA JT _P CP
TO _S
RT _C L_R SET LA JT _M K
RT _C L_P SET LA JT _A K
PP PU G_ PC _C
U
C NT E _F G_ T AS
C NT R _F G_ AG PP
U
EC R
C NT E _F G_ AG AS
CP
ST _V PU
CP
_V TO
RT _C L_R SET LA ESE _M
RO
U_ TAT OC
AT EC
PP
C NT E _F R ET
_A
_P
RT _C L_R SET P_D ES
SE
SE
C T E P R
RT _CN L_R C_A O_D
AU
AU
_C
_C
C NT T R
RT _C L_R C_P
ET
ET
ES
ES
C NT T
RT C L_R
_R
_R
TL
TL
C_ NT
d)
CN
CN
ve
R T _C
er
C_
C_
C
s
RT
RT
RT
(re
31 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 6 5 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 Reset
RTC_CNTL_RESET_FLAG_JTAG_PROCPU_CLR Set this bit to clear CPU0 JTAG reset flag. (WO)
RTC_CNTL_RESET_FLAG_JTAG_APPCPU_CLR Set this bit to clear CPU1 JTAG reset flag. (WO)
A
EN
P_
EU
AK
_ W
TC
R
L_
NT
)
ed
C
rv
C_
se
RT
(re
31 15 14 0
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_RTC_WAKEUP_ENA Enables the wakeup bitmap. See details in Table 10-5. (R/W)
NA
_E
NT
_I
NE
O
A
_D
EN
RT _C L_S C_W UC _IN E_IN T_E NA
RT C _R _C A _E D_ EN NA
RT _C L_R C_S L3 TR OU NA OP
T_
C_ NT DI D H_ T_E T_ NA
A
IN
C NT T O P N IN _E
C_ NT TC AR INT EA T_ _E
A
C NT T TA U_ E _E O
EN
C_ NT TC O DC NA INT A
C NT T L H_ TI E_ A
CN L_S O_ T_ SC N EN
E_
RT _C L_R C_X CP TIM INT H_L
LP EJ IN NA ON
C NT T A _ _E NA
C NT T O N R_ NA
C NT T O H_ T _E
C NT T O H_ C T_
C NT T W 2K AP T_
C NT T O H_ T_ C
A
TL LP IDL INT AN A
IN A
RT _C L_R C_M RA INT NA
RT _C L_R C_C UC DE OA
_S _R E_ _E _D
EN
RT C _R _S NS INT _E
RT _C L_R C_T OW ME _E
RT _C L_R C_B IN_ 1_ NA
N
AK T_ NA
P_ _E
C_ NT TC SE U_ INT
C NT T R TI INT
C NT T O H_ PR
T_
C NT T A DC _E
EU INT
_W EC T_E
RT _C L_R C_T ITC AP
R T C _R _T P _ 2
C NT T L H_
RT _C L_R C_G UC
C
C NT T O
RT _C L_R C_T
C NT T
RT C L_R
L
L
L
C_ NT
d)
ve
RT _C
er
C
s
RT
(re
31 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_SLP_WAKEUP_INT_ENA Enables interrupt when the chip wakes up from sleep. (R/W)
AW
_R
NT
_I
NE
W
O
_D
RA
RT _C L_S C_W UC _IN E_IN T_R AW
RT C _R _C A _R D_ RA AW
RT _C L_R C_S L3 TR OU AW OP
T_
C_ NT DI D H_ T_R T_ AW
W
TL LP IDL INT AN W W
C NT T O P N IN _R
C_ NT TC AR INT EA T_ _R
IN
C_ NT TC O DC AW INT W
C NT T TA U_ E _R O
RA
C NT T L H_ TI E_ W
RT _C L_R C_T UC INA _IN AW
CN L_S O_ T_ SC A RA
E_
RT _C L_R C_X CP TIM INT H_L
LP EJ IN AW ON
C NT T A _ _R AW
C NT T O N R_ AW
C NT T O H_ T _R
C NT T O H_ C T_
W
C NT T W 2K AP T_
C NT T O H_ T_ C
IN W
RT _C L_R C_M RA INT AW
RT _C L_R C_C UC DE OA
_S _R E_ _R _D
RA
RT C _R _S NS INT _R
RT _C L_R C_T OW ME _R
A
AK T_ AW
P_ _R
C_ NT TC SE U_ INT
C T T R TI INT
C NT T O H_ PR
T_
C NT T A DC _R
_W EC T_R
EU INT
RT _C L_R C_T ITC AP
R T C _R _T P _ 2
C NT T L H_
RT _C L_R C_G UC
C
C NT T O
RT _C L_R C_T
C NT T
RT C L_R
L
L
L
C_ NT
d)
ve
R T _C
er
C
s
RT
(re
31 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_SLP_WAKEUP_INT_RAW Stores the raw interrupt triggered when the chip wakes up
from sleep. (RO)
RTC_CNTL_SLP_REJECT_INT_RAW Stores the raw interrupt triggered when the chip rejects to go
to sleep. (RO)
RTC_CNTL_SDIO_IDLE_INT_RAW Stores the raw interrupt triggered when the SDIO idles. (RO)
T
_S
NT
_I
NE
O
_D
ST
RT _C L_R C_S L3 TR OU T OP
T_
RT _C L_S C_W UC _IN E_IN T_S T
RT C _R _C A _S D_ ST T
C NT T O P N IN _S
IN
C_ NT TC AR INT EA T_ _S
C NT T TA U_ E _S O
C_ NT DI D H_ T_S T_ T
ST
CN L_S O_ T_ SC T ST
E_
RT _C L_R C_X CP TIM INT H_L
LP EJ IN T ON
C_ NT TC O DC T INT
C NT T O H_ T _S
C NT T O H_ C T_
C NT T L H_ TI E_
C NT T W 2K AP T_
C NT T O H_ T_ C
C NT T A _ _S T
C NT T O N R_ T
RT _C L_R C_C UC DE OA
_S _R E_ _S _D
RT C _R _S NS INT _S
RT _C L_R C_T OW ME _S
ST
T
RT _C L_R C_M RA INT T
RT _C L_R C_B IN_ 1_ T
P_ _S
TL LP IDL INT AN
C_ NT TC SE U_ INT
C NT T R TI INT
C NT T O H_ PR
T_
C NT T A DC _S
AK T_ T
_W EC T_S
EU INT
IN
RT _C L_R C_T ITC AP
R T C _R _T P _ 2
C NT T L H_
RT _C L_R C_G UC
C
C NT T O
RT _C L_R C_T
C NT T
RT C L_R
L
L
L
C_ NT
d)
ve
R T _C
er
C
s
RT
(re
31 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_SLP_WAKEUP_INT_ST Stores the status of the interrupt triggered when the chip wakes
up from sleep. (RO)
RTC_CNTL_SLP_REJECT_INT_ST Stores the status of the interrupt triggered when the chip rejects
to go to sleep. (RO)
RTC_CNTL_SDIO_IDLE_INT_ST Stores the status of the interrupt triggered when the SDIO idles.
(RO)
RTC_CNTL_RTC_TOUCH_DONE_INT_ST Stores the status of the interrupt triggered upon the com-
pletion of a single touch. (RO)
RTC_CNTL_RTC_MAIN_TIMER_INT_ST Stores the status of the RTC main timer interrupt. (RO)
RTC_CNTL_RTC_COCPU_TRAP_INT_ST Stores the status of the interrupt triggered when the ULP-
RISCV is trapped. (RO)
LR
_C
NT
_I
NE
O
R
_D
CL
RT _C L_S C_W UC _IN E_IN T_C LR
RT C _R _C A _C D_ CL LR
RT _C L_R C_S L3 TR OU LR OP
T_
C_ NT DI D H_ T_C T_ LR
R
C NT T O P N IN _C
C_ NT TC AR INT EA T_ _C
IN
C NT T TA U_ E _C O
R
C_ NT TC O DC LR INT R
CL
C NT T L H_ TI E_ R
CN L_S O_ T_ SC LR CL
E_
RT _C L_R C_X CP TIM INT H_L
LP EJ IN LR ON
C NT T O H_ T _C
C NT T A _ _C LR
C NT T O N R_ LR
C NT T O H_ C T_
C NT T W 2K AP T_
C T T O H_ T_ C
R
IN R
RT _C L_R C_M RA INT LR
RT _CN L_R C_C UC DE OA
_S _R E_ _C _D
RT C _R _S NS INT _C
RT _C L_R C_T OW ME _C
CL
RT _C L_R C_B IN_ 1_ LR
L
AK T_ LR
P_ _C
TL LP IDL INT AN
C_ NT TC SE U_ INT
C NT T R TI INT
C NT T O H_ PR
T_
C NT T A DC _C
_W EC T_C
EU INT
RT _C L_R C_T ITC AP
R T C _R _T P _ 2
C NT T L H_
RT _C L_R C_G UC
C
C NT T O
RT _C L_R C_T
C NT T
RT _C L_R
L
L
L
C NT
)
ed
RT _C
rv
se
C
RT
(re
31 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_SLP_WAKEUP_INT_CLR Clears the interrupt triggered when the chip wakes up from
sleep. (WO)
RTC_CNTL_SDIO_IDLE_INT_CLR Clears the interrupt triggered when the SDIO idles. (WO)
31 0
0 Reset
1
CH
AT
CR
_S
TC
R
T L_
CN
C_
RT
31 0
0 Reset
H2
TC
C RA
_S
TC
_R
TL
CN
C_
RT
31 0
0 Reset
31 0
0 Reset
_X L3 _W CL CK T
TA 2K DT K UP
EL
C_ NT TA 2K UT RE RN
TL TA 2K XT_ BA AR
N O
_S
L3 _W _R _FO
DT CLK T
RT _C L_X L3 _A O_ CE
RT _C L_X L3 _A O_ TU
_E _F
CN L_X L3 _E O_ ST
_W T_ SE
RT _C L_X L3 _A _FO K
O
C NT TA 2K UT RE
C NT TA 2K UT R
C NT TA 2K PD 32
PI
2K D E
TR N
TE
V
_G
RT _C L_X L3 _X L_
2K
RT _C L_X L3 IT_X 2K
_C _E
_L
K
K
2K
TA
32
C NT TA 2K TA
2K
32
_3
C NT TA IN _3
XT TR
_S
_3
L_
AL
RT _C L_X CK TAL
L_
L3
_E _C
AL
DT
TA
TA
XT
TA
TL XT
X
T
_W
_X
_X
S_
_
_X
_X
_X _E
RT C L_E F
M
C_ T BU
AC
RE
TC
TC
PD
TL TL
N
_D
_D
_D
RT _C L_D
_R
_R
CN L_X
_X
TL
TL
TL
TL
TL
TL
C_ NT
C NT
C T
)
ed
CN
CN
CN
CN
CN
CN
N
N
R T _C
RT C
rv
C_
C_
C_
C_
C_
C_
C_
se
C
RT
RT
RT
RT
RT
RT
RT
RT
(re
31 30 29 24 23 22 20 19 17 16 15 13 12 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0x0 3 0 3 3 0 0 1 0 0 0 0 0 0 0 Reset
RTC_CNTL_XTAL32K_WDT_EN Set this bit to enable the 32 kHz crystal watchdog. (R/W)
RTC_CNTL_XTAL32K_WDT_CLK_FO Set this bit to FPU the 32 kHz crystal watchdog clock. (R/W)
RTC_CNTL_XTAL32K_WDT_RESET Set this bit to reset the 32 kHz crystal watchdog by SW. (R/W)
RTC_CNTL_XTAL32K_EXT_CLK_FO Set this bit to FPU the external clock of 32 kHz crystal. (R/W)
RTC_CNTL_XTAL32K_AUTO_BACKUP Set this bit to switch to the backup clock when the 32 kHz
crystal is dead. (R/W)
RTC_CNTL_XTAL32K_AUTO_RESTART Set this bit to restart the 32 kHz crystal automatically when
the 32 kHz crystal is dead. (R/W)
RTC_CNTL_XTAL32K_AUTO_RETURN Set this bit to switch back to 32 kHz crystal when the 32
kHz crystal is restarted. (R/W)
RTC_CNTL_XTAL32K_XPD_FORCE Set 1 to allow the software to FPD the 32 kHz crystal. Set 0 to
allow the FSM to FPD the 32 kHz crystal. (R/W) (R/W)
RTC_CNTL_ENCKINIT_XTAL_32K Applies an internal clock to help the 32 kHz crystal to start. (R/W)
RTC_CNTL_XTL_EXT_CTR_LV 0: powers down XTAL at high level 1: powers down XTAL at low
level (R/W)
RTC_CNTL_XTL_EXT_CTR_EN Enables the GPIO to power down the crystal oscillator. (R/W)
d)
RT _CN
ve
er
C
s
RT
(re
31 30 29 28 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_GPIO_WAKEUP_FILTER Set this bit to enable the GPIO wakeup event filter. (R/W)
A
EN
EN
EC EN
T_
T_
EJ T_
C
_R EC
JE
RE
LP EJ
_S _R
P_
HT P
EE
IG SL
SL
_L P_
_
TC
TL EE
CN L_D
_R
TL
C_ NT
)
ed
CN
RT _C
rv
C_
se
C
RT
RT
(re
31 30 29 12 11 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
IN G
AT TIN
IN G
G
AT IN
_G A
G
RC PU E G
G AT
O E_ RC NO
AT G
E_ OG
G
G TIN
_F C O _
IN
RC N
M R _F CE
_ 8M EN EN
NO A
O E_
_C M OB _F L
LK OR D
E_ OG
RT C L_X L_ K_ SEL
K8 _FO AL OR
TL K8 GL AL SE
NB K K_ 6_
_C _F VL
_F C
PD
C_ L_E _C L32 25
RC E_N
CN L_C L_ OB C_
SE LK _
_
C L_ _X 8M N
M IV
L
) FU _C EL
E_
RT _C L_X T_ RTC
RT NT ENB TA _D
C_ NT IG LK _E
EQ
SE
C_ T A L T
_C CK8 _D
FO C
ed E E _S
R
RT _C L_D _C 8M
_
L_ OR
FR
_
rv L_ S IV
RT C _F CLK
DI
DI
C_ NT TA CL
C T IG LK
_D
se T FU _D
TA _F
G
_
RT CN L_D _C
M
_X M
(re _C L_E 8M
_
NA
K8
TL K8
K8
K8
S
C_ NT IG
C NT K
T
A
_C
CN L_C
_C
R T C _C
R T C _D
C_ L_A
TL
TL
L
T
C_ NT
C T
C_ NT
C_ NT
RT NT
C_ NT
C_ ) d
CN
CN
CN
N
RT rve
RT C
RT C
RT C
RT C
C_
C_
C_
C_
C_
se
RT
RT
RT
RT
RT
(re
31 30 29 28 27 26 25 24 17 16 15 14 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 1 0 0 0 172 0 0 3 0 0 1 0 0 0 1 1 1 0 0 Reset
RTC_CNTL_CK8M_DIV Set the CK8M_D256_OUT divider. 00: divided by 128 01: divided by 256
10: divided by 512 11: divided by 1024. (R/W)
RTC_CNTL_DIG_XTAL32K_EN Set this bit to enable CK_XTAL_32K clock for the digital core. (R/W)
RTC_CNTL_DIG_CLK8M_D256_EN Set this bit to enable CK8M_D256_OUT clock for the digital
core. (R/W)
RTC_CNTL_DIG_CLK8M_EN Set this bit to enable 8 MHz clock for the digital core. (R/W)
RTC_CNTL_XTAL_FORCE_NOGATING Set this bit to force no gating to crystal during sleep (R/W)
RTC_CNTL_CK8M_FORCE_NOGATING Set this bit to disable force gating to 8 MHz crystal during
sleep. (R/W)
RTC_CNTL_FAST_CLK_RTC_SEL Set this bit to select the RTC fast clock. 0: XTAL_DIV_CLK, 1:
RC_FAST_CLK div n. (R/W)
RTC_CNTL_ANA_CLK_RTC_SEL Set this bit to select the RTC slow clock. 0: RC_SLOW_CLK 1:
XTAL32K_CLK 2: RC_FAST_DIV_CLK. (R/W)
IV
DI
_D
K_
LK
CL
_C
A_
NA
N
_A
_A
TC
TC
_R
_R
TL
TL
)
)
ed
ed
CN
CN
rv
rv
C_
C_
se
se
RT
RT
(re
(re
31 30 23 22 21 0
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
EN
EG
D_
EG E
_P
_R
_R C
_S _ H
O R
O
TL DIO TIE
DI FO
DI
_S
CN L_S O_
PD
C_ NT DI
RT _C L_S
X
T L_
C NT
)
)
ed
ed
CN
RT _C
rv
rv
C_
se
se
C
RT
RT
(re
(re
31 30 24 23 22 21 20 0
0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_SDIO_REG_PD_EN Set this bit to power down SDIO_REG when chip is in light sleep
and deep sleep. This field is only valid when RTC_CNTL_SDIO_FORCE = 0. (R/W)
RTC_CNTL_SDIO_FORCE Set this bit to allow software t1: use SW option to control SDIO_REG.
Clear this bit to allow the state machine to control SDIO_REG. (R/W)
RTC_CNTL_SDIO_TIEH Configure the SDIO_TIEH via software. This field is only valid when
RTC_CNTL_SDIO_FORCE = 1. (R/W)
RC PU D
O _FO FOR E_P
O E_ P
_F C E_
PD
BO ST R_ RC
E_
_D O O FO
TC BO LAT R_
N
_E
_R _D U O
TL TC EG LAT
AL
_C
P
CN L_R _R U
CA
C_ NT TC EG
EG
_D
RT _C L_R C_R
_R
CK
IG
C NT T
_D
RT _C L_R
_S
TL
TL
C NT
d)
)
ed
ed
CN
CN
e
RT C
rv
rv
rv
C_
C_
C_
se
se
se
RT
RT
RT
(re
(re
(re
31 30 29 28 27 22 21 14 13 8 7 6 0
1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_DIG_REG_CAL_EN Set this bit to enable calibration for the digital regulator. (R/W)
RTC_CNTL_RTC_REGULATOR_FORCE_PD Set this bit to FPD the RTC_REG, which means de-
creasing its voltage to 0.8 V or lower. (R/W)
C NT T AS E _F CE PU
se NT T AS E FO _ PD
se d) T O E FO E_ U
FO CE _F CE PU
E_ OIS _ PD
U
(re rve L_R C_F TM M_ RC CP
RT _C L_R C_F TM EM OR _L
(re _C L_R C_F TM M_ OLW _L
IS O CP
C_ R M R L
RC _N OLW _L
C NT T AS M _F CE
LD
O
RT _C L_R C_F OW EM OR
_H
C NT T L M _F
_R _F EN CE
O
RT _C L_R C_S OW EM
RC PU
PD
TL TC D_ OR
O _
E_
C NT T L M
E
CN L_R _P _F
RT _C L_R C_S OW
_F C
TC OR
C_ NT TC AD
C NT T L
RT _C L_R C_P
RT _C L_R C_S
C NT T
C NT T
RT _C L_R
RT _C L_R
C NT
C NT
d)
se d)
se d)
)
ed
ed
ve
(re rve
(re rve
RT _C
RT _C
rv
rv
er
se
C
C
s
RT
RT
(re
(re
31 22 21 20 19 18 17 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 1 Reset
RTC_CNTL_RTC_FORCE_ISO Set this bit to force isolate the RTC peripherals. (R/W)
RTC_CNTL_RTC_FORCE_NOISO Set this bit to disable the force isolation to the RTC peripherals.
(R/W)
RTC_CNTL_RTC_FASTMEM_FOLW_CPU Set 1 to FPD the RTC slow memory when the CPU is
powered down. Set 0 to FPD the RTC slow memory when the RTC main state machine is powered
down. (R/W)
RTC_CNTL_RTC_FASTMEM_FORCE_LPD Set this bit to force not retain the RTC fast memory.
(R/W)
RTC_CNTL_RTC_FASTMEM_FORCE_LPU Set this bit to force retain the RTC fast memory. (R/W)
RTC_CNTL_RTC_SLOWMEM_FORCE_LPD Set this bit to force not retain the RTC slow memory.
(R/W)
RTC_CNTL_RTC_SLOWMEM_FORCE_LPU Set this bit to force retain the RTC slow memory. (R/W)
RTC_CNTL_RTC_PD_EN Set this bit to enable PD for the RTC peripherals in sleep. (R/W)
RTC_CNTL_RTC_PAD_FORCE_HOLD Set this bit the force hold the RTC GPIOs. (R/W)
RC PU
PD
I_ C RC PU
D
C L_ _W P_ RC PU
L_ I_ P R PD
RC _PU E_P
RC _PU
PD
O E_
E_
IF R O _
C_ NT G RA O E_
(re NT WIF RA FO E_
W FO _F CE
N
E_
_F RC
PD N
FO E
_D _T EN _E
RT _C L_D _W P_F RC
PD
I_ _E
I_ RC
_E
EM O
TL PU D_ PD
ER PD
C NT G O O
E_
M _F
ER O
FO E
RT _C L_D U_T P_F
CN L_C I_P P_
P_ M
_P _F
_P _
G OP
SL ME
C_ NT IF RA
G RI
C NT P O
_D PE
RT _C L_C U_T
_L P_
RT _C L_W _W
TL G_
TL SL
C NT G
C NT P
RT _C L_C
RT C L_D
CN L_D
CN L_L
C_ NT
C NT
C_ T
C_ NT
)
)
ed
ed
ed
ed
N
RT _C
R T _C
RT C
R T _C
rv
rv
rv
rv
C_
se
se
se
se
C
C
RT
RT
RT
RT
(re
(re
(re
31 30 29 28 27 23 22 21 20 19 18 17 16 15 14 13 12 5 4 3 2 0
0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 Reset
RTC_CNTL_LSLP_MEM_FORCE_PD Set this bit to FPD the memories in the digital system in sleep.
(R/W)
RTC_CNTL_LSLP_MEM_FORCE_PU Set this bit to FPU the memories in the digital system. (R/W)
RTC_CNTL_DG_PERI_PD_EN Set this bit to enable PD for the PD peripherals in sleep. (R/W)
RTC_CNTL_CPU_TOP_PD_EN Set this bit to enable PD for the CPU in sleep. (R/W)
RTC_CNTL_WIFI_PD_EN Set this bit to enable PD for the Wi-Fi circuit in sleep. (R/W)
RTC_CNTL_DG_WRAP_PD_EN Set this bit to enable PD for the digital system in sleep. (R/W)
_D _D AU E O D
RT _C L_C U_T RC NO _IS O
LD LD
I_ RC _IS O
TL LR D_ RC _IS OL
O O N
IS O
C NT P O E_ E IS
AD AD O ISO
ER O E IS
HO HO
C_ NT G D R _U D
UT UT _E
C_ NT PU O E_I ISO O
E_ OIS
RT _C L_C I_F RC RC _NO
FO E O
_P _F C NO
_A _A LD
_P _P H O
RC _N
C NT G D R _H
G G T O _N
G RI OR E_
C NT IF O FO E
RT _C L_W I_F P_ RC
CN L_D _T P_F SO
_D PE _F C
C NT G D R
RT _C L_D _PA _FO
RT _C L_W _W P_
C NT G RA
C NT G D
RT _C L_D _PA
RT _C L_D _W
C NT G
C NT G
RT _C L_D
RT C L_D
C NT
C_ NT
)
)
ed
ed
R T _C
R T _C
rv
rv
se
se
C
C
RT
RT
(re
(re
31 30 29 28 27 26 25 24 23 16 15 14 13 12 11 10 9 8 0
1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_CLR_DG_PAD_AUTOHOLD Ste this bit to clear the auto-hold enabler for the digital
GPIOs. (WO)
RTC_CNTL_DG_PAD_AUTOHOLD_EN Set this bit to allow the digital GPIOs to enter the autohold
status. (R/W)
RTC_CNTL_DG_PAD_FORCE_NOISO Set this bit to disable the force isolation to the digital GPIOs.
(R/W)
RTC_CNTL_DG_PAD_FORCE_ISO Set this bit to force isolate the digital GPIOs. (R/W)
RTC_CNTL_DG_PAD_FORCE_UNHOLD Set this bit the force unhold the digital GPIOs. (R/W)
RTC_CNTL_DG_PAD_FORCE_HOLD Set this bit the force hold the digital GPIOs. (R/W)
RTC_CNTL_DG_PERI_FORCE_ISO Set this bit to force isolate the digital peripherals. (R/W)
RTC_CNTL_DG_PERI_FORCE_NOISO Set this bit to disable the force isolation to the digital periph-
erals. (R/W)
RTC_CNTL_CPU_TOP_FORCE_NOISO Set this bit to disable the force isolation to the CPU. (R/W)
RTC_CNTL_WIFI_FORCE_ISO Set this bit to force isolate the Wi-Fi circuits. (R/W)
RTC_CNTL_WIFI_FORCE_NOISO Set this bit to disable the force isolation to the Wi-Fi circuits. (R/W)
RTC_CNTL_DG_WRAP_FORCE_ISO Set this bit to force isolate the digital system. (R/W)
RTC_CNTL_DG_WRAP_FORCE_NOISO Set this bit to disable the force isolation to the digital sys-
tem. (R/W)
SE _R ET EN
TH
TH
N_ ET N
P N
AU U ES D_
_I ES _E
G
SL _E
G
EN
_P CP _R O
EN
DT APP PU T_M
_L
_L
ET
ET
_W T_ C O
TL D RO BO
ES
S
RE
_R
CN L_W T_ SH
0
S_
PU
TG
TG
TG
TG
C_ NT D FLA
N
SY
_C
_S
_S
_S
_S
P
_E
RT C _W _
DT
DT
DT
DT
DT
DT
DT
T
C_ NT D
_W
_W
_W
_W
_W
_W
_W
RT C L_W
TL
TL
TL
TL
TL
TL
TL
L
C_ NT
)
ed
CN
CN
CN
CN
CN
CN
CN
RT C
rv
C_
C_
C_
C_
C_
C_
C_
C_
se
RT
RT
RT
RT
RT
RT
RT
RT
(re
31 30 28 27 25 24 22 21 19 18 16 15 13 12 11 10 9 8 0
RTC_CNTL_WDT_PROCPU_RESET_EN Set this bit to allow the watchdog to be able to reset CPU.
(R/W)
RTC_CNTL_WDT_FLASHBOOT_MOD_EN Set this bit to enable watchdog when the chip boots
from flash. (R/W)
RTC_CNTL_WDT_STG3 1: enable at the interrupt stage 2: enable at the CPU stage 3: enable at the
system stage 4: enable at the system and RTC stage. (R/W)
RTC_CNTL_WDT_STG2 1: enable at the interrupt stage 2: enable at the CPU stage 3: enable at the
system stage 4: enable at the system and RTC stage. (R/W)
RTC_CNTL_WDT_STG1 1: enable at the interrupt stage 2: enable at the CPU stage 3: enable at the
system stage 4: enable at the system and RTC stage. (R/W)
RTC_CNTL_WDT_STG0 1: enable at the interrupt stage 2: enable at the CPU stage 3: enable at the
system stage 4: enable at the system and RTC stage. (R/W)
LD
HO
0_
G
ST
_
DT
W
TL_
CN
C_
RT
31 0
200000 Reset
LD
HO
1_
TG
_S
DT
_W
TL
CN
C_
RT
31 0
80000 Reset
31 0
0x000fff Reset
LD
HO
3_
G
_ ST
DT
W
T L_
CN
C_
RT
31 0
0x000fff Reset
d)
CN
e
rv
C_
se
RT
(re
31 30 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
31 0
0x50d83aa1 Reset
EN
LR
TH
ST
W FE LE D_
_C
G
ID
A
_R
W
_S _ AB E
AG
FL
SE T
TL WD DIS _FE
L_
RE _IN
SS
T_
FL
NA
CN L_S D_ TO
PA
D_ ED
D_ ED
T_
G
C_ NT W AU
RS
BY
W FE
SI
RT _C L_S D_
D_
D_
_S _
TL WD
C NT W
W
RT C L_S
_S
_S
CN L_S
TL
TL
C_ NT
C_ NT
)
ed
CN
CN
R T _C
RT _C
rv
C_
C_
se
C
C
RT
RT
RT
RT
(re
31 30 29 28 27 18 17 16 2 1 0
0 0 0 0 300 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_SWD_FEED_INT Receiving this interrupt leads to feeding the super watchdog via SW.
(RO)
RTC_CNTL_SWD_SIGNAL_WIDTH Adjusts the signal width sent to the super watchdog. (R/W)
RTC_CNTL_SWD_AUTO_FEED_EN Set this bit to enable automatic watchdog feeding upon inter-
rupts. (R/W)
31 0
0x8f1d312a Reset
RTC_CNTL_SWD_WKEY Sets the write protection key of the super watchdog. (R/W)
C1
1
_C
U_
PU
CP
PC
O
PR
AP
L_
L_
L
L
TA
TA
_S
_S
W
SW
_S
_
TL
TL
)
ed
CN
CN
rv
C_
C_
se
RT
RT
(re
31 26 25 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_SW_STALL_APPCPU_C1 Set this bit to allow the SW to be able to send the CPU0 into
stalling. (R/W)
RTC_CNTL_SW_STALL_PROCPU_C1 Set this bit to allow the SW to be able to send the CPU1 into
stalling. (R/W)
31 0
0 Reset
31 0
0 Reset
6
CH
AT
CR
_S
TC
R
T L_
CN
C_
RT
31 0
0 Reset
H7
TC
RA
C
_S
TC
_R
TL
CN
C_
RT
31 0
0 Reset
P
EU
EL
AK
ID
W
N_
R_
_I
O
TE
_F
TA
DY
S
_R
N_
TC
AI
M
_R
L_
TL
NT
d)
)
ed
ed
CN
ve
rv
rv
er
C_
C_
se
se
s
RT
RT
(re
(re
(re
31 28 27 26 20 19 18 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
– in sleep modes.
RT _C L_T UC PA 3_H LD
RT _C L_T UC PA 2_H LD
RT _C L_T UC PA 1_H LD
RT _C L_T UC PA 0_H LD
RT _C L_T UC PA _H LD
RT _C L_T UC PA _H D
RT _C L_T UC PA _H D
RT _C L_T UC PA _H D
RT _C L_T UC PA _H D
CN L_T C PA _H D
TL OU H_P D3_ OLD
UC P _H D
PA _H LD
_H LD
LD
C NT O H_ D1 O
C NT O H_ D1 O
C NT O H_ D1 O
C NT O H_ D1 O
C NT O H_ D9 O
C NT O H_ D8 OL
C NT O H_ D7 OL
C NT O H_ D6 OL
C NT O H_ D5 OL
C_ NT OU H_ D4 OL
O H_ D2 OL
C NT D A _H D
C NT D 2_ _H D
C NT 32 1_ LD D
H_ AD1 O
D0 O
O
RT _C L_T UC PA 4_H
RT _C L_P C_P D20 OL
RT _C L_P AC D19 OL
RT _C L_X AC HO OL
_T C A H
C NT T A _H
C T 32 H LD
C NT O H_ D1
RT _C L_T P_ OLD
RT _C L_T UC LD
RT _C L_R C_P D21
RT _CN L_X N_ HO
RT _C L_T UC PA
C NT O HO
C NT O H_
C NT T A
RT _C L_R C_P
C NT T
RT _C L_R
C NT
d)
ve
R T _C
er
C
s
RT
(re
31 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
31 0
0 Reset
RTC_CNTL_DIG_PAD_HOLD Set GPIO 21 to GPIO 45 to hold. (See bitmap to locate any GPIO).
(R/W)
R
CL
S_
TU
EL
TA
_S
_S
P1
P1
EU
EU
AK
AK
W
W
T_
T_
EX
X
_E
_
TL
TL
)
ed
CN
CN
rv
C_
C_
se
RT
RT
(re
31 23 22 21 0
0 0 0 0 0 0 0 0 0 0 0 Reset
S
TU
TA
_S
P1
EU
AK
_W
XT
_E
TL
)d
CN
ve
er
C_
s
RT
(re
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0 Reset
NA
_E
SH
ST EL N
SE NA
_R _S _E
LA
T
N_ T A R
UT ST ST
NA
T
TL RO N_ T_ A T
_F
LO _E
AI
AI
CN L_B W OU EN DE
W OU AN CL
_W
O _R _R
_ C RF
_E
_W
RO N_ T_ T_
C_ NT RO N_ T_ T_
ST
UT _
NT
_B W OU CN
RT _C L_B OW _OU _OU
O _PD
_R
_I
UT
N_ T
UT
C NT R N N
W OU
RT _C L_B OW OW
O
N_
RO N_
N_
C NT R R
RT _C L_B C_B
_B W
W
RO
TL RO
RO
C NT T
RT C L_R
_B
CN _B
_B
TL
TL
C_ NT
C_ T
)
ed
CN
CN
RT _C
RT C
rv
C_
C_
C_
se
C
RT
RT
RT
RT
(re
31 30 29 28 27 26 25 16 15 14 13 4 3 0
RTC_CNTL_BROWN_OUT_RST_WAIT Configures the waiting cycle before the reset after a brown-
out. (R/W)
W
O
_L
1
UE
AL
_V
ER
I M
_T
RTC
L_
T
CN
C_
RT
31 0
0x000000 Reset
H
G
HI
1_
UE
AL
_V
ER
IM
_T
TC
_R
TL
)d
CN
ve
er
C_
s
RT
(re
31 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x00 Reset
31 0
0x000000 Reset
RTC_CNTL_XTAL32K_CLK_FACTOR Configures the divider factor for the 32 kHz crystal oscillator.
(R/W)
ES
T
UT
T
AI
AI
HR
W
EO
W
T_
_T
N_
IM
R
LE
_T
UR
TA
AB
DT
T
RE
RE
ST
W
K_
K_
K_
K_
32
32
L3
L3
AL
L
TA
TA
TA
XT
_X
_X
_X
_
TL
TL
TL
NT
CN
CN
CN
C
C_
C_
C_
C_
RT
RT
RT
RT
31 28 27 20 19 4 3 0
E
ID
DE DE
RT _C L_U B_D _P LD E RR
RT _C L_U B_T _EN VE LE E
RI RI
C NT S M UL LU E
C NT S X _O AB L
C T S E SE EL L
E
RT _C L_U B_T _EN DIS SAB
RE VER VER
RT _CN L_U B_R RE _S _SE
ID
CN L_U _D _PU LU N
_ _P U N
C_ NT SB P UL OW
RR
C NT S X _ DI
O O
P
_U VRE UL P
RT _C L_U MU _P _PH
F_ L_
RT _C L_U B_T SET T_
_ _ P D
TL SB P_ LL
C NT S A N
C NT O_ SB B
FH
RT _C L_I _U _US
FL
C_ T SB XM
RE
RT _C L_U B_T P
C NT S A
C NT W W
C NT S X
RT C _U _P
_V
_V
RT _C L_S _H
SB
SB
C NT W
_U
RT C L_S
TL
TL
C_ NT
)
ed
CN
RT _C
rv
C_
C_
se
C
RT
RT
RT
(re
31 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_USB_VREFH Controls the internal USB transceiver single-end input high threshold (1.76
V to 2 V, step 80 mV). This field is valid when RTC_CNTL_USB_VREF_OVERRIDE is set. (R/W)
RTC_CNTL_USB_VREFL Controls the internal USB transceiver single-end input low threshold (0.8 V
to 1.04 V, step 80 mV). This field is valid when RTC_CNTL_USB_VREF_OVERRIDE is set. (R/W)
RTC_CNTL_USB_VREF_OVERRIDE Set this bit to enable controlling the internal USB transceiver’s
input voltage threshold via software. (R/W)
RTC_CNTL_USB_PAD_PULL_OVERRIDE Set this bit to enable software controlling the internal USB
transceiver’s USB D+/D- pull-up and pull-down resistor via software. (R/W)
RTC_CNTL_USB_DP_PULLUP Set this bit to enable USB+ pull-up resistor. This field is valid when
RTC_CNTL_USB_PAD_PULL_OVERRIDE is set. (R/W)
RTC_CNTL_USB_DP_PULLDOWN Set this bit to enable USB+ pull-down resistor. This field is valid
when RTC_CNTL_USB_PAD_PULL_OVERRIDE is set. (R/W)
RTC_CNTL_USB_DM_PULLUP Set this bit to enable USB- pull-up resistor. This field is valid when
RTC_CNTL_USB_PAD_PULL_OVERRIDE is set. (R/W)
RTC_CNTL_USB_DM_PULLDOWN Set this bit to enable USB- pull-down resistor. This field is valid
when RTC_CNTL_USB_PAD_PULL_OVERRIDE is set. (R/W)
RTC_CNTL_USB_PAD_ENABLE Set this bit to enable the USB transceiver function. This field is valid
when RTC_CNTL_USB_PAD_ENABLE_OVERRIDE is set. (R/W)
RTC_CNTL_USB_TXM Configures the USB D- tx value in test mode. This field is valid when
RTC_CNTL_USB_TX_EN_OVERRIDE is set.(R/W)
RTC_CNTL_USB_TXP Configures the USB D+ tx value in test mode. This field is valid when
RTC_CNTL_USB_TX_EN_OVERRIDE is set.(R/W)
RTC_CNTL_USB_TX_EN Configures the USB pad oen in test mode. This field is valid when
RTC_CNTL_USB_TX_EN_OVERRIDE is set. (R/W)
RTC_CNTL_USB_TX_EN_OVERRIDE Set this bit to enable controlling the internal USB transceiver
Tx in test mode via software. (R/W)
RTC_CNTL_IO_MUX_RESET_DISABLE Set this bit to disable reset IO MUX and GPIO Matrix. (R/W)
RTC_CNTL_SW_USB_PHY_SEL Set this bit to allow USB OTG to use the internal USB transceiver.
Clear this bit to allow USB-Serial-JTAG to use the internal USB transceiver. This field is valid when
RTC_CNTL_SW_HW_USB_PHY_SEL is set. (R/W)
RTC_CNTL_SW_HW_USB_PHY_SEL Set this bit to control the internal USB transceiver selec-
tion via software (RTC_CNTL_SW_USB_PHY_SEL). Clear this bit to control the the internal USB
transceiver selection via hardware(efuse). (R/W)
CN
ve
r
C_
se
RT
(re
31 18 17 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
O
O
_B
AD
O
NL
W
DO
E_
RC
O
_F
TL
d)
CN
ver
C_
se
RT
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_FORCE_DOWNLOAD_BOOT Set this bit to force chip enters download boot by sw.
(R/W)
E
US
CA
P_
EU
AK
_W
TL
)
ed
CN
rv
C_
se
RT
(re
31 17 16 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
S
1T
W
A_
EN
T_
S
IN
1T
C NT T A IN EA T _E S E_
_W
CN L_S O_ T_ SC N EN _W 1T
RT _C L_R C_S D_ _D _IN INT 1T ON
_S _R E_ _E _D 1 W S
TS
1
NA
S
C_ NT DI D H_ T_E T_ NA _W
C_ NT TC O DC NA INT A_ _W
C NT T O P N IN _E TS
C NT T W 2K AP T_ _W _D
LP EJ IN NA ON TS 1T
1
C NT T L H_ TI E_ A_ S
RT C L_R _S NS INT _E S _W
EU INT _W S T_E
RT _C L_R C_U UC AC TIV EN 1T
RT _C L_R C_T P_C DO VE_ INT W1
RT _C L_S C_W UC _IN E_IN T_E NA
RT _C L_R C_C RA T_E D_ _EN NA
RT _C L_R C_S L3 TR OU NA OP
RT C L_R _B IN_ 1_ A 1T S
AK T_ NA 1T IN
A_ TS
C NT T R TI INT _W S
C NT T TA U_ E _E O
C NT T O H_ T _E 1
C NT T O N R_ NA S
RT C L_R _M A NT NA _W
_W EC T_E _W E_
RT _C L_R C_X CP TIM INT H_L
RT _C L_R C_T OW ME _E 1T
IN NA S
EN 1
W
_
P_ _E 1T
T_ _W
C_ NT TC AR _I _E NA
C NT T O H_ T_ C
W
RT _C L_R C_C UC DE OA
_
C NT T O H_ PR
RT _C L_R C_T ITC AP
RT C _R _T P _ 2
C NT T L H_
RT _C L_R C_G UC
C
C NT T O
RT _C L_R C_T
C NT T
RT C L_R
L
C_ NT
)
ed
R T _C
rv
se
C
RT
(re
31 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
C
1T
W
A_
EN
T_
C
IN
1T
C NT T A IN EA T _E C E_
_W
CN L_S O_ T_ SC N EN _W 1T
RT _C L_R C_S D_ _D _IN INT 1T ON
_S _R E_ _E _D 1 W C
TC
1
NA
C_ NT DI D H_ T_E T_ NA _W
C_ NT TC O DC NA INT A_ _W
C NT T O P N IN _E TC
C NT T W 2K AP T_ _W _D
LP EJ IN NA ON TC 1T
1
C NT T L H_ TI E_ A_ C
RT C L_R _S NS INT _E C _W
EU INT _W C T_E
RT _C L_R C_U UC AC TIV EN 1T
RT _C L_R C_T P_C DO VE_ INT W1
RT _C L_S C_W UC _IN E_IN T_E NA
RT _C L_R C_C RA T_E D_ _EN NA
RT _C L_R C_S L3 TR OU NA OP
RT C L_R _B IN_ 1_ A 1T C
AK T_ NA 1T IN
A_ TC
C NT T R TI INT _W C
C NT T TA U_ E _E O
C NT T O H_ T _E 1
C NT T O N R_ NA C
RT C L_R _M A NT NA _W
_W EC T_E _W E_
RT _C L_R C_X CP TIM INT H_L
RT _C L_R C_T OW ME _E 1T
IN NA C
EN 1
W
_
P_ _E 1T
T_ _W
C_ NT TC AR _I _E NA
C NT T O H_ T_ C
W
RT _C L_R C_C UC DE OA
_
C NT T O H_ PR
RT _C L_R C_T ITC AP
RT C _R _T P _ 2
C NT T L H_
RT _C L_R C_G UC
C
C NT T O
RT _C L_R C_T
C NT T
RT C L_R
L
C_ NT
)
ed
RT _C
rv
se
C
RT
(re
31 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RTC_CNTL_SDIO_IDLE_INT_ENA_W1TC Clears the interrupt triggered when the SDIO idles. If the
value 1 is written to this bit, the RTC_CNTL_SDIO_IDLE_INT_CLR field will be cleared. (WO)
T
AI
T
_W
AI
_W
FF
ET
NE
KO
RG
T
AI
DO
EN
CL
TA
W
N_
N_
N_
N_
N_
IO
IO
O
TI
TI
TI
NT
NT
EN
EN
EN
TE
E
ET
ET
ET
ET
RE
_R
_R
_R
_R
_
TL
TL
TL
TL
TL
)
)
ed
ed
CN
CN
CN
CN
CN
rv
rv
C_
C_
C_
C_
C_
se
se
RT
RT
RT
RT
RT
(re
(re
31 25 24 23 20 19 17 16 15 14 13 0
20 0 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
EL
_S
IB
_F
TC
_R
TL
d)
CN
e
rv
C_
se
RT
(re
31 3 2 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 Reset
11.1 Overview
ESP32-S3 provides a 52-bit timer, which can be used to generate tick interrupts for operating system, or be
used as a general timer to generate periodic interrupts or one-time interrupts. With the help of RTC timer, system
timer can account for the period of the ESP32-S3 being in Light-sleep or Deep-sleep.
The timer consists of two counters UNIT0 and UNIT1. The counter values can be monitored by three
comparators COMP0, COMP1 and COMP2. See the timer block diagram on Figure 11-1.
Timer Counter0
(UNIT0)
Timer Comparator0
(COMP0)
Timer Counter1
(UNIT1)
Timer Comparator1
(COMP1)
Timer Comparator2
(COMP2)
11.2 Features
• Consist of two 52-bit counters and three 52-bit comparators
• Use CNT_CLK for counting, with an average frequency of 16 MHz in two counting cycles
• Support for 52-bit alarm values (t) and 26-bit alarm periods (δt)
– Target mode: only a one-time alarm is generated based on the alarm value (t)
– Period mode: periodic alarms are generated based on the alarm period (δt)
• Three comparators can generate three independent interrupts based on configured alarm value (t) or alarm
period (δt)
• Load back sleep time recorded by RTC timer via software after Deep-sleep or Light-sleep
• Can be configured to stall or continue running when CPU stalls or enters on-chip-debugging mode
Software operation such as configuring registers is clocked by APB_CLK. For more information about APB_CLK,
see Chapter 7 Reset and Clock.
The following two bits of system registers are also used to control the system timer:
Note that if the timer is reset, its registers will be restored to their default values. For more information, please
refer to Table Peripheral Clock Gating and Reset in Chapter 17 System Registers (SYSTEM).
Figure 11-2 shows the procedure to generate alarm/interrupt in system timer. In this process, one timer counter
and one timer comparator are used. An alarm interrupt will be generated accordingly based on the comparison
result in comparator.
11.4.1 Counter
The system timer has two 52-bit timer counters, shown as UNITn (n = 0 or 1). Their counting clock source is a 16
MHz clock, i.e. CNT_CLK. Whether UNITn works or not is controlled by three bits in register
SYSTIMER_CONF_REG:
• SYSTIMER_TIMER_UNITn_WORK_EN: set this bit to enable the counter UNITn in system timer.
• SYSTIMER_TIMER_UNITn_CORE0_STALL_EN: if this bit is set, the counter UNITn stops counting when
CPU0 is stalled. The counter continues its counting after the CPU0 resumes.
• SYSTIMER_TIMER_UNITn_CORE1_STALL_EN: if this bit is set, the counter UNITn stops counting when
CPU1 is stalled. The counter continues its counting after the CPU1 resumes.
The configuration of the three bits to control the counter UNITn is shown below, assuming that CPU0 and CPU1
both are stalled.
When the counter UNITn is at work, the count value is incremented on each counting cycle. When the counter
UNITn is stopped or stalled, the count value stops increasing and keeps unchanged.
The low 32 bits and high 20 bits of initial count value are loaded from SYSTIMER_TIMER_UNITn_LOAD_LO and
SYSTIMER_TIMER_UNITn_LOAD_HI. Writing 1 to the bit SYSTIMER_TIMER_UNITn_LOAD will trigger a reload
event, and the current count value will be changed immediately. If UNITn is at work, the counter will continue to
count up from the new reloaded value.
Writing 1 to SYSTIMER_TIMER_UNITn_UPDATE will trigger an update event. The low 32 bits and high 20 bits of
current count value will be locked into SYSTIMER_TIMER_UNITn_VALUE_LO and
SYSTIMER_TIMER_UNITn_VALUE_HI, and then SYSTIMER_TIMER_UNITn_VALUE_VALID is asserted. Before
the next update event, the values of SYSTIMER_TIMER_UNITn_VALUE_LO and
SYSTIMER_TIMER_UNITn_VALUE_HI remain unchanged.
Configure SYSTIMER_TARGETx_PERIOD_MODE to choose from the two alarm modes for each COMPx:
In period mode, the alarm period (δt) is provided by the register SYSTIMER_TARGETx_PERIOD. Assuming that
current count value is t1, when it reaches (t1 + δt), an alarm interrupt will be generated. Another alarm interrupt
also will be generated when the counter value reaches (t1 + 2*δt). By such way, periodic alarms are
generated.
In target mode, the low 32 bits and high 20 bits of the alarm value (t) are provided by
SYSTIMER_TIMER_TARGETx_LO and SYSTIMER_TIMER_TARGETx_HI. Assuming that current count value is t2
(t2 <= t), an alarm interrupt will be generated when the count value reaches the alarm value (t). Unlike in period
mode, only one alarm interrupt is generated in target mode.
SYSTIMER_TARGETx_TIMER_UNIT_SEL is used to choose the count value from which timer counter to be
compared for alarm:
Finally, set SYSTIMER_TARGETx_WORK_EN and COMPx starts to compare the count value with the alarm value
(t) in target mode or with the alarm period (t1 + n*δt) in period mode.
An alarm is generated when the count value equals to the alarm value (t) in target mode or to the start value(t1) +
n*alarm period δt (n = 1,2,3...) in period mode. But if the alarm value (t) set in registers is less than current count
value, i.e. the target has already passed, or current count value is larger than the real target value within a range
(0 ~ 251 -1), an alarm interrupt also is generated immediately. The relationship between current count value tc , the
alarm value tt and alarm trigger point is shown below. No matter in target mode or period mode, the low 32 bits
and high 20 bits of the real target value can always be read from SYSTIMER_TARGETx_LO_RO and
SYSTIMER_TARGETx_HI_RO.
1. Software writes suitable values to configuration fields, see the first column in Table 11-3.
2. Software writes 1 to corresponding bits to start synchronization, see the second column in Table 11-3.
11.4.4 Interrupt
Each comparator has one level-triggered alarm interrupt, named as SYSTIMER_TARGETx_INT. Interrupt signal is
asserted high when the comparator starts to alarm. Until the interrupt is cleared by software, it remains high. To
enable interrupts, set the bit SYSTIMER_TARGETx_INT_ENA.
2. Poll the reading of SYSTIMER_TIMER_UNITn_VALUE_VALID, till it’s 1, which means user now can read the
count values from SYSTIMER_TIMER_UNITn_VALUE_HI and SYSTIMER_TIMER_UNITn_VALUE_LO.
3. Read the low 32 bits and high 20 bits from SYSTIMER_TIMER_UNITn_VALUE_LO and SYSTIMER_TIMER_
UNITn_VALUE_HI.
2. Read current count value, see Section 11.5.1. This value will be used to calculate the alarm value (t) in Step
4.
4. Set an alarm value (t), and fill its low 32 bits to SYSTIMER_TIMER_TARGETx_LO, and the high 20 bits to
SYSTIMER_TIMER_TARGETx_HI.
5. Set SYSTIMER_TIMER_COMPx_LOAD to synchronize the alarm value to COMPx, i.e. load the alarm value
(t) to the COMPx.
6. Set SYSTIMER_TARGETx_WORK_EN to enable the selected COMPx. COMPx starts comparing the count
value with the alarm value (t).
7. Set SYSTIMER_TARGETx_INT_ENA to enable timer interrupt. When Unitn counts to the alarm value (t), a
SYSTIMER_TARGETx_INT interrupt is triggered.
3. Set SYSTIMER_TIMER_COMPx_LOAD to synchronize the alarm period (δt) to COMPx. , i.e. load the alarm
period (δt) to COMPx.
5. Set SYSTIMER_TARGETx_WORK_EN to enable the selected COMPx. COMPx starts comparing the count
value with the sum of start value + n*δt (n = 1, 2, 3...).
2. Read the sleep time from RTC timer when the chip is woken up from Deep-sleep or Light-sleep.
4. Convert the time value recorded by RTC timer from the clock cycles based on RTC_SLOW_CLK to that
based on 16 MHz CNT_CLK. For example, if the frequency of RTC_SLOW_CLK is 32 KHz, the recorded
RTC timer value should be converted by multiplying by 500.
5. Add the converted RTC value to current count value of system timer:
• Set SYSTIMER_TIMER_UNITn_LOAD to load new timer value into system timer. By such way, the
system timer is updated.
11.7 Registers
The addresses in this section are relative to system timer base address provided in Table 4-3 in Chapter 4 System
and Memory.
_T GE _W CO E0_ AL EN
G 1_W RK E1 TAL EN
LL N
N
2_ R EN TA _E
_E
ER AR T0 1_ R ST L_
AR T O R S L_
ET O _ _S L
IM _T GE NIT CO 1_ AL
ST ER AR _U 1_ RE ST
S ER IM _U 0_ R EN
S ER IM _U 0_ R EN
SY TIM _T ER NIT CO E0_
SY TIM _T ER NIT WO K_
SY TIM _T ER NIT CO K_
RK N
N
S ER IM _U 1_ R
O E
_E
SY TIM _T ER NIT WO
W K_
S ER IM _U 0_
SY TIM _T ER NIT
S ER IM _U
ST ER IM N
SY TIM _T _E
SY IM _T ER
S ER LK
SY IM _C
ST ER
)
ed
SY TIM
rv
se
S
SY
(re
31 30 29 28 27 26 25 24 23 22 21 0
0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTIMER_CLK_EN Register clock gating. 1: Register clock is always enabled for read and write
operations. 0: Only enable needed clock for register read or write operations. (R/W)
D
A LI
_V
AL E
_V AT
UE
T0 PD
NI _U
_U IT0
ER N
IM _U
_T ER
ER IM
IM _T
ST ER
S d)
d)
SY TIM
SY rve
ve
r
se
se
(re
(re
31 30 29 28 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTIMER_TIMER_UNIT0_UPDATE Update timer UNIT0, i.e. read the UNIT0 count value to SYS-
TIMER_TIMER_UNIT0_VALUE_HI and SYSTIMER_TIMER_UNIT0_VALUE_LO. (WT)
I
_H
AD
O
_L
T0
NI
_U
ER
IM
_T
ER
d)
IM
rve
ST
se
SY
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
31 0
0 Reset
I
_H
LUE
VA
T0_
NI
_U
ER
IM
_T
ER
d)
IM
ve
er
ST
s
SY
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
O
_L
UE
AL
_V
T0
NI
_U
ER
IM
_T
ER
IM
ST
SY
31 0
0 Reset
AD
LO
0_
T
NI
_U
ER
IM
_T
ER
)
ed
M
rv
I
ST
se
SY
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTIMER_TIMER_UNIT0_LOAD UNIT0 synchronization enable signal. Set this bit to reload the val-
ues of SYSTIMER_TIMER_UNIT0_LOAD_HI and SYSTIMER_TIMER_UNIT0_LOAD_LO to UNIT0.
(WT)
D
A LI
_V
AL E
_V AT
UE
T1 PD
NI _U
_U IT1
ER N
IM _U
_T ER
ER IM
IM _T
ST ER
S d)
d)
SY TIM
SY rve
ve
r
se
se
(re
(re
31 30 29 28 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTIMER_TIMER_UNIT1_UPDATE Update timer UNIT1, i.e. read the UNIT1 count value to SYS-
TIMER_TIMER_UNIT1_VALUE_HI and SYSTIMER_TIMER_UNIT1_VALUE_LO. (WT)
I
_H
AD
O
_L
T1
NI
_U
ER
IM
_T
ER
d)
IM
rve
ST
se
SY
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
31 0
0 Reset
I
_H
LUE
VA
T1_
NI
_U
ER
IM
_T
ER
d)
IM
ve
er
ST
s
SY
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
O
_L
UE
AL
_V
T1
NI
_U
ER
IM
_T
ER
IM
ST
SY
31 0
0 Reset
AD
LO
1_
T
NI
_U
ER
IM
_T
ER
)
ed
M
rv
I
ST
se
SY
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTIMER_TIMER_UNIT1_LOAD UNIT1 synchronization enable signal. Set this bit to reload the val-
ues of SYSTIMER_TIMER_UNIT1_LOAD_HI and SYSTIMER_TIMER_UNIT1_LOAD_LO to UNIT1.
(WT)
HI
0_
ET
G
AR
_T
ER
IM
_T
ER
)
ed
IM
rv
ST
se
SY
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
LO
0_
ET
G
AR
_T
ER
IM
_T
ER
IM
ST
SY
31 0
0 Reset
D
PE R_
O
0_ E
RI
ET IM
PE
G 0_T
0_
AR T
ET
_T GE
G
ER AR
AR
IM _T
_T
ST ER
ER
)
ed
SY TIM
IM
rv
ST
se
S
SY
SY
(re
31 30 29 26 25 0
0 0 0 0 0 0 0x00000 Reset
AD
O
_L
P0
M
O
_C
ER
IM
_T
ER
d)
IM
ver
ST
se
SY
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTIMER_TIMER_COMP0_LOAD COMP0 synchronization enable signal. Set this bit to reload the
alarm value/period to COMP0. (WT)
HI
1_
ET
G
AR
_T
ER
IM
_T
ER
d)
IM
ve
er
ST
s
SY
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
31 0
0 Reset
O L
M SE
DE
D_ _
O IT
RI UN
D
PE R_
O
1_ E
RI
ET IM
PE
G 1_T
1_
AR T
ET
_T GE
G
ER AR
AR
IM _T
_T
ST ER
ER
)
ed
SY TIM
IM
rv
ST
se
S
SY
SY
(re
31 30 29 26 25 0
0 0 0 0 0 0 0x00000 Reset
AD
O
_L
P1
M
O
_C
ER
IM
_T
ER
d)
IM
r ve
ST
se
SY
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTIMER_TIMER_COMP1_LOAD COMP1 synchronization enable signal. Set this bit to reload the
alarm value/period to COMP1. (WT)
M
rv
TI
se
S
SY
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
LO
2_
ET
G
AR
_T
ER
IM
_T
ER
IM
ST
SY
31 0
0 Reset
D
PE R_
O
2_ E
RI
ET IM
PE
G 2_T
2_
AR T
ET
_T GE
G
ER AR
AR
IM _T
_T
ST ER
ER
)
ed
SY TIM
IM
rv
ST
se
S
SY
SY
(re
31 30 29 26 25 0
0 0 0 0 0 0 0x00000 Reset
AD
O
_L
P2
M
O
_C
ER
IM
_T
ER
d)
M
e
rv
I
ST
se
SY
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTIMER_TIMER_COMP2_LOAD COMP2 synchronization enable signal. Set this bit to reload the
alarm value/period to COMP2. (WT)
ET NT A
T_ A
A
G 1_I _EN
IN N
EN
0_ _E
AR T T
_T GE _IN
ER AR T2
IM _T GE
ST ER AR
SY TIM _T
S ER
)
ed
SY TIM
v
er
S
s
SY
(re
31 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
ET NT AW
T_ W
W
IN A
RA
G 1_I _R
0_ _R
AR T T
_T GE _IN
ER AR T2
IM _T GE
ST ER AR
SY TIM _T
S ER
)
ed
SY IM
rv
ST
se
SY
(re
31 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
ET NT LR
T_ R
R
IN L
CL
G 1_I _C
0_ _C
AR T T
_T GE _IN
ER AR T2
IM _T GE
ST ER AR
SY TIM _T
S ER
)
ed
SY TIM
rv
se
S
SY
(re
31 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
G 1_I _ST
IN T
ST
0_ _S
T_
AR T T
ET NT
_T GE _IN
ER AR T2
IM _T GE
ST ER AR
SY TIM _T
S ER
)
ed
SY IM
rv
ST
se
SY
(re
31 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
31 0
0 Reset
RO
I_
_H
0
ET
G
AR
_T
ER
)
ed
IM
rv
ST
se
SY
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
O
_R
LO
1_
ET
G
AR
_T
ER
IM
ST
SY
31 0
0 Reset
M
e
rv
TI
se
S
SY
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
O
_R
LO
2_
ET
G
AR
_T
ER
IM
ST
SY
31 0
0 Reset
O
_R
HI
2_
ET
G
AR
_T
ER
)
ed
IM
rv
ST
se
SY
(re
31 20 19 0
0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
31 0
0x2012251 Reset
12.1 Overview
General purpose timers can be used to precisely time an interval, trigger an interrupt after a particular interval
(periodically and aperiodically), or act as a hardware clock. As shown in Figure 12-1, the ESP32-S3 chip contains
two timer groups, namely timer group 0 and timer group 1. Each timer group consists of two general purpose
timers referred to as Tx (where x is 0 or 1) and one Main System Watchdog Timer. All general purpose timers are
based on 16-bit prescalers and 54-bit auto-reload-capable up-down counters.
Note that while the Main System Watchdog Timer registers are described in this chapter, their functional
description is included in the Chapter 13 Watchdog Timers (WDT). Therefore, the term ‘timers’ within this chapter
refers to the general purpose timers.
Figure12-2 is a diagram of timer Tx in a timer group. Tx contains a clock selector, a 16-bit integer divider as a
prescaler, a timer-based counter and a comparator for alarm generation.
Before you modify the 16-bit prescaler, the timer must be disabled (i.e. TIMG_Tx_EN should be cleared).
Otherwise, the result can be unpredictable.
To read the 54-bit value of the time-base counter, the timer value must be latched to two registers before being
read by the CPU (due to the CPU being 32-bit). By writing any value to the TIMG_TxUPDATE_REG, the current
value of the 54-bit timer is instantly latched into the TIMG_TxLO_REG and TIMG_TxHI_REG registers containing
the lower 32-bits and higher 22-bits, respectively. TIMG_TxLO_REG and TIMG_TxHI_REG registers will remain
unchanged for the CPU to read in its own time until TIMG_TxUPDATE_REG is written to again.
alarm value is ineffective until the alarm is enabled by setting the TIMG_Tx_ALARM_EN field. To avoid alarm being
enabled ‘too late’ (i.e. the timer value has already passed the alarm value when the alarm is enabled), the
hardware will trigger the alarm immediately if the current timer value is higher than the alarm value (within a
defined range) when the up-down counter increments, or lower than the alarm value (within a defined range) of
when the up-down counter decrements. Table 12-1 and Table 12-2 show the relationship between the current
value of the timer, the alarm value, and when an alarm is triggered.The current time value and the alarm value are
defined as follows:
When an alarm occurs, the TIMG_Tx_ALARM_EN field is automatically cleared and no alarm will occur again until
the TIMG_Tx_ALARM_EN is set next time.
A software instant reload is triggered by the CPU writing any value to TIMG_TxLOAD_REG, which causes the
timer’s current value to be instantly reloaded. If TIMG_Tx_EN is set, the timer will continue incrementing or
decrementing from the new value. If TIMG_Tx_EN is cleared, the timer will remain frozen at the new value until
counting is re-enabled.
An auto-reload at alarm will cause a timer reload when an alarm occurs, thus allowing the timer to continue
incrementing or decrementing from the reload value. This is generally useful for resetting the timer’s value when
using periodic alarms. To enable auto-reload at alarm, the TIMG_Tx_AUTORELOAD field should be set. If not
enabled, the timer’s value will continue to increment or decrement past the alarm value after an alarm.
2. Once receiving the signal to start calculation, the counter of XTAL_CLK and the counter of SLOW_CLK
begin to work at the same time. When the counter of SLOW_CLK counts to C0, the two counters stop
counting simultaneously;
3. Assume the value of XTAL_CLK’s counter is C1, and the frequency of SLOW_CLK would be calculated as:
C0×f _XT AL_CLK
f _rtc = C1
12.2.6 Interrupts
Each timer has its own interrupt line that can be routed to the CPU, and thus each timer group has a total of
three interrupt lines. Timers generate level interrupts that must be explicitly cleared by the CPU on each
triggering.
Interrupts are triggered after an alarm (or stage timeout for watchdog timers) occurs. Level interrupts will be held
high after an alarm (or stage timeout) occurs, and will remain so until manually cleared. To enable a timer’s
interrupt, the TIMG_Tx_INT_ENA bit should be set.
The interrupts of each timer group are governed by a set of registers. Each timer within the group has a
corresponding bit in each of these registers:
• TIMG_Tx_INT_RAW : An alarm event sets it to 1. The bit will remain set until the timer’s corresponding bit in
TIMG_Tx_INT_CLR is written.
• TIMG_WDT_INT_RAW : A stage time out will set the timer’s bit to 1. The bit will remain set until the timer’s
corresponding bit in TIMG_WDT_INT_CLR is written.
• TIMG_Tx_INT_ST : Reflects the status of each timer’s interrupt and is generated by masking the bits of
TIMG_Tx_INT_RAW with TIMG_Tx_INT_ENA.
• TIMG_WDT_INT_ST : Reflects the status of each watchdog timer’s interrupt and is generated by masking
the bits of TIMG_WDT_INT_RAW with TIMG_WDT_INT_ENA.
• TIMG_Tx_INT_ENA : Used to enable or mask the interrupt status bits of timers within the group.
• TIMG_WDT_INT_ENA : Used to enable or mask the interrupt status bits of watchdog timer within the group.
• TIMG_Tx_INT_CLR : Used to clear a timer’s interrupt by setting its corresponding bit to 1. The timer’s
corresponding bit in TIMG_Tx_INT_RAW and TIMG_Tx_INT_ST will be cleared as a result. Note that a
timer’s interrupt must be cleared before the next interrupt occurs.
• TIMG_WDT_INT_CLR : Used to clear a timer’s interrupt by setting its corresponding bit to 1. The watchdog
timer’s corresponding bit in TIMG_WDT_INT_RAW and TIMG_WDT_INT_ST will be cleared as a result.
Note that a watchdog timer’s interrupt must be cleared before the next interrupt occurs.
• Set the timer’s starting value by writing the starting value to TIMG_Tx_LOAD_LO and
TIMG_Tx_LOAD_HI, then reloading it into the timer by writing any value to TIMG_TxLOAD_REG.
3. Enable auto reload by setting TIMG_Tx_AUTORELOAD and configure the reload value via
TIMG_Tx_LOAD_LO and TIMG_Tx_LOAD_HI.
• If the next alarm requires a new alarm value and reload value (i.e. different alarm interval per iteration),
then TIMG_TxALARMLO_REG, TIMG_TxALARMHI_REG, TIMG_Tx_LOAD_LO, and
TIMG_Tx_LOAD_HI should be reconfigured as needed. Otherwise, the aforementioned registers
should remain unchanged.
• Select the clock whose frequency is to be calculated (clock source of SLOW_CLK) via
TIMG_RTC_CALI_CLK_SEL, and configure the time of calculation via TIMG_RTC_CALI_MAX.
• Select the clock whose frequency is to be calculated (clock source of SLOW_CLK) via
TIMG_RTC_CALI_CLK_SEL, and configure the time of calculation via TIMG_RTC_CALI_MAX.
3. Timeout
If the counter of SLOW_CLK cannot finish counting in TIMG_RTC_CALI_TIMEOUT_RST_CNT cycles,
TIMG_RTC_CALI_TIMEOUT will be set to indicate a timeout.
12.5 Registers
The addresses in this section are relative to Timer Group base address provided in Table 4-3 in Chapter 4 System
and Memory.
E_ _EN
TO SE
AL
RE
XT
AU EA
US M
E
x_ AR
ID
x_ R
_T C
IV
TI _T N
_T L
G IN
G A
G E
M x_
M x_
x_
M x_
)
)
ed
ed
TI _T
_T
TI _T
rv
rv
G
G
se
se
M
M
(re
(re
TI
TI
TI
31 30 29 28 13 12 11 10 9 8 0
0 1 1 0x01 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
TIMG_Tx_USE_XTAL 0: Use APB_CLK as the source clock of timer group; 1: Use XTAL_CLK as the
source clock of timer group. (R/W)
TIMG_Tx_ALARM_EN When set, the alarm is enabled. This bit is automatically cleared once an alarm
occurs. (R/W/SC)
TIMG_Tx_INCREASE When set, the timer x time-base counter will increment every clock tick. When
cleared, the timer x time-base counter will decrement. (R/W)
31 0
0x000000 Reset
TIMG_Tx_LO After writing to TIMG_TxUPDATE_REG, the low 32 bits of the time-base counter of timer
x can be read here. (RO)
HI
x_
d)
ve
_T
r
G
se
M
(re
TI
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
TIMG_Tx_HI After writing to TIMG_TxUPDATE_REG, the high 22 bits of the time-base counter of timer
x can be read here. (RO)
d)
e
_T
rv
G
se
M
(re
TI
31 30 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
31 0
0x000000 Reset
TIMG_Tx_ALARM_LO Timer x alarm trigger time-base counter value, low 32 bits. (R/W)
_T
r
G
se
M
(re
TI
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
TIMG_Tx_ALARM_HI Timer x alarm trigger time-base counter value, high 22 bits. (R/W)
O
_L
AD
LO
x_
_T
G
M
TI
31 0
0x000000 Reset
TIMG_Tx_LOAD_LO Low 32 bits of the value that a reload will load onto timer x time-base counter.
(R/W)
I
_H
AD
LO
x_
ed)
_T
rv
G
se
M
(re
TI
31 22 21 0
0 0 0 0 0 0 0 0 0 0 0x0000 Reset
TIMG_Tx_LOAD_HI High 22 bits of the value that a reload will load onto timer x time-base counter.
(R/W)
31 0
0x000000 Reset
TIMG_Tx_LOAD Write any value to trigger a timer x time-base counter reload. (WT)
RE ET EN
TH
TH
SE _EN
EN
U_ ES D_
G
T_
EN
CP _R MO
EN
_L
_L
PP U _ T
ET
ET
_A C O
DT O O
ES
ES
B
P
_R
_R
_W _ SH
0
PU
TG
TG
G DT LA
_W EN
R
Y
ST
ST
_C
_S
_S
_S
P
TI _W _F
_
_
DT
DT
DT
DT
DT
DT
DT
G DT
)
d)
ed
_W
_W
_W
_W
_W
_W
TI _W
ve
rv
r
G
G
se
se
M
M
M
M
(re
(re
TI
TI
TI
TI
TI
TI
TI
TI
31 30 29 28 27 26 25 24 23 22 21 20 18 17 15 14 13 12 11 0
TIMG_WDT_SYS_RESET_LENGTH System reset signal length selection. 0: 100 ns; 1: 200 ns; 2:
300 ns; 3: 400 ns; 4: 500 ns; 5: 800 ns; 6: 1.6 µs; 7: 3.2 µs. (R/W)
TIMG_WDT_CPU_RESET_LENGTH CPU reset signal length selection. 0: 100 ns; 1: 200 ns; 2: 300
ns; 3: 400 ns; 4: 500 ns; 5: 800 ns; 6: 1.6 µs; 7: 3.2 µs. (R/W)
TIMG_WDT_STG3 Stage 3 configuration. 0: off; 1: interrupt; 2: reset CPU; 3: reset system. (R/W)
TIMG_WDT_STG2 Stage 2 configuration. 0: off; 1: interrupt; 2: reset CPU; 3: reset system. (R/W)
TIMG_WDT_STG1 Stage 1 configuration. 0: off; 1: interrupt; 2: reset CPU; 3: reset system. (R/W)
TIMG_WDT_STG0 Stage 0 configuration. 0: off; 1: interrupt; 2: reset CPU; 3: reset system. (R/W)
)
ed
_W
rv
G
se
M
(re
TI
31 16 15 0
0x01 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
LD
HO
0_
TG
_S
DT
_W
G
M
TI
31 0
26000000 Reset
LD
HO
1_
TG
_S
DT
_W
G
M
TI
31 0
0x7ffffff Reset
31 0
0x0fffff Reset
LD
HO
3_
GT
_S
DT
_W
G
M
TI
31 0
0x0fffff Reset
D
EE
_F
DT
_W
G
M
TI
31 0
0x000000 Reset
31 0
0x50d83aa1 Reset
TIMG_WDT_WKEY If the register contains a different value than its reset value, write protection is
enabled. (R/W)
G
IN
CL
CY
ST EL
T_
AL K_S
T
AR
AR
AX
Y
_C RD
L
ST
_M
C
I_
TC LI_
TC LI_
I_
LI
AL
CA
A
_C
_C
_C
_
TC
TC
TC
)
ed
_R
_R
_R
_R
_R
rv
G
se
M
(re
TI
TI
TI
TI
TI
31 30 16 15 14 13 12 11 0
TIMG_RTC_CALI_MAX Configures the time to calculate the frequency of RTC slow clock
SLOW_CLK. Measurement unit: SLOW_CLK cycle. (R/W)
D
VL
A_
AT
_D
G
IN
E
CL
LU
CY
VA
_
I_
LI
AL
CA
_C
C_
TC
)
T
ed
_R
_R
rv
G
G
se
M
M
(re
TI
TI
31 7 6 1 0
0x00000 0 0 0 0 0 0 0 Reset
NT
S
_C
E
HR
ST
_R
_T
UT
UT
UT
EO
EO
EO
M
M
TI
TI
TI
I_
I_
I_
AL
AL
AL
_C
_C
_C
TC
TC
TC
)
ed
_R
_R
_R
rv
G
G
se
M
M
(re
TI
TI
TI
31 7 6 3 2 1 0
0x1ffffff 3 0 0 0 Reset
0_ _E NA
T_ A
A
_T T E
IN N
EN
G _IN T_
M 1 N
TI _T _I
G T
M WD
)
ed
rv
_
G
se
M
(re
TI
TI
31 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
TIMG_Tx_INT_ENA The interrupt enable bit for the TIMG_Tx_INT interrupt. (R/W)
TIMG_WDT_INT_ENA The interrupt enable bit for the TIMG_WDT_INT interrupt. (R/W)
TI _W
e
rv
G
se
M
M
(re
TI
31 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
TIMG_Tx_INT_RAW The raw interrupt status bit for the TIMG_Tx_INT interrupt. (R/WTC/SS)
TIMG_WDT_INT_RAW The raw interrupt status bit for the TIMG_WDT_INT interrupt. (R/WTC/SS)
0_ _S T
_T T S
IN T
ST
G _IN T_
T_
M 1 N
TI _T _I
G T
M WD
)
ed
rv
_
G
se
M
(re
TI
TI
31 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
TIMG_Tx_INT_ST The masked interrupt status bit for the TIMG_Tx_INT interrupt. (RO)
TIMG_WDT_INT_ST The masked interrupt status bit for the TIMG_WDT_INT interrupt. (RO)
0_ _C LR
T_ R
R
_T T C
IN L
CL
G _IN T_
M 1 N
TI _T _I
G DT
)
ed
TI _W
rv
G
se
M
M
(re
TI
31 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
_N
rv
G
se
M
(re
TI
31 28 27 0
0 0 0 0 0x2003071 Reset
N
_E
LK
)
ed
_C
rv
G
se
M
(re
TI
31 30 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
TIMG_CLK_EN Register clock gate signal. 0: The clock used by software to read and write registers
is on only when there is software operation. 1: The clock used by software to read and write
registers is always on. (R/W)
13.1 Overview
Watchdog timers are hardware timers used to detect and recover from malfunctions. They must be periodically
fed (reset) to prevent a timeout. A system/software that is behaving unexpectedly (e.g. is stuck in a software loop
or in overdue events) will fail to feed the watchdog thus trigger a watchdog timeout. Therefore, watchdog timers
are useful for detecting and handling erroneous system/software behavior.
As shown in Figure 13-1, ESP32-S3 contains three digital watchdog timers: one in each of the two timer groups
in Chapter 12 Timer Group (TIMG)(called Main System Watchdog Timers, or MWDT) and one in the RTC Module
(called the RTC Watchdog Timer, or RWDT). Each digital watchdog timer allows for four separately configurable
stages and each stage can be programmed to take one action upon expiry, unless the watchdog is fed or
disabled. MWDT supports three timeout actions: interrupt, CPU reset, and core reset, while RWDT supports four
timeout actions: interrupt, CPU reset, core reset, and system reset (see details in Section 13.2.2.2 Stages and
Timeout Actions). A timeout value can be set for each stage individually.
During the flash boot process, RWDT and the first MWDT in timergroup 0 are enabled automatically in order to
detect and recover from booting errors.
ESP32-S3 also has one analog watchdog timer: Super watchdog (SWD). It is an ultra-low-power circuit in analog
domain that helps to prevent the system from operating in a sub-optimal state and resets the system if
required.
Note that while this chapter provides the functional descriptions of the watchdog timer’s, their register
descriptions are provided in Chapter 12 Timer Group (TIMG) and Chapter 10 Low-power Management
(RTC_CNTL).
• Four stages, each with a programmable timeout value. Each stage can be configured and
enabled/disabled separately
• Three timeout actions (interrupt, CPU reset, or core reset) for MWDT and four timeout actions (interrupt,
CPU reset, core reset, or system reset) for RWDT upon expiry of each stage
• Write protection, to prevent RWDT and MWDT configuration from being altered inadvertently
Figure 13-2 shows the three watchdog timers in ESP32-S3 digital systems.
At the core of each watchdog timer is a 32-bit counter. The clock source of MWDTs is derived from the APB
clock via a pre-MWDT 16-bit configurable prescaler. In contrast, the clock source of RWDT is derived directly
from an RTC slow clock (the RTC slow clock source shown in Chapter 7 Reset and Clock). The 16-bit prescaler
for MWDTs is configured via the TIMG_WDT_CLK_PRESCALE field of TIMG_WDTCONFIG1_REG.
MWDTs and RWDT are enabled by setting the TIMG_WDT_EN and RTC_CNTL_WDT_EN fields respectively.
When enabled, the 32-bit counters of each watchdog will increment on each source clock cycle until the timeout
value of the current stage is reached (i.e. expiry of the current stage). When this occurs, the current counter value
is reset to zero and the next stage will become active. If a watchdog timer is fed by software, the timer will return
to stage 0 and reset its counter value to zero. Software can feed a watchdog timer by writing any value to
TIMG_WDTFEED_REG for MDWTs and RTC_CNTL_RTC_WDT_FEED for RWDT.
Timer stages allow for a timer to have a series of different timeout values and corresponding expiry action. When
one stage expires, the expiry action is triggered, the counter value is reset to zero, and the next stage becomes
active. MWDTs/ RWDT provide four stages (called stages 0 to 3). The watchdog timers will progress through
each stage in a loop (i.e. from stage 0 to 3, then back to stage 0).
Timeout values of each stage for MWDTs are configured in TIMG_WDTCONFIGi_REG (where i ranges from 2 to
5), whilst timeout values for RWDT are configured using RTC_CNTL_WDT_STGj_HOLD field (where j ranges from
0 to 3).
Please note that the timeout value of stage 0 for RWDT (Thold0 ) is determined by the combination of the
EFUSE_WDT_DELAY_SEL field of eFuse register EFUSE_RD_REPEAT_DATA1_REG and
RTC_CNTL_WDT_STG0_HOLD. The relationship is as follows:
Thold0 = RT C_CN T L_W DT _ST G0_HOLD << (EF U SE_W DT _DELAY _SEL + 1)
Upon the expiry of each stage, one of the following expiry actions will be executed:
• Trigger an interrupt
When the stage expires, an interrupt is triggered.
• System reset – Reset the main system, power management unit and RTC peripheral
When the stage expires the main system, power management unit and RTC peripheral (see details in
Chapter 10 Low-power Management (RTC_CNTL)) will all be reset. This action is only available in RWDT.
• Disabled
This stage will have no effects on the system.
Timeout values of each stage for MWDTs are configured in TIMG_WDTCONFIGi_REG (where i ranges from 2 to
5), whilst timeout values for RWDT are configured using RTC_CNTL_WDT_STGj_HOLD field (where j ranges from
0 to 3).
Watchdog timers are critical to detecting and handling erroneous system/software behavior, thus should not be
disabled easily (e.g. due to a misplaced register write). Therefore, MWDTs and RWDT incorporate a write
protection mechanism that prevent the watchdogs from being disabled or tampered with due to an accidental
write.
The write protection mechanism is implemented using a write-key field for each timer (TIMG_WDT_WKEY for
MWDT, RTC_CNTL_WDT_WKEY for RWDT). The value 0x50D83AA1 must be written to the watchdog timer’s
write-key field before any other register of the same watchdog timer can be changed. Any attempts to write to a
watchdog timer’s registers (other than the write-key field itself) whilst the write-key field’s value is not
0x50D83AA1 will be ignored. The recommended procedure for accessing a watchdog timer is as follows:
1. Disable the write protection by writing the value 0x50D83AA1 to the timer’s write-key field.
2. Make the required modification of the watchdog such as feeding or changing its configuration.
3. Re-enable write protection by writing any value other than 0x50D83AA1 to the timer’s write-key field.
During flash booting process, MWDT in timer group 0 (see Figure 12-1 Timer Units within Groups), as well as
RWDT, are automatically enabled. Stage 0 for the enabled MWDT is automatically configured to reset the system
upon expiry, known as core reset. Likewise, stage 0 for RWDT is configured to system reset, which resets the
main system and RTC when it expires. After booting, TIMG_WDT_FLASHBOOT_MOD_EN and
RTC_CNTL_WDT_FLASHBOOT_MOD_EN should be cleared to stop the flash boot protection procedure for
both MWDT and RWDT respectively. After this, MWDT and RWDT can be configured by software.
If the system doesn’t respond to SWD feed request and watchdog finally times out, SWD will generate a system
level signal SWD_RSTB to reset whole digital circuits on the chip.
13.3.1 Features
SWD has the following features:
• Ultra-low power
• Various dedicated methods for software to feed SWD, which enables SWD to monitor the working state of
the whole operating system
13.3.2.1 Structure
13.3.2.2 Workflow
In normal state:
• Main CPU can decide whether to feed SWD directly by setting RTC_CNTL_SWD_FEED, or send an
interrupt to ULP-RISC-V and ask ULP-RISC-V to feed SWD by setting RTC_CNTL_SWD_FEED.
• When trying to feed SWD, CPU or ULP-RISC-V needs to disable SWD controller’s write protection by
writing 0x8F1D312A to RTC_CNTL_SWD_WKEY. This prevents SWD from being fed by mistake when the
system is operating in sub-optimal state.
• If setting RTC_CNTL_SWD_AUTO_FEED_EN to 1, SWD controller can also feed SWD itself without any
interaction with CPU or ULP-RISC-V.
After reset:
13.4 Interrupts
For watchdog timer interrupts, please refer to Section 12.2.6 Interrupts in Chapter 12 Timer Group (TIMG).
13.5 Registers
MWDT registers are part of the timer submodule and are described in Section 12.4 Register Summary in Chapter
12 Timer Group (TIMG). RWDT and SWD registers are part of the RTC submodule and are described in Section
10.7 Register Summary in Chapter 10 Low-power Management (RTC_CNTL).
14.1 Overview
The XTAL32K watchdog timer on ESP32-S3 is used to monitor the status of external crystal XTAL32K_CLK. This
watchdog timer can detect the oscillation failure of XTAL32K_CLK, change the clock source of RTC, etc. When
XTAL32K_CLK works as the clock source of RTC SLOW_CLK (for clock description, see Chapter 7 Reset and
Clock) and stops oscillating, the XTAL32K watchdog timer first switches to BACKUP32K_CLK derived from
RTC_CLK and generates an interrupt (if the chip is in Light-sleep or Deep-sleep mode, the CPU will be woken
up), and then switches back to XTAL32K_CLK after it is restarted by software.
14.2 Features
14.2.1 Interrupt and WakeUp
When the XTAL32K watchdog timer detects the oscillation failure of XTAL32K_CLK, an oscillation failure interrupt
RTC_XTAL32K_DEAD_INT (for interrupt description, please refer to Chapter 10 Low-power Management
(RTC_CNTL)) is generated. At this point, the CPU will be woken up if in Light-sleep mode or Deep-sleep
mode.
14.2.2 BACKUP32K_CLK
Once the XTAL32K watchdog timer detects the oscillation failure of XTAL32K_CLK, it replaces XTAL32K_CLK
with BACKUP32K_CLK (with a frequency of 32 kHz or so) derived from RTC_CLK as RTC’s SLOW_CLK, so as
to ensure proper functioning of the system.
14.3.1 Workflow
1. The XTAL32K watchdog timer starts counting when RTC_CNTL_XTAL32K_WDT_EN is enabled. The
counter based on RTC_CLK keeps counting until it detects the positive edge of XTAL_32K and is then
cleared. When the counter reaches RTC_CNTL_XTAL32K_WDT_TIMEOUT, it generates an interrupt or a
wake-up signal and is then reset.
2. If RTC_CNTL_XTAL32K_AUTO_BACKUP is set and step 1 is finished, the XTAL32K watchdog timer will
automatically enable BACKUP32K_CLK as the alternative clock source of RTC SLOW_CLK, to ensure the
system’s proper functioning and the accuracy of timers running on RTC SLOW_CLK (e.g. RTC_TIMER).
For information about clock frequency configuration, please refer to Section 14.3.2.
3. To restore the XTAL32K watchdog timer, software restarts XTAL32K_CLK by turning its XPD (meaning no
power-down) signal off and on again via RTC_CNTL_XPD_XTAL_32K bit. Then, the XTAL32K watchdog
timer switches back to XTAL32K_CLK as the clock source of RTC SLOW_CLK by clearing
RTC_CNTL_XTAL32K_WDT_EN (BACKUP32K_CLK_EN is also automatically cleared). If the chip is in
Light-sleep or Deep-sleep mode mode, the XTAL32K watchdog timer will wake up the CPU to finish the
above steps.
f _back_clk/4 = f _rtc_clk/S
S = x0 + x1 + ... + x7
f_back_clk is the desired frequency of BACKUP32K_CLK; f_rtc_clk is the actual frequency of RTC_CLK; x0 ~x7
correspond to the pulse width in high and low state of four BACKUP32K_CLK clock signals (unit: RTC_CLK
clock cycle).
• Calculate the sum of divisor components S according to the frequency of RTC_CLK and the desired
frequency of BACKUP32K_CLK;
• Calculate the integer part of divisor component M = N /2. The integer part of divisor N are separated into
two parts because a divisor component corresponds to a pulse width in high or low state;
• Calculate the number of divisor components that equal M (xn = M) and the number of divisor components
that equal M + 1 (xn = M + 1) according to the value of M and S. (M + 1) is the fractional part of divisor
component.
For example, if the frequency of RTC_CLK is 163 kHz, then f _rtc_clk = 163000, f _back_clk = 32768, S = 20,
M = 2, and {x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 } = {2, 3, 2, 3, 2, 3, 2, 3}. As a result, the frequency of BACKUP32K_CLK
is 32.6 kHz.
15.1 Overview
ESP32-S3 is specially designed for flexible access management to internal memory, external memory, and all
peripherals. Once configured, CPU can only access a particular slave device according to the configured
permission, thus protecting the slave device from unauthorized access (read, write, or instruction
execution).
In addition, ESP32-S3 has integrated a World Controller, which when enabled can be used along with Permission
Controller to allocate the chip’s hardware and software resource into Secure World (World0) and Non-secure
World (World1), and can switch the CPU between running from the Secure World or Non-secure World. For
details, please refer to 16 World Controller (WCL).
This chapter mainly describes the access management to different internal memory, external memory and
peripherals.
15.2 Features
ESP32-S3’s Permission Control module supports:
• Independent access management for the Secure World and Non-secure World.
• ROM: 384 KB in total, including 256 KB Internal ROM0 and 128 KB Internal ROM1
• SRAM: 512 KB in total, including 32 KB Internal SRAM0, 416 KB Internal SRAM1, and 64 KB Internal
SRAM2
• RTC FAST Memory: 8 KB in total, which can be split into two regions with independent permission
configuration
• RTC SLOW Memory: 8 KB in total, which can be further split into two regions each with independent
permission configuration
This section describes how to configure the permission to each types of ESP32-S3’s internal memory.
15.3.1 ROM
ESP32-S3’s ROM can be accessed by CPU’s instruction bus (IBUS) and data bus (DBUS) when configured.
Note:
• Permission for Secure World and Non-secure World can be configured independently.
• Once configured, the permission applies for both CPU0 and CPU1.
15.3.1.1 Address
ESP32-S3’s ROM address and the address ranges accessible for IBUS and DBUS respectively are listed in Table
15-1.
ESP32-S3 uses the registers listed in Table 15-2 to configure the instruction execution (X), write (W) and read (R)
accesses of CPU’s IBUS and DBUS, from the Secure World and Non-secure World, to ROM:
15.3.2 SRAM
ESP32-S3’s SRAM can be accessed by CPU’s instruction bus (IBUS) and data bus (DBUS) when configured.
Note:
• Permission for Secure World and Non-secure World can be configured independently.
• Once configured, the configuration applies for both CPU0 and CPU1.
15.3.2.1 Address
ESP32-S3’s SRAM address and the address ranges accessible for IBUS and DBUS respectively are listed in
Table 15-3.
Here, we will first introduce how to configure the permission to Internal SRAM0, Internal SRAM1, and Internal
SRAM2, and also how to configure the Internal SRAM1 as CPU Trace memory.
ESP32-S3’s Internal SRAM0 includes Block0 and Block1 (see details in Table 15-3) and can be allocated to
either CPU or ICACHE.
Note that once configured, the configuration applies for both CPU0 and CPU1.
ESP32-S3 uses the register described in Table 15-4 to allocate the SRAM0 to either CPU or ICACHE:
Block PMS_INTERNAL_SRAM_USAGE_1_REGA
Block0 [0] B
SRAM
Block1 [1]
A
Set this bit to allocate a certain block to CPU. Clear this bit to
allocate a certain block to ICACHE.
B
For example, setting this bit indicates Block0 is allocated to
CPU.
When a certain block is allocated to CPU, ESP32-S3 uses the registers listed in Table 15-5 to configure the
instruction execution (X), write (W) and read (R) accesses of CPU’s IBUS, from the Secure World and Non-secure
World, to this block:
SRAM0
BusA From World Configuration RegistersB Access
Block0 Block1
Secure World PMS_CORE_X_IRAM0_PMS_CONSTRAIN_2_REG [14:12]C [17:15] X/W/R
IBUS
Non-secure World PMS_CORE_X_IRAM0_PMS_CONSTRAIN_1_REG [14:12] [17:15] X/W/R
A
To access the Internal SRAM0, CPU must be configured with both the usage permission and respective access
permission.
B
1: with access; 0: without access
C
For example, configuring this field to 0b101 indicates CPU’s IBUS is granted with instruction execution and read
accesses but not write access to SRAM Block0 from the Non-secure World.
ESP32-S3’s Internal SRAM1 includes Block2 ~ Block8 (see details in Table 15-3) and can be:
• Further split into up to 6 regions with independent access management for more flexible permission control.
ESP32-S3’s Internal SRAM1 can be further split into up to 6 regions with 5 split lines. Users can configure
different access to each region independently.
To be more specific, the Internal SRAM1 can be first split into Instruction Region and Data Region by
IRam0_DRam0_split_line:
• Instruction Region:
– And can be further split into three split regions by IRam0_split_line_0 and IRam0_split_line_1.
• Data Region:
– And can be further split into three split regions by DRam0_split_line_0 and DRam0_split_line_1.
ESP32-S3 allows users to configure the split lines to their needs with registers below:
– PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_1_REG
• The first split line to further split the Instruction Region (IRam0_split_line_0):
– PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_2_REG
• The second split line to further split the Instruction Region (IRam0_split_line_1):
– PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_3_REG
• The first split line to further split the data Region (DRam0_split_line_0):
– PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_4_REG
• The second split line to further split the data Region (DRam0_split_line_1):
– PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_5_REG
• Configuring the Category_x field for the block in which the split line is to 0x1 or 0x2 (no difference)
• Configuring the Category_0 ~ Category_x-1 fields for all the preceding blocks to 0x0
• Configuring the Category_x+1 ~ Category_6 fields for all blocks afterwards to 0x3
For example, assuming you want to configure the split line in Block5, then first configure the Category_3
field for Block5 to 0x1 or 0x2; configure the Category_0 ~ Category_2 fields for Block2 ~ Block4 to 0x0; and
configure the Category_4 ~ Category_6 fields for Block6 ~ Block8 to 0x3 (see illustration in Figure 15-2).
On the other hand, when reading 0x1 or 0x2 from Category_3, then you know the split line is in Block5.
2. Configure the position of the split line inside of the configured block by:
• Writing the [15:8] bits of the actual address at which you want to split the memory to the SPLITADDR
field for the block in which the split line is.
• Note that the split address must be aligned to 256 bytes, meaning you can only write the integral
multiples of 0x100 to the SPLITADDR field.
For example, if you want to split the instruction region at 0x3fc88000, then write the [15:8] bits of this
address, which is 0b10000000, to SPLITADDR.
• Position:
– The split line that splitting the Instruction Region and Data Region can be configured anywhere inside
Internal SRAM1.
– The two split lines further splitting the Instruction Region into 3 split regions must stay inside the
Instruction Region.
– The two split lines further splitting the Data Region into 3 split regions must stay inside the Data
Region.
– When the two split lines inside the Data Region are not overlapping with each other, then the Data
Region is split into 3 split regions
– When the two split lines inside the Data Region are overlapping with each other, then the Data Region
is only split into 2 split regions
– When the two split lines inside the Data Region are not only overlapping with each other but also with
the split line that splits the Data Region and the Instruction Region, then the Data Region is not split at
all and only has one region.
Access Configuration
After configuring the split lines, users can then use the registers described in the Table 15-7 and Table 15-8
below to configure the access of CPU’s IBUS, DBUS and GDMA peripherals, from the Secure World and
Non-secure World, to these split regions independently.
Instruction Region
Buses From World Configuration Registers Access
instr_region_0 instr_region_1 instr_region_2
Data Region
Buses From World Configuration Registers Access
data_region_0 data_region_1 data_region_2
Secure
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_2_REG [11:9]A X/W/R
IBUS World
Non-secure
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_1_REG [11:9]A X/W/R
World
Secure
[3:2] [5:4] [7:6] W/R
DBUS World
Non-secure PMS_Core_X_DRAM0_PMS_CONSTRAIN_1_REG
[15:14] [17:16] [19:18] W/R
World
GDMA XX B - PMS_DMA_APBPERI_XX_PMS_CONSTRAIN_1_REG [3:2] [5:4] [7:6] W/R
A
Configure IBUS’ access to the Data Region. However, it’s recommended to configure these bits to 0.
B
ESP32-S3 has 9 peripherals, including SPI2, SPI3, UCHI0, I2S0, I2S1, AES, SHA, ADC, LCD_CAM, USB, SDIO_HOST,
and RMT, which can access Internal SRAM1 via GDMA. Each peripherals can be configured with different access to the
Internal SRAM1 independently.
For details on how to configure the split lines, see Section 15.3.2.3.
Trace Memory
ESP32-S3 has a low-power Xtensa® dual-core 32-bit LX7 microprocessor, which integrates a TRAX (Real-time
Trace) module for easier debugging. For the TRAX module to work, users need to allocate 16 KB from the
Internal SRAM1 as Trace memory. Note that, the Trace memories for CPU0 and CPU1 can be configured
independently.
Users can allocate 16 KB from Internal SRAM1 as Trace memory by configuring the
PMS_INTERNAL_SRAM_USAGE_2_REG register.
1. First choose a block from Block2 ~ Block8 by writing 1 to the respective bit in the
PMS_INTERNAL_SRAM_COREm_TRACE_USAGE field
• Block2: 0b00000001
• Block3: 0b00000010
• Block4: 0b00000100
• Block5: 0b00001000
• Block6: 0b00010000
• Block7: 0b00100000
• Block8: 0b01000000
2. Then choose 16 KB from this block as the Trace memory by configuring the
PMS_INTERNAL_SRAM_COREm_TRACE_ALLOC field
Note that Block2 is only 32 KB, so you can only configure this field to 2’b00 or 2’b0 when Block2 is
selected in the first step.
For example, if you want to choose the first 16 KB of Internal SRAM1 Block3’s as CPU0’s trace memory, then
you need to:
ESP32-S3’s Internal SRAM2 includes Block9 and Block10 (see details in Table 15-3), which can be allocated to
either CPU/GDMA or DCACHE. Note that once configured, the configuration applies to both CPU0 and
CPU1.
ESP32-S3 uses registers described in Table 15-9 to configure the Internal SRAM2 for CPU/GDMA or
DCACHE.
Block PMS_INTERNAL_SRAM_USAGE_1_REGA
Block9B [3]
SRAM
Block10 [2]
A
Set this bit to allocate a certain block to CPU/GDMA. Clear this
bit to allocate a certain block to DCACHE.
B
For example, setting this bit indicates Block9 is allocated to
CPU/GDMA.
When a certain block is allocated to CPU/GDMA, ESP32-S3 uses the registers listed in Table 15-10 to configure
the write (W) and read (R) accesses of CPU’s DBUS, from the Secure World and Non-secure World, to this
block:
SRAM2
Bus A From World Configuration Registers AccessB
Block9 Block10
Secure World PMS_CORE_X_DRAM0_PMS_CONSTRAIN_1_REG [9:8]C [11:10] W/R
DBUS
Non-secure World PMS_CORE_X_DRAM0_PMS_CONSTRAIN_1_REG [21:20] [23:22] W/R
B
GDMA XX Peripherals PMS_DMA_APBPERI_XX_PMS_CONSTRAIN_1_REG [9:8] [11:10] W/R
A
To access the Internal SRAM2, the CPU / GDMA must be configured with both the usage permission and respective
access permission.
B
1: with access; 0: without access
C
For example, configuring this field to 0b10 indicates CPU’s DBUS is granted with write access but not read access
from the Secure World to the Block9 of Internal SRAM2.
15.3.3.1 Address
ESP32-S3’s RTC FAST Memory is 8 KB. See the address of RTC FAST Memory below:
ESP32-S3’s RTC FAST Memory can be further split into 2 regions. Each split region can be configured
independently with different access by configuring respective registers
(PMS_CORE_m_PIF_PMS_CONSTRAN_n_REG).
Note that split regions can be configured independently for CPU0 and CPU1 and for the Secure World and
Non-secure World.
Table 1512. Split RTC FAST Memory into the Higher Region and the Lower Region
Configuration Register1
Memory Split Regions
Secure World Nonsecure World
Higher Region
RTC FAST Memory PIF_PMS_CONSTRAN_9_REG [10:0] PIF_PMS_CONSTRAN_9_REG [21:11]
Lower Region
1
The offset from the RTC FAST Memory base address should be used when configuring the split address. For example,
if you want to split the RTC FAST Memory at 0x600F_F000, then write 0x1000 to this register.
Access configuration for the higher and lower regions of the RTC FAST Memory is described below:
15.3.4.1 Address
ESP32-S3’s RTC SLOW Memory is 8 KB. This memory can be accessed using two addresses, i.e, RTCSlow_0
and RTCSlow_1. See details in Table 15-14 below:
Both ESP32-S3’s RTCSlow_0 and RTCSlow_1 can be further split into 2 regions. Each split region can be
configured independently with different access by configuring respective registers
(PMS_CORE_m_PIF_PMS_CONSTRAN_n_REG).
Note that split regions can be configured independently for CPU0 and CPU1 and for the Secure World and
Non-secure World.
The registers for splitting RTC SLOW Memory into 4 split regions are described below:
Configuration Registers1
Memory Split Regions
Secure World Nonsecure World
Higher Region
RTCSlow_0 PIF_PMS_CONSTRAN_11_REG [10:0] PIF_PMS_CONSTRAN_9_REG [21:11]
Lower Region
Higher Region
RTCSlow_1 PIF_PMS_CONSTRAN_13_REG [10:0] PIF_PMS_CONSTRAN_13_REG [21:11]
Lower Region
1
The offset from the RTC SLOW Memory base address should be used when configuring the split address. For
example, if you want to split the RTC SLOW Memory at 0x6002_2000, then write 0x1000 to this register.
Access configuration to the split regions of RTC SLOW Memory is described below:
15.4 Peripherals
15.4.1 Access Configuration
ESP32-S3’s CPU can be configured with different read (R) and write (W) accesses to most of its modules and
peripherals independently, from the Secure World and the Non-secure World, by configuring respective registers
(PMS_CORE_m_PIF_PMS_CONSTRAN_n_REG).
Note that permission to modules and peripherals can be configured independently for CPU0 and CPU1 and for
the Secure World and Non-secure World.
Notes on PMS_CORE_m_PIF_PMS_CONSTRAN_n_REG:
• n can be 1~8, in which 1~4 are for Secure World and 5~8 are for Non-secure World.
For example, users can configure PMS_CORE_0_PIF_PMS_CONSTRAIN_1_REG [1:0] to 0x2, meaning CPU0 is
granted with read access but not write access from the Secure World to UART0. In this case, CPU0 won’t be
able to modify the UART0’s internal registers when in Secure World.
For example, the registers for ESP32-S3’s GDMA controller are allocated as:
As seen above, GDMA’s peripheral region is divided into 11 split regions (implemented in hardware), which can
be configured with different permission independently, thus achieving independent permission control to each
GDMA channel.
Users can configure CPU’s read (R) and write (W) accesses to a specific split region (Peri Regionn) from the
Secure World and the Non-secure World by configuring PMS_CORE_m_Region_PMS_CONSTRAN_n_REG.
Note that permission can be configured independently for CPU0 and CPU1.
Notes on PMS_CORE_m_Region_PMS_CONSTRAN_n_REG:
Access Configuration
Peri Regions Starting Address Configuration
Secure World NOnsecure World
Peri Region0 Region_PMS_CONSTRAN_3_REG Region_PMS_CONSTRAN_1_REG [1:0] Region_PMS_CONSTRAN_2_REG [1:0]
• GDMA
SPI1, CACHE or GDMA must be configured with specific permission before accessing external memory. see
illustration in Figure 15-3:
• Box 2 checks CPU’s access to external flash and SRAM via CACHE
15.5.1 Address
Both ESP32-S3’s flash and SRAM can be further split to achieve more flexible permission control. Each split
region can be configured with different access independently.
• Flash can be split into 4 regions, the length of each should be the integral multiples of 64 KB.
• SRAM can be split into 4 regions, the length of each should be the integral multiples of 64 KB.
• Also, the starting address of each region should also be aligned to 64 KB.
The following registers can be used to configure how the flash or SRAM are split.
Access Configuration
Split Regions CACHE SPI1
Configuration Registers A A
Secure World Nonsecure World AccessB
Flash Region n (n: 0 ~ 3) APB_CTRL_FLASH_ACEn_ATTR [2:0]C [5:3] [7:6]D
SRAM Region n (n: 0 ~ 3) APB_CTRL_SRAM_ACEn_ATTR_REG [2:0] [5:3] [7:6]
A
These bits are configured in order W/R/X
B
These bits are configured in order W/R
C
For example, configuring this field to 0b010 indicates CACHE is granted with the read access but not the write or
instruction execution accesses from the Secure WORLD to the Flash Region n.
D
For example, configuring this field to 0b01 indicates SPI is granted with the read access but not the write access to
the Flash Region n.
15.5.3 GDMA
ESP32-S3’s 32 MB External SRAM can be independently split into four regions, of which the Region1 and
Region2 are accessible to GDMA.
Table 1521. Split the External SRAM into Four Split Regions for GDMA
Split
Starting Address (included) Ending Address (not included)2
Regions
Region0 3 0x3C000000 PMS_EDMA_BOUNDARY_0_REG 1,2
Region1 4 PMS_EDMA_BOUNDARY_0_REG 1 PMS_EDMA_BOUNDARY_1_REG 1,2
Region2 4 PMS_EDMA_BOUNDARY_1_REG 1 PMS_EDMA_BOUNDARY_2_REG 1,2
Region3 3 PMS_EDMA_BOUNDARY_2_REG 1 0x3E000000 2
1
When configuring this register, note that you need to write an offset to 0x3C000000 and the unit is 4 KB. For ex-
ample, configuring the register to 0x80 means that the address is 0x3C000000 + 0x80 * 4KB = 0x3C080000.
2
The address value filled here is the Ending address plus one. For example, 0x3E000000 means that the end
address is 0x3DFFFFFF.
3
This region cannot be accessed by peripherals via GDMA.
4
This region can be accessed by some peripherals via GDMA, including SPI2, SPI3, UHCI0, I2S0, I2S1,
Camera-LCD Controller, AES, SHA, ADC Controller, and Remote Control Peripheral. See details below.
Users can use the registers below to configure peripherals’ access to the second and third External SRAM
regions via GDMA.
Access Configuration
Peripherals
Region1 Region2 Access
SPI2 PMS_EDMA_PMS_SPI2_ATTR1 PMS_EDMA_PMS_SPI2_ATTR2
SPI3 PMS_EDMA_PMS_SPI3_ATTR1 PMS_EDMA_PMS_SPI3_ATTR2
UHCI0 PMS_EDMA_PMS_UHCI0_ATTR1 PMS_EDMA_PMS_UHCI0_ATTR2
I2S0 PMS_EDMA_PMS_I2S0_ATTR1 PMS_EDMA_PMS_I2S0_ATTR2
I2S1 PMS_EDMA_PMS_I2S1_ATTR1 PMS_EDMA_PMS_I2S1_ATTR2
W/R
Camera-LCD Controller PMS_EDMA_PMS_LCD_CAM_ATTR1 PMS_EDMA_PMS_LCD_CAM_ATTR2
AES PMS_EDMA_PMS_AES_ATTR1 PMS_EDMA_PMS_AES_ATTR2
A
SHA PMS_EDMA_PMS_SHA_ATTR1 PMS_EDMA_PMS_SHA_ATTR2
ADC Controller PMS_EDMA_PMS_ADC_DAC_ATTR1 PMS_EDMA_PMS_ADC_DAC_ATTR2
Remote Control Peripheral PMS_EDMA_PMS_RMT_ATTR1 PMS_EDMA_PMS_RMT_ATTR2
A
For example, configuring this field to 0b10 indicates SHA is granted with the write access but not the read access via
GDMA to SRAM Region1.
– All instruction execution or read attempts will be responded with 0 (for internal memory) or 0xdeadbeaf
(for external memory)
Note that:
• All permission control related interrupts described in this section can be independently configured for CPU0
and CPU1.
• Only the information of the first interrupt is logged. Therefore, it’s advised to handle interrupt signals and
clear interrupts in-time, so the information of next interrupt can be logged correctly.
Table 1526. Interrupt Registers for Unauthorized Access to Internal Memory via GDMA
For information about Interrupt upon unauthorized access to external memory via GDMA, please refer to Chapter
3 GDMA Controller (GDMA)�
In particular, ESP32-S3 can also be configured to check the access alignment when PIF attempts to access the
peripheral regions, and trigger Interrupt upon unauthorized alignment. See detailed description in the following
section.
ESP32-S3 can be configured to check the access alignment to all modules / peripherals, and trigger Interrupt
upon nonword aligned access.
Note that CPU can convert some non-word aligned access to word aligned access, thus avoiding triggering
alignment interrupt.
Table 15-28 below lists all the possible access alignments and their results (when interrupt is enabled), in
which:
• INTR: interrupt
√
• : access succeeds and no interrupt.
• 1: CPUm uses WORLD0_VALUE in both the Secure World and the Non-secure World.
• 0: CPUm uses WORLD0_VALUE in the Secure World, and WORLD1_VALUE in the Non-secure World.
Note that there isn’t one-to-one correspondence between the lock registers and permission control registers.
See details in Table 15-30.
PMS_DMA_APBPERI_SDIO_PMS_CONSTRAIN_0_REG
PMS_DMA_APBPERI_SDIO_PMS_CONSTRAIN_0_REG
PMS_DMA_APBPERI_SDIO_PMS_CONSTRAIN_1_REG
PMS_DMA_APBPERI_PMS_MONITOR_0_REG
PMS_DMA_APBPERI_PMS_MONITOR_1_REG
PMS_DMA_APBPERI_PMS_MONITOR_0_REG
PMS_DMA_APBPERI_PMS_MONITOR_2_REG
PMS_DMA_APBPERI_PMS_MONITOR_3_REG
Lock Peripherals’ Access to External SRAM
PMS_EDMA_BOUNDARY_LOCK_REG
PMS_EDMA_BOUNDARY_0_REG
PMS_EDMA_BOUNDARY_LOCK_REG
PMS_EDMA_BOUNDARY_1_REG
PMS_EDMA_BOUNDARY_2_REG
PMS_EDMA_PMS_SPI2_LOCK_REG
PMS_EDMA_PMS_SPI2_LOCK_REG
PMS_EDMA_PMS_SPI2_REG
PMS_EDMA_PMS_SPI3_LOCK_REG
PMS_EDMA_PMS_SPI3_LOCK_REG
PMS_EDMA_PMS_SPI3_REG
PMS_EDMA_PMS_UHCI0_LOCK_REG
PMS_EDMA_PMS_UHCI0_LOCK_REG
PMS_EDMA_PMS_UHCI0_REG
Note that, all registers with CORE_X in this section apply to both CPUs. The list of registers below is for CPU0 only. CPU1 shares exactly the same set of registers.
Adding 0x0400 to the offset of the equivalent of CPU0 register gives you address for CPU1 registers.
For example, the offset for CPU0 register PMS_CORE_0_IRAM0_PMS_MONITOR_0_REG is 0x00E4, the offset for CPU1 equivalent
PMS_CORE_1_IRAM0_PMS_MONITOR_0_REG should be 0x00E4 + 0x0400, which is 0x04E4.
GoBack
PMS_DMA_APBPERI_SHA_PMS_CONSTRAIN_0_REG SHA GDMA Permission Config Register 0 0x0078 R/W
PMS_DMA_APBPERI_SHA_PMS_CONSTRAIN_1_REG SHA GDMA Permission Config Register 1 0x007C R/W
Espressif Systems
PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE
SRAM Split Line Config Register 0 0x00C0 R/W
_CONSTRAIN_0_REG
PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE
SRAM Split Line Config Register 1 0x00C4 R/W
_CONSTRAIN_1_REG
PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE
SRAM Split Line Config Register 2 0x00C8 R/W
_CONSTRAIN_2_REG
PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE
SRAM Split Line Config Register 3 0x00CC R/W
_CONSTRAIN_3_REG
ESP32-S3 TRM (Version 1.1)
PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE
SRAM Split Line Config Register 4 0x00D0 R/W
_CONSTRAIN_4_REG
PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE
SRAM Split Line Config Register 5 0x00D4 R/W
_CONSTRAIN_5_REG
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_0_REG IBUS Permission Config Register 0 0x00D8 R/W
GoBack
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_1_REG IBUS Permission Config Register 1 0x00DC R/W
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_2_REG IBUS Permission Config Register 2 0x00E0 R/W
Espressif Systems
GoBack
UHCI0 External Memory Permission Lock
PMS_EDMA_PMS_UHCI0_LOCK_REG 0x02C8 R/W
Register
Espressif Systems
GoBack
PMS_CORE_0_PIF_PMS_MONITOR_5_REG CPU0 PIF Permission Interrupt Register 5 0x01B0 RO
PMS_CORE_0_PIF_PMS_MONITOR_6_REG CPU0 PIF Permission Interrupt Register 6 0x01B4 RO
Espressif Systems
0x0048 +
APB_CTRL_FLASH_ACEn_SIZE_REG (n: 0 - 3) Flash Arean Length Config Register R/W
4*n
0x0058 +
APB_CTRL_SRAM_ACEn_ATTR_REG (n: 0 - 3) External SRAM Arean Permission Config Register R/W
688
4*n
External SRAM Arean Starting Address Config 0x0068 +
APB_CTRL_SRAM_ACEn_ADDR_REG (n: 0 - 3) R/W
Register 4*n
0x0078 +
APB_CTRL_SRAM_ACEn_SIZE_REG (n: 0 - 3) External SRAM Arean Length Config Register R/W
4*n
External Memory Unauthorized Access Interrupt
APB_CTRL_SPI_MEM_PMS_CTRL_REG 0x0088 varies
Register
External Memory Unauthorized Access Address
APB_CTRL_SPI_MEM_REJECT_ADDR_REG 0x008C RO
ESP32-S3 TRM (Version 1.1)
Register
GoBack
Espressif Systems
CK
OL
S_
CES
AC
L_
RA
HE
IP
R
_PE
Submit Documentation Feedback
PB
d )
ve
A
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
689
PMS_APB_PERIPHERAL_ACCESS_LOCK Set this bit to lock APB peripheral configuration register. (R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
T
RS
BU
_
LIT
SP
S_
ES
C
AC
L_
RA
HE
R IP
_PE
PB
d )
ve
A
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
Submit Documentation Feedback
PMS_APB_PERIPHERAL_ACCESS_SPLIT_BURST Set this bit to allow the PIF bus to initiate back to back access to peripheral regions. (R/W)
690
CK
LO
E_
G
SA
_U
AM
SR
L_
NA
R
TE
d )
ESP32-S3 TRM (Version 1.1)
IN
ve
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_INTERNAL_SRAM_USAGE_LOCK Set this bit to lock internal SRAM Configuration Register. (R/W)
GoBack
Espressif Systems
E
AG
AG
US
E
US
G
E_
SA
E_
CH
_U
CH
PU
CA
CA
_C
_D
_I
M
M
RA
RA
RA
_S
_S
_S
AL
AL
AL
RN
RN
RN
TE
TE
TE
d)
IN
IN
IN
e
rv
S_
S_
S_
se
PM
PM
PM
(re
31 11 10 4 3 2 1 0
PMS_INTERNAL_SRAM_ICACHE_USAGE Configures certain blocks of SRAM0 are allocated for CPU or ICACHE. (R/W)
PMS_INTERNAL_SRAM_DCACHE_USAGE Configures certain blocks of SRAM2 are allocated for CPU or DCACHE. (R/W)
PMS_INTERNAL_SRAM_CPU_USAGE Configures this field to allow CPU to use certain blocks of SRAM1. (R/W)
691
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
E
C
AG
AG
LO
LO
US
US
AL
AL
E_
E_
E_
E_
AC
AC
AC
AC
TR
TR
TR
TR
1_
0_
1_
0_
RE
RE
RE
RE
O
O
_C
_C
_C
_C
M
M
RA
RA
RA
RA
_S
_S
_S
_S
AL
AL
AL
AL
RN
RN
RN
RN
TE
TE
TE
TE
d)
IN
IN
IN
IN
ve
S_
S_
S_
S_
r
se
PM
PM
PM
PM
(re
31 18 17 16 15 14 13 7 6 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
Submit Documentation Feedback
PMS_INTERNAL_SRAM_CORE0_TRACE_USAGE Configure this field to choose a certain block in SRAM1 as the trace memory block for CPU0. (R/W)
PMS_INTERNAL_SRAM_CORE1_TRACE_USAGE Configure this field to choose a certain block in SRAM1 as the trace memory block for CPU1. (R/W)
692
PMS_INTERNAL_SRAM_CORE0_TRACE_ALLOC Configure this field to choose a certain 16 KB in the selected trace memory block as trace memory for
CPU0. (R/W)
PMS_INTERNAL_SRAM_CORE1_TRACE_ALLOC Configure this field to choose a certain 16 KB in the selected trace memory block as trace memory for
CPU1. (R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
CK
O
_L
IN
A
TR
NS
CO
S_
PM
2_
SPI
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_SPI2_PMS_CONSTRAIN_LOCK Set this bit to lock SPI2’s GDMA permission configuration register. (R/W)
693
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
PM
Y_
Y_
RA
RA
AR
R
AA
TA
T
DA
DA
HE
_3
0
CH
S_
S_
S_
S
AC
PM
PM
M
CA
_C
_P
_P
_
_
AM
AM
RA
RA
RA
RA
SR
SR
S
_S
_S
N_
N_
N_
IN
IN
IN
AI
AI
A
RA
RA
TR
TR
TR
TR
T
ST
NS
NS
NS
NS
NS
N
CO
CO
CO
CO
CO
CO
S_
S_
S_
S_
S_
S
PM
M
_P
_P
_P
_P
_
2_
I2
I2
I2
I2
PI
PI
SP
SP
SP
SP
Submit Documentation Feedback
_S
I_
I_
I_
I_
I_
I
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
694
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
O
_L
IN
A
TR
NS
CO
S_
PM
3_
SPI
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_SPI3_PMS_CONSTRAIN_LOCK Set this bit to lock SPI3’s GDMA permission configuration register. (R/W)
695
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
PM
Y_
Y_
RA
RA
AR
R
AA
TA
T
DA
DA
HE
_3
0
CH
S_
S_
S_
S
AC
PM
PM
M
CA
_C
_P
_P
_
_
AM
AM
RA
RA
RA
RA
SR
SR
S
_S
_S
N_
N_
N_
IN
IN
IN
AI
AI
A
RA
RA
TR
TR
TR
TR
T
ST
NS
NS
NS
NS
NS
N
CO
CO
CO
CO
CO
CO
S_
S_
S_
S_
S_
S
PM
M
_P
_P
_P
_P
_
3_
I3
I3
I3
I3
PI
PI
SP
SP
SP
SP
Submit Documentation Feedback
_S
I_
I_
I_
I_
I_
I
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
696
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
CO
S_
M
_P
I0
UHC
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_UHCI0_PMS_CONSTRAIN_LOCK Set this bit to lock UHCI0’s GDMA permission configuration register. (R/W)
697
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
PM
Y_
Y_
RA
RA
AR
AR
TA
TA
DA
DA
HE
_3
0
CH
S_
S_
S_
S
AC
M
CA
_C
_P
_P
_P
_P
_
AM
AM
AM
RA
RA
RA
SR
SR
SR
_S
_S
S
N_
N_
N_
N_
N
IN
AI
AI
AI
AI
RA
A
TR
TR
TR
TR
TR
ST
NS
NS
NS
NS
NS
N
CO
CO
CO
_C
_C
_C
S_
S_
S_
S
S
M
PM
_P
_P
_P
_P
_P
0_
0
I0
I0
I0
CI
CI
CI
HC
HC
HC
Submit Documentation Feedback
UH
UH
UH
U
U
I_
I_
I_
I_
I_
I_
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
rv
S_
S_
S_
S_
S_
S_
se
698
PM
PM
PM
PM
PM
PM
(re
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
O
_L
IN
A
TR
NS
CO
S_
PM
0_
I2S
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_I2S0_PMS_CONSTRAIN_LOCK Set this bit to lock I2S0’s GDMA permission configuration register. (R/W)
699
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
M
_P
Y_
Y
RA
RA
AR
R
AA
TA
T
DA
DA
HE
_3
0
CH
S_
S_
S_
S
AC
PM
PM
M
CA
_C
_P
_P
_
_
AM
AM
RA
RA
RA
RA
SR
SR
S
_S
_S
N_
N_
N_
IN
IN
IN
AI
AI
AI
RA
RA
RA
TR
TR
TR
T
ST
ST
NS
NS
NS
NS
N
N
CO
CO
CO
CO
CO
CO
S_
S_
S_
S_
S_
S_
PM
M
_P
_P
_P
_P
0_
0_
S0
S0
S0
S
2S
2S
Submit Documentation Feedback
I2
I2
I2
I2
I
I
I_
I_
I_
I_
I_
I_
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
700
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
O
_L
IN
A
TR
NS
CO
S_
PM
1_
I2S
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_I2S1_PMS_CONSTRAIN_LOCK Set this bit to lock I2S1’s GDMA permission configuration register.(R/W)
701
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
M
_P
Y_
Y
RA
RA
AR
R
AA
TA
T
DA
DA
HE
_3
0
CH
S_
S_
S_
S
AC
PM
PM
M
CA
_C
_P
_P
_
_
AM
AM
RA
RA
RA
RA
SR
SR
S
_S
_S
N_
N_
N_
IN
IN
IN
AI
AI
AI
RA
RA
RA
TR
TR
TR
T
ST
ST
NS
NS
NS
NS
N
N
CO
CO
CO
CO
CO
CO
S_
S_
S_
S_
S_
S_
PM
M
_P
_P
_P
_P
1_
1_
S1
S1
S1
S
2S
2S
Submit Documentation Feedback
I2
I2
I2
I2
I
I
I_
I_
I_
I_
I_
I_
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
702
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
CO
S_
M
_P
AES
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_AES_PMS_CONSTRAIN_LOCK Set this bit to lock AES’s GDMA permission configuration register. (R/W)
703
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
M
_P
Y_
AY
RA
RR
AR
AA
TA
AT
DA
ED
HE
0
CH
S_
S_
S_
S_
AC
M
CA
_C
_P
_P
_P
_P
_
AM
AM
AM
AM
RA
A
SR
SR
SR
SR
SR
_S
N_
N_
N_
N_
N
IN
AI
AI
AI
AI
AI
RA
TR
TR
TR
TR
T
ST
NS
NS
NS
NS
NS
N
CO
CO
CO
CO
CO
C
S_
S_
S_
S_
S_
S_
PM
PM
PM
PM
_P
_P
S_
S_
S_
S_
ES
ES
AE
AE
AE
AE
Submit Documentation Feedback
A
I_
I_
I_
I_
I_
I_
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
704
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
CO
S_
PM
A_
SH
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_SHA_PMS_CONSTRAIN_LOCK Set this bit to lock SHA’s GDMA permission configuration register. (R/W)
705
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
M
_P
Y_
AY
RA
RR
AR
AA
TA
AT
DA
ED
HE
0
CH
S_
S_
S_
S_
AC
PM
M
CA
_C
_P
_P
_P
_
_
AM
AM
AM
AM
AM
RA
SR
SR
SR
SR
SR
S
N_
N_
N_
N_
IN
IN
AI
AI
AI
AI
RA
A
TR
TR
TR
TR
TR
T
NS
NS
NS
NS
NS
NS
CO
CO
CO
CO
CO
_C
S_
S_
S_
S_
S_
S
PM
PM
PM
_P
_P
A_
A_
A_
A
HA
HA
SH
SH
SH
SH
Submit Documentation Feedback
_S
S
I_
I_
I_
I_
I
I
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
706
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
O
_L
IN
A
TR
NS
CO
S_
PM
C_
DA
_
ADC
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
Submit Documentation Feedback
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_ADC_DAC_PMS_CONSTRAIN_LOCK Set this bit to lock ADC_DAC’s GDMA permission configuration register. (R/W)
707
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
PM
Y_
_
AY
RA
RR
AR
AA
TA
AT
DA
ED
HE
0
CH
S_
S_
S_
S_
AC
PM
M
A
_C
_P
_P
_
_
AM
AM
AM
AM
RA
RA
SR
SR
SR
_S
_S
_S
N_
N_
N_
N
IN
IN
AI
AI
AI
AI
RA
RA
TR
TR
TR
TR
ST
ST
NS
NS
NS
N
N
CO
CO
CO
CO
C
C
S_
S_
S_
S_
S_
S_
PM
PM
PM
PM
_P
_P
C_
C_
C_
AC
AC
AC
DA
DA
DA
Submit Documentation Feedback
_D
_D
C_
C_
C_
C
DC
DC
AD
AD
AD
AD
_A
_A
I_
I_
I_
I
I
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
708
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
CO
S_
PM
T_
RM
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_RMT_PMS_CONSTRAIN_LOCK Set this bit to lock RMT’s GDMA permission configuration register. (R/W)
709
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
M
_P
Y_
AY
RA
RR
AR
AA
TA
AT
DA
ED
HE
0
CH
S_
S_
S_
S_
AC
PM
M
CA
_C
_P
_P
_P
_
_
AM
AM
AM
AM
AM
RA
SR
SR
SR
SR
S
_S
N_
N_
N_
N_
IN
IN
AI
AI
AI
AI
A
A
TR
TR
TR
TR
TR
TR
NS
NS
NS
NS
NS
NS
CO
CO
CO
CO
CO
_C
S_
S_
S_
S_
S
S
PM
PM
PM
P
_P
T_
T_
T_
T_
T_
T
RM
RM
RM
RM
Submit Documentation Feedback
_R
_R
I_
I_
I_
I_
I
I
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
710
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
CO
S_
M
_P
AM
_C
LCD
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
Submit Documentation Feedback
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_LCD_CAM_PMS_CONSTRAIN_LOCK Set this bit to lock LCD_CAM’s GDMA permission configuration register. (R/W)
711
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
M
_P
Y_
AY
RA
RR
AR
AA
TA
AT
DA
ED
HE
0
CH
S_
S_
S_
S_
AC
M
CA
_C
_P
_P
_P
_
_
AM
AM
RA
RA
RA
A
SR
SR
SR
_S
_S
_S
N_
N_
N_
N
IN
IN
AI
AI
AI
AI
RA
RA
TR
TR
TR
TR
ST
ST
NS
NS
NS
N
N
CO
CO
CO
CO
CO
C
S_
S_
S_
S_
S_
S_
M
PM
M
_P
_P
_P
_P
_P
_
M
AM
M
CA
CA
CA
CA
CA
Submit Documentation Feedback
_C
D_
D_
D_
D
CD
CD
LC
LC
LC
LC
_L
_L
I_
I_
I_
I
I
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
712
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
CO
S_
M
_P
USB
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_USB_PMS_CONSTRAIN_LOCK Set this bit to lock USB’s GDMA permission configuration register. (R/W)
713
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
M
_P
Y_
AY
RA
RR
AR
AA
TA
AT
DA
ED
HE
0
CH
S_
S_
S_
S_
AC
PM
M
CA
_C
_P
_P
_P
_
_
AM
AM
AM
AM
AM
RA
SR
SR
SR
SR
SR
S
N_
N_
N_
N_
IN
IN
AI
AI
AI
AI
A
A
TR
TR
TR
TR
TR
TR
NS
NS
NS
NS
NS
NS
CO
CO
CO
CO
CO
CO
S_
S_
S_
S_
S_
S_
M
PM
PM
_P
_P
_P
_
B_
B_
B
SB
US
US
US
US
US
Submit Documentation Feedback
U
I_
I_
I_
I_
I_
I_
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
714
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
CO
S_
M
_P
O
SDI
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_DMA_APBPERI_SDIO_PMS_CONSTRAIN_LOCK Set this bit to lock SDIO’s GDMA permission configuration register. (R/W)
715
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
M
_P
Y_
AY
RA
RR
AR
A
TA
TA
DA
DA
HE
0
CH
S_
S_
S_
S_
AC
PM
M
A
_C
_C
_P
_P
_P
_
AM
AM
AM
AM
RA
A
SR
SR
SR
SR
S
_S
N_
N_
N_
N_
N_
IN
AI
AI
AI
AI
AI
RA
TR
TR
TR
TR
TR
ST
NS
NS
NS
NS
N
N
CO
CO
CO
_C
_C
_C
S_
S_
S_
S
S
M
PM
PM
M
_P
_P
_P
_
_
IO
IO
IO
I
DI
DI
SD
SD
SD
SD
Submit Documentation Feedback
_S
_S
I_
I_
I_
I
I
ER
ER
ER
ER
ER
ER
BP
BP
BP
BP
BP
BP
AP
AP
AP
AP
AP
AP
A_
A_
A_
A_
A_
A_
d)
DM
DM
DM
DM
DM
DM
e
rv
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
(re
716
31 12 11 10 9 8 7 6 5 4 3 2 1 0
GoBack
Espressif Systems
CK
OL
R_
TO
NI
O
M
S_
PM
I_
ER
BP
AP
A_
)
M
d
ve
D
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
Submit Documentation Feedback
PMS_DMA_APBPERI_PMS_MONITOR_LOCK Set this bit to lock GDMA access interrupt configuration register. (R/W)
717
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
LR
TE N
_C
LA E
O E_
VI AT
R_ OL
TO VI
NI R_
M ITO
S_ ON
O
PM M
I_ S_
ER PM
BP RI_
AP E
A_ PBP
D M _A
S_ MA
d)
ve
PM _D
er
S
s
PM
(re
31 2 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 Reset
PMS_DMA_APBPERI_PMS_MONITOR_VIOLATE_CLR Set this bit to clear GDMA access interrupt status. (R/W)
PMS_DMA_APBPERI_PMS_MONITOR_VIOLATE_EN Set this bit to enable interrupt upon unauthorized GDMA access. (R/W)
718
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
LD
DR
R
O
AD
NT _W
S_
US
TU
AT
R
TA
ST
_S
_I
E_
TE
TE
R_ AT
LA
LA
TO IOL
O
O
VI
VI
V
R_
R_
TO
O
IT
NI
NI
PM ON
O
O
M
M
S_
S_
S_
M
BP PM
P
I_
I_
I_
ER
A_ PER
ER
BP
DM PB
AP
AP
_A
A_
PM MA
d)
DM
e
D
Submit Documentation Feedback
rv
S_
S_
S_
se
PM
PM
(re
31 25 24 3 2 1 0
0 0 0 0 0 0 0 0 0 0 Reset
719
PMS_DMA_APBPERI_PMS_MONITOR_VIOLATE_STATUS_WORLD Stores the world the CPU was in when the unauthorized GDMA access happened.
0b01: Secure World; 0b10: Non-secure World. (RO)
PMS_DMA_APBPERI_PMS_MONITOR_VIOLATE_STATUS_ADDR Stores the address that triggered the unauthorized GDMA ad-
dress. Note that this is an offset to 0x3c000000 and the unit is 16, which means the actual address should be 0x3c000000 +
PMS_DMA_APBPERI_PMS_MONITOR_VIOLATE_STATUS_ADDR * 16. (RO)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
NE
TE
R
BY
W
S_
S_
U
U
AT
AT
ST
ST
_
_
TE
TE
LA
LA
O
O
VI
VI
R_
R_
TO
TO
NI
NI
O
O
M
M
S_
S_
PM
MP
I_
I_
ER
ER
BP
BP
AP
AP
A_
A_
d)
DM
M
ve
Submit Documentation Feedback
D
S_
S_
ser
PM
PM
(re
31 17 16 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
720
PMS_DMA_APBPERI_PMS_MONITOR_VIOLATE_STATUS_WR Store the direction of unauthorized GDMA access. 1: write; 0: read. (RO)
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
O
E _C
IN
_L
IT
PL
S
A_
M
D
0_
AM
DR
0_
M
RA
_I
_X
RE
Submit Documentation Feedback
O
d
ve
C
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
721
PMS_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_LOCK Set this bit to lock internal SRAM’s split lines configuration. (R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
_6
_5
_4
_3
_2
_1
_0
DR
RY
RY
RY
RY
RY
RY
RY
O
O
AD
EG
EG
EG
EG
EG
IT
TE
TE
AT
AT
AT
PL
A
_C
_C
_C
_C
_C
_C
_C
_S
AM
AM
AM
AM
AM
RA
RA
SR
SR
SR
SR
SR
SR
_S
S
A_
A_
A_
A_
A_
A_
A_
A
DM
DM
DM
DM
_D
_D
_D
_D
0_
0_
0_
0_
0
0
M
AM
AM
AM
A
A
DR
DR
DR
DR
DR
DR
DR
_D
0_
0_
0_
0_
0_
0_
0_
0
M
AM
AM
M
RA
RA
RA
RA
RA
RA
R
R
_I
_I
_I
_I
_I
_I
_I
_I
_X
_X
_X
_X
_X
_X
_X
_X
RE
RE
RE
RE
RE
RE
RE
RE
d)
CO
CO
CO
CO
CO
CO
CO
CO
e
rv
S_
S_
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
PM
PM
(re
Submit Documentation Feedback
31 22 21 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_CORE_X_IRAM0_DRAM0_DMA_SRAM_CATEGORY_0 Configures Block2’s category field for the instruction and data split line
722
IRAM0_DRAM0_Split_Line. (R/W)
PMS_CORE_X_IRAM0_DRAM0_DMA_SRAM_CATEGORY_1 Configures Block3’s category field for the instruction and data split line
IRAM0_DRAM0_Split_Line. (R/W)
PMS_CORE_X_IRAM0_DRAM0_DMA_SRAM_CATEGORY_2 Configures Block4’s category field for the instruction and data split line
IRAM0_DRAM0_Split_Line. (R/W)
PMS_CORE_X_IRAM0_DRAM0_DMA_SRAM_CATEGORY_3 Configures Block5’s category field for the instruction and data split line
IRAM0_DRAM0_Split_Line. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_X_IRAM0_DRAM0_DMA_SRAM_CATEGORY_4 Configures Block6’s category field for the instruction and data split line
IRAM0_DRAM0_Split_Line. (R/W)
PMS_CORE_X_IRAM0_DRAM0_DMA_SRAM_CATEGORY_5 Configures Block7’s category field for the instruction and data split line
IRAM0_DRAM0_Split_Line. (R/W)
GoBack
PMS_CORE_X_IRAM0_DRAM0_DMA_SRAM_CATEGORY_6 Configures Block8’s category field for the instruction and data split line
IRAM0_DRAM0_Split_Line. (R/W)
PMS_CORE_X_IRAM0_DRAM0_DMA_SRAM_SPLITADDR Configures the split address of the instruction and data split line IRAM0_DRAM0_Split_Line.
(R/W)
Espressif Systems
_6
_5
_4
_3
_2
_1
_0
R
RY
RY
RY
RY
RY
RY
RY
DD
O
G
EG
EG
EG
EG
G
TA
TE
TE
TE
LI
T
CA
CA
CA
CA
CA
CA
CA
SP
0_
0_
0_
0_
0_
0_
0_
0_
E_
E_
E_
E_
E_
E_
E_
E_
IN
IN
IN
IN
IN
IN
IN
I
_L
_L
_L
_L
_L
_L
_L
_L
AM
AM
AM
AM
AM
AM
AM
A
SR
SR
SR
SR
SR
SR
SR
_S
0_
0_
0_
0_
0_
0_
0_
0
M
AM
M
RA
RA
RA
RA
RA
RA
RA
R
_I
_I
_I
_I
_I
_I
_I
_I
_X
_X
_X
_X
_X
_X
_X
_X
RE
RE
RE
RE
RE
RE
RE
RE
d)
CO
CO
CO
CO
CO
CO
CO
CO
e
rv
S_
S_
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
PM
PM
(re
31 22 21 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_CORE_X_IRAM0_SRAM_LINE_0_CATEGORY_0 Configures Block2’s category field for the instruction internal split line IRAM0_Split_Line_0. (R/W)
PMS_CORE_X_IRAM0_SRAM_LINE_0_CATEGORY_1 Configures Block3’s category field for the instruction internal split line IRAM0_Split_Line_0. (R/W)
723
PMS_CORE_X_IRAM0_SRAM_LINE_0_CATEGORY_2 Configures Block4’s category field for the instruction internal split line IRAM0_Split_Line_0. (R/W)
PMS_CORE_X_IRAM0_SRAM_LINE_0_CATEGORY_3 Configures Block5’s category field for the instruction internal split line IRAM0_Split_Line_0. (R/W)
PMS_CORE_X_IRAM0_SRAM_LINE_0_CATEGORY_4 Configures Block6’s category field for the instruction internal split line IRAM0_Split_Line_0. (R/W)
PMS_CORE_X_IRAM0_SRAM_LINE_0_CATEGORY_5 Configures Block7’s category field for the instruction internal split line IRAM0_Split_Line_0. (R/W)
PMS_CORE_X_IRAM0_SRAM_LINE_0_CATEGORY_6 Configures Block8’s category field for the instruction internal split line IRAM0_Split_Line_0. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_X_IRAM0_SRAM_LINE_0_SPLITADDR Configures the split address of the instruction internal split line IRAM0_Split_Line_0. (R/W)
GoBack
Espressif Systems
_6
_5
_4
_3
_2
_1
_0
R
RY
RY
RY
RY
RY
RY
RY
DD
O
G
EG
EG
EG
EG
G
TA
TE
TE
TE
LI
T
CA
CA
CA
CA
CA
CA
CA
SP
1_
1_
1_
1_
1_
1_
1_
1_
E_
E_
E_
E_
E_
E_
E_
E_
IN
IN
IN
IN
IN
IN
IN
I
_L
_L
_L
_L
_L
_L
_L
_L
AM
AM
AM
AM
AM
AM
AM
A
SR
SR
SR
SR
SR
SR
SR
_S
0_
0_
0_
0_
0_
0_
0_
0
M
AM
M
RA
RA
RA
RA
RA
RA
RA
R
_I
_I
_I
_I
_I
_I
_I
_I
_X
_X
_X
_X
_X
_X
_X
_X
RE
RE
RE
RE
RE
RE
RE
RE
d)
CO
CO
CO
CO
CO
CO
CO
CO
e
rv
S_
S_
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
PM
PM
(re
31 22 21 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_CORE_X_IRAM0_SRAM_LINE_1_CATEGORY_0 Configures Block2’s category field for the instruction internal split line IRAM0_Split_Line_1. (R/W)
PMS_CORE_X_IRAM0_SRAM_LINE_1_CATEGORY_1 Configures Block3’s category field for the instruction internal split line IRAM0_Split_Line_1. (R/W)
724
PMS_CORE_X_IRAM0_SRAM_LINE_1_CATEGORY_2 Configures Block4’s category field for the instruction internal split line IRAM0_Split_Line_1. (R/W)
PMS_CORE_X_IRAM0_SRAM_LINE_1_CATEGORY_3 Configures Block5’s category field for the instruction internal split line IRAM0_Split_Line_1. (R/W)
PMS_CORE_X_IRAM0_SRAM_LINE_1_CATEGORY_4 Configures Block6’s category field for the instruction internal split line IRAM0_Split_Line_1. (R/W)
PMS_CORE_X_IRAM0_SRAM_LINE_1_CATEGORY_5 Configures Block7’s category field for the instruction internal split line IRAM0_Split_Line_1. (R/W)
PMS_CORE_X_IRAM0_SRAM_LINE_1_CATEGORY_6 Configures Block8’s category field for the instruction internal split line IRAM0_Split_Line_1. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_X_IRAM0_SRAM_LINE_1_SPLITADDR Configures the split address of the instruction internal split line IRAM0_Split_Line_1. (R/W)
GoBack
Espressif Systems
_6
_5
_4
_3
_2
_1
_0
R
RY
RY
RY
RY
RY
RY
RY
DD
O
G
EG
EG
EG
EG
G
TA
TE
TE
TE
LI
AT
AT
AT
CA
CA
CA
CA
SP
_C
_C
_C
0_
0_
0_
0_
0_
_0
_0
_0
E_
E_
E_
E_
E_
E
E
IN
IN
IN
IN
IN
IN
IN
IN
_L
_L
_L
_L
_L
_L
_L
_L
AM
AM
AM
AM
AM
RA
RA
RA
SR
SR
SR
SR
SR
_S
S
A_
A_
A_
A_
A_
A_
A_
A
DM
DM
DM
DM
DM
DM
D
_D
0_
0_
0_
0_
0_
0_
0_
0
M
M
RA
RA
RA
RA
RA
RA
RA
RA
_D
_D
_D
_D
_D
_D
_D
_D
_X
_X
_X
_X
_X
_X
_X
_X
RE
RE
RE
RE
RE
RE
RE
RE
d)
CO
CO
CO
CO
CO
CO
CO
CO
e
rv
S_
S_
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
PM
PM
(re
Submit Documentation Feedback
31 22 21 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_0_CATEGORY_0 Configures Block2’s category field for data internal split line DRAM0_Split_Line_0. (R/W)
725
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_0_CATEGORY_1 Configures Block3’s category field for data internal split line DRAM0_Split_Line_0. (R/W)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_0_CATEGORY_2 Configures Block4’s category field for data internal split line DRAM0_Split_Line_0. (R/W)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_0_CATEGORY_3 Configures Block5’s category field for data internal split line DRAM0_Split_Line_0. (R/W)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_0_CATEGORY_4 Configures Block6’s category field for data internal split line DRAM0_Split_Line_0. (R/W)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_0_CATEGORY_5 Configures Block7’s category field for data internal split line DRAM0_Split_Line_0. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_0_CATEGORY_6 Configures Block8’s category field for data internal split line DRAM0_Split_Line_0. (R/W)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_0_SPLITADDR Configures the split address of data internal split line DRAM0_Split_Line_0. (R/W)
GoBack
Espressif Systems
_6
_5
_4
_3
_2
_1
_0
R
RY
RY
RY
RY
RY
RY
RY
DD
O
G
EG
EG
EG
EG
G
TA
TE
TE
TE
LI
AT
AT
AT
CA
CA
CA
CA
SP
_C
_C
_C
1_
1_
1_
1_
1_
_1
_1
_1
E_
E_
E_
E_
E_
E
E
IN
IN
IN
IN
IN
IN
IN
IN
_L
_L
_L
_L
_L
_L
_L
_L
AM
AM
AM
AM
AM
RA
RA
RA
SR
SR
SR
SR
SR
_S
S
A_
A_
A_
A_
A_
A_
A_
A
DM
DM
DM
DM
DM
DM
D
_D
0_
0_
0_
0_
0_
0_
0_
0
M
M
RA
RA
RA
RA
RA
RA
RA
RA
_D
_D
_D
_D
_D
_D
_D
_D
_X
_X
_X
_X
_X
_X
_X
_X
RE
RE
RE
RE
RE
RE
RE
RE
d)
CO
CO
CO
CO
CO
CO
CO
CO
e
rv
S_
S_
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
PM
PM
(re
Submit Documentation Feedback
31 22 21 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_1_CATEGORY_0 Configures Block2’s category field for data internal split line DRAM0_Split_Line_1. (R/W)
726
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_1_CATEGORY_1 Configures Block3’s category field for data internal split line DRAM0_Split_Line_1. (R/W)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_1_CATEGORY_2 Configures Block4’s category field for data internal split line DRAM0_Split_Line_1. (R/W)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_1_CATEGORY_3 Configures Block5’s category field for data internal split line DRAM0_Split_Line_1. (R/W)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_1_CATEGORY_4 Configures Block6’s category field for data internal split line DRAM0_Split_Line_1. (R/W)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_1_CATEGORY_5 Configures Block7’s category field for data internal split line DRAM0_Split_Line_1. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_1_CATEGORY_6 Configures Block8’s category field for data internal split line DRAM0_Split_Line_1. (R/W)
PMS_CORE_X_DRAM0_DMA_SRAM_LINE_1_SPLITADDR Configures the split address of data internal split line DRAM0_Split_Line_1. (R/W)
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
CO
S_
PM
0_
M
RA
_I
_X
RE
)
O
d
ve
C
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
Submit Documentation Feedback
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_LOCK Set this bit to lock the permission of CPU IBUS to internal SRAM. (R/W)
727
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
M
_P
_
AY
AY
RR
RR
A
AA
TA
AT
DA
ED
HE
0
H
S_
S_
S_
S_
AC
AC
S
PM
PM
PM
M
_C
P
_P
1_
1_
1_
1_
1_
1
1
D_
D_
D_
D_
D_
D_
D_
RL
RL
RL
RL
RL
RL
RL
O
O
_W
_W
_W
_W
_W
_W
_W
AM
AM
AM
M
RA
RA
A
O
SR
SR
SR
SR
R
S
N_
N_
N_
N_
N_
N_
N_
AI
AI
AI
AI
AI
AI
AI
TR
TR
TR
TR
TR
TR
TR
NS
NS
NS
NS
NS
NS
NS
CO
CO
CO
CO
CO
CO
CO
Submit Documentation Feedback
S_
S_
S_
S_
S_
S_
S_
PM
PM
PM
PM
PM
PM
PM
0_
0_
0_
0_
0_
0_
0_
M
AM
AM
M
RA
RA
RA
RA
RA
R
IR
_I
_I
_I
_I
_I
_I
_
_X
_X
_X
_X
_X
_X
_X
RE
RE
RE
RE
RE
RE
RE
d)
CO
CO
CO
CO
CO
CO
CO
728
ve
S_
S_
S_
S_
S_
S_
S_
r
se
PM
PM
PM
PM
PM
PM
PM
(re
31 21 20 18 17 15 14 12 11 9 8 6 5 3 2 0
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_SRAM_WORLD_1_PMS_0 Configures the permission of CPU’s IBUS to instruction region0 of SRAM from the
Non-secure World. (R/W)
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_SRAM_WORLD_1_PMS_1 Configures the permission of CPU’s IBUS to instruction region1 of SRAM from the
Non-secure World. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_SRAM_WORLD_1_PMS_2 Configures the permission of CPU’s IBUS to instruction region2 of SRAM from the
Non-secure World. (R/W)
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_SRAM_WORLD_1_PMS_3 Configures the permission of CPU’s IBUS to data region of SRAM from the Non-
secure World. It’s advised to configure this field to 0. (R/W)
GoBack
Continued on the next page...
Espressif Systems
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_ROM_WORLD_1_PMS Configures the permission of CPU’s IBUS to ROM from the Non-secure World. (R/W)
Submit Documentation Feedback
729
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
S_
S_
PM
M
_P
_
AY
AY
RR
RR
A
AA
TA
AT
DA
ED
HE
0
H
S_
S_
S_
S_
AC
AC
S
PM
PM
PM
M
_C
P
_P
0_
0_
0_
0_
0_
0
0
D_
D_
D_
D_
D_
D_
D_
RL
RL
RL
RL
RL
RL
RL
O
O
_W
_W
_W
_W
_W
_W
_W
AM
AM
AM
M
RA
RA
A
O
SR
SR
SR
SR
R
S
N_
N_
N_
N_
N_
N_
N_
AI
AI
AI
AI
AI
AI
AI
TR
TR
TR
TR
TR
TR
TR
NS
NS
NS
NS
NS
NS
NS
CO
CO
CO
CO
CO
CO
CO
Submit Documentation Feedback
S_
S_
S_
S_
S_
S_
S_
PM
PM
PM
PM
PM
PM
PM
0_
0_
0_
0_
0_
0_
0_
M
AM
AM
M
RA
RA
RA
RA
RA
R
IR
_I
_I
_I
_I
_I
_I
_
_X
_X
_X
_X
_X
_X
_X
RE
RE
RE
RE
RE
RE
RE
d)
CO
CO
CO
CO
CO
CO
CO
730
ve
S_
S_
S_
S_
S_
S_
S_
r
se
PM
PM
PM
PM
PM
PM
PM
(re
31 21 20 18 17 15 14 12 11 9 8 6 5 3 2 0
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_SRAM_WORLD_0_PMS_0 Configures the permission of CPU’s IBUS to instruction region0 of SRAM from the
Secure World. (R/W)
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_SRAM_WORLD_0_PMS_1 Configures the permission of CPU’s IBUS to instruction region1 of SRAM from the
Secure World. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_SRAM_WORLD_0_PMS_2 Configures the permission of CPU’s IBUS to instruction region2 of SRAM from the
Secure World. (R/W)
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_SRAM_WORLD_0_PMS_3 Configures the permission of CPU’s IBUS to data region of SRAM from the Secure
World. It’s advised to configure this field to 0. (R/W)
GoBack
Continued on the next page...
Espressif Systems
PMS_CORE_X_IRAM0_PMS_CONSTRAIN_ROM_WORLD_0_PMS Configures the permission of CPU’s IBUS to ROM from the Secure World. (R/W)
Submit Documentation Feedback
CK
LO
731
R_
TO
NI
O
M
S_
PM
0_
M
RA
_I
_0
RE
)
O
d
ve
C
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
ESP32-S3 TRM (Version 1.1)
PMS_CORE_0_IRAM0_PMS_MONITOR_LOCK Set this bit to lock CPU0’s IBUS interrupt configuration. (R/W)
GoBack
Espressif Systems
LR
TE N
_C
LA E
O E_
VI AT
R_ OL
TO VI
NI R_
M ITO
S_ ON
O
PM _M
0_ S
M PM
RA 0_
_0 AM
RE 0_IR
_I
CO E_
S_ OR
d)
ve
PM _C
er
S
s
PM
(re
31 2 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 Reset
PMS_CORE_0_IRAM0_PMS_MONITOR_VIOLATE_CLR Set this bit to clear the interrupt triggered when CPU0’s IBUS tries to access SRAM or ROM
unauthorized. (R/W)
732
PMS_CORE_0_IRAM0_PMS_MONITOR_VIOLATE_EN Set this bit to enable interrupt when CPU0’s IBUS tries to access SRAM or ROM unauthorized.
(R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
CK
O
_L
IN
A
TR
NS
CO
S_
PM
0_
M
RA
_D
_X
RE
)
O
d
ve
C
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
Submit Documentation Feedback
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_LOCK Set this bit to lock the permission of CPU DBUS to internal SRAM. (R/W)
733
ESP32-S3 TRM (Version 1.1)
GoBack
Submit Documentation Feedback
ESP32-S3 TRM (Version 1.1) 734 Espressif Systems
0
(re
0
28
27
PM
0x3
26
S_
CO
25
RE
PM
0x3
_X
_
24
S_ DR
CO
A
23
RE M
PM _ 0_
0x3
22
S_ X_ PM
CO DR S_
21
RE AM CO
PM 0_
0x3
_X NS
_ PM
20
S_ DR TR
CO S_ AI
19
RE AM CO N_
PM 0_ RO
0x3
S_ _D TR _W
CO RA S_ AI
17
RE M CO N_ O
PM 0_ R O
RL
0x3
_X NS
PM D_ M
16
S_ _D TR_W 1_
CO RA S_ AI PM
15
M CO N_ O
PM
RE
0_ SR RL S
D
0x3
_X NS
PM
14
S_ _D TR AM _0
CO RA S_ AI _W _P
M
13
RE M CO N_ O S
PM 0 N S R
0x3
_X _P S RA LD
M
12
S_ _D
S_
TR M _ 1_
CO RA AI _W
11
RE M CO N_ O CA
PM 0 N S R CH
0x3
_X _P S RA LD
M
10
S_ _D
S
TR M _ 1
ED
9
CO RA AI _W _C AT
M
_C N O AA
PM
RE
0_ O _S R
AC
0x3
_X NS RR
P M
RA LD HE
8
S_ _D
S
TR M _1 DA AY
_P
7
CO RA AI _W _P
M
_C N _ O M
TA
A M
PM
RE
0_ O SR RL S_ S_
0x3
RR
_X P
NS
A D 3 1
M
6
S_ _D TR M _ 1_
AY
_P
5
CO RA S_ AI _W
RE M CO N_ O PM M
PM 0_ SR RL S_ S_
0x3
_X P
NS
A D 2 0
M
4
S_ _D TR M _ 1_
3
CO RA S_ AI _W
RE M CO N_ O P M
PM 0_ SR RL S_
0x3
Register 15.46. PMS_CORE_X_DRAM0_PMS_CONSTRAIN_1_REG (0x0100)
_X NS
PM A D 1
2
S_ _D TR M _ 1_
1
CO RA S_ AI _W
M C N O PM
PM
RE
0_ O _S RL S_
0x3
_X NS
PM RA D 0
0
S_ _D
S_
TR M _ 0_
CO RA AI _W
M C N O C
RE
0_ O _S RL
AC
_X NS
Reset
_D PM TR
RA
M D _0
HE
DA
RA S_ AI _W _ TA
M CO N_ O CA
AR
0_ NS SR RL CH
PM AM D_ ED RA
TR Y_
S_ AI _W 0_ AT PM
CO N_ O PM AA
SR RL S_ RR S_
NS
AM D_ 3 AY 1
TR
AI _W 0_ _P
N_ O PM M
SR RL S_ S_
AM D_ 2 0
_W 0_
O P M
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_SRAM_WORLD_0_PMS_2 Configures the permission of CPU’s DBUS to data region1 of SRAM from the
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_SRAM_WORLD_0_PMS_1 Configures the permission of CPU’s DBUS to data region0 of SRAM from the
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_SRAM_WORLD_0_PMS_0 Configures the permission of CPU’s DBUS to instruction region of SRAM from
RL S_
D_ 1
0_
PM
S_
0
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_SRAM_WORLD_0_PMS_3 Configures the permission of CPU’s DBUS to data region2 of SRAM from the
Secure World. (R/W)
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_SRAM_WORLD_1_PMS_0 Configures the permission of CPU’s DBUS to instruction region of SRAM from
the Non-secure World. (R/W)
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_SRAM_WORLD_1_PMS_1 Configures the permission of CPU’s DBUS to data region0 of SRAM from the
735
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_SRAM_WORLD_1_PMS_2 Configures the permission of CPU’s DBUS to data region1 of SRAM from the
Non-secure World. (R/W)
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_SRAM_WORLD_1_PMS_3 Configures the permission of CPU’s DBUS to data region2 of SRAM from the
Non-secure World. (R/W)
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_ROM_WORLD_0_PMS Configures the permission of CPU’s DBUS to ROM from the Secure World. (R/W)
PMS_CORE_X_DRAM0_PMS_CONSTRAIN_ROM_WORLD_1_PMS Configures the permission of CPU’s DBUS to ROM from the Non-secure World.
GoBack
(R/W)
Espressif Systems
CK
LO
R_
TO
NI
O
M
S_
PM
0_
M
RA
_D
_0
RE
)
O
d
ve
C
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
Submit Documentation Feedback
PMS_CORE_0_DRAM0_PMS_MONITOR_LOCK Set this bit to lock CPU0’s DBUS interrupt configuration. (R/W)
736
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
LR
TE N
_C
LA E
O E_
VI AT
R_ OL
TO VI
NI R_
M ITO
S_ ON
O
PM _M
0_ S
M PM
RA 0_
_D M
_0 RA
RE 0_D
CO E_
S_ OR
d)
ve
PM _C
er
S
s
PM
(re
31 2 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 Reset
PMS_CORE_0_DRAM0_PMS_MONITOR_VIOLATE_CLR Set this bit to clear the interrupt triggered when CPU0’s dBUS tries to access SRAM or ROM
unauthorized. (R/W)
737
PMS_CORE_0_DRAM0_PMS_MONITOR_VIOLATE_EN Set this bit to enable interrupt when CPU0’s dBUS tries to access SRAM or ROM unauthorized.
(R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
CO
S_
M
_P
IF
_P
_0
RE
)
O
d
ve
C
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
Submit Documentation Feedback
PMS_CORE_0_PIF_PMS_CONSTRAIN_LOCK Set this bit to lock Core0’s permission to different peripherals. (R/W)
738
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
_0
_1
UX
1
PI
PI
RT
RT
O
_M
S0
0S
0S
PI
UA
UA
RT
IO
I2
G
0_
0_
0_
0_
0_
0_
0_
0_
D_
D_
D_
D_
D_
D_
D_
D_
RL
RL
RL
RL
RL
RL
RL
R
O
O
W
W
N_
N_
N_
N_
N_
N_
N_
N_
AI
AI
AI
AI
AI
AI
AI
AI
TR
TR
TR
TR
TR
TR
TR
ST
NS
NS
NS
NS
NS
NS
NS
N
CO
CO
CO
CO
CO
CO
CO
CO
S_
S_
S_
S_
S_
S_
S_
S_
M
PM
PM
PM
M
_P
_P
_P
_P
_P
F_
_
IF
IF
IF
IF
IF
IF
IF
PI
_P
_P
_P
_P
_P
_P
_P
_
_0
_0
_0
_0
_0
_0
_0
_0
RE
RE
RE
RE
RE
RE
RE
RE
d)
d)
CO
CO
CO
CO
CO
CO
CO
CO
e
ve
rv
S_
S_
S_
S_
S_
S_
S_
S_
er
se
s
PM
PM
PM
PM
PM
PM
PM
PM
(re
(re
Submit Documentation Feedback
31 30 29 28 27 18 17 16 15 14 13 8 7 6 5 4 3 2 1 0
PMS_CORE_0_PIF_PMS_CONSTRAIN_WORLD_0_UART Configures CPU0’s permission to access UART0 from the Secure World. (R/W)
739
PMS_CORE_0_PIF_PMS_CONSTRAIN_WORLD_0_G0SPI_1 Configures CPU0’s permission to access SPI1 from the Secure World. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_WORLD_0_G0SPI_0 Configures CPU0’s permission to access SPI0 from the Secure World. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_WORLD_0_GPIO Configures CPU0’s permission to access GPIO from the Secure World. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_WORLD_0_RTC Configures CPU0’s permission to access eFuse Controller & PMU from the Secure World. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_WORLD_0_IO_MUX Configures CPU0’s permission to access IO_MUX from the Secure World. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_0_PIF_PMS_CONSTRAIN_WORLD_0_I2S0 Configures CPU0’s permission to access I2S0 from the Secure World. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_WORLD_0_UART1 Configures CPU0’s permission to access UART1 from the Secure World. (R/W)
GoBack
Espressif Systems
• Registers PMS_CORE_0_PIF_PMS_CONSTRAIN_n_REG (n: 5 - 8) are for configuring the CPU0’s permission to different peripherals from the Non-secure World.
• Detailed information are already provided in Table 15-17. For brevity, these registers are not described separately in this section.
0
D_
D_
RL
RL
O
O
W
W
_
R_
DR
DD
AD
TA
LT
PL
SP
_S
Submit Documentation Feedback
T_
T
AS
AS
CF
CF
RT
RT
N_
_
IN
AI
A
TR
TR
NS
NS
CO
O
740
C
S_
S_
PM
M
_P
_
IF
IF
_P
_P
_0
_0
RE
RE
d)
CO
CO
e
rv
S_
S_
se
PM
PM
(re
31 22 21 11 10 0
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCFAST_SPLTADDR_WORLD_0 Configures the address to split RTC Fast Memory into two regions in Non-
ESP32-S3 TRM (Version 1.1)
secure World for CPU0. Note you should use address offset, instead of absolute address. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCFAST_SPLTADDR_WORLD_1 Configures the address to split RTC Fast Memory into two regions in Secure
World for CPU0. Note you should use address offset, instead of absolute address. (R/W)
GoBack
Espressif Systems
H
L
L
1_
1_
0_
0_
D_
D_
D_
D_
RL
RL
RL
RL
O
O
_W
_W
W
T_
T_
ST
ST
AS
AS
FA
FA
CF
CF
TC
TC
RT
RT
_R
_R
N_
N_
IN
IN
AI
AI
RA
RA
TR
TR
T
T
NS
NS
NS
NS
CO
CO
CO
CO
S_
S_
S_
S_
PM
PM
M
_P
_P
_
F_
IF
IF
IF
PI
_P
_P
_P
_
_0
_0
_0
_0
RE
RE
RE
RE
d)
CO
CO
CO
CO
e
rv
S_
S_
S_
S_
se
Submit Documentation Feedback
PM
PM
PM
PM
(re
31 12 11 9 8 6 5 3 2 0
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCFAST_WORLD_0_L Configures the permission of CPU0 from Non-secure World to the lower region of RTC
Fast Memory. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCFAST_WORLD_0_H Configures the permission of CPU0 from Non-secure World to the higher region of RTC
Fast Memory. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCFAST_WORLD_1_L Configures the permission of CPU0 from Secure World to the lower region of RTC Fast
Memory. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCFAST_WORLD_1_H Configures the permission of CPU0 from Secure World to the higher region of RTC Fast
ESP32-S3 TRM (Version 1.1)
Memory. (R/W)
GoBack
Espressif Systems
0
D_
D_
RL
RL
O
O
W
W
R_
R_
DD
D
AD
TA
LT
PL
SP
_S
_
_0
_0
W
W
O
O
SL
SL
TC
TC
R
_R
N_
IN
AI
A
TR
TR
NS
NS
CO
O
C
S_
S_
PM
M
_P
_
IF
IF
Submit Documentation Feedback
_P
_P
_0
_0
RE
RE
d)
CO
CO
e
rv
S_
S_
se
PM
PM
(re
31 22 21 11 10 0
742
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_0_SPLTADDR_WORLD_0 Configures the address to split RTC Slow Memory 0 into two regions in
Secure World for CPU0. Note you should use address offset, instead of absolute address. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_0_SPLTADDR_WORLD_1 Configures the address to split RTC Slow Memory 0 into two regions in
Non-secure World for CPU0. Note you should use address offset, instead of absolute address. (R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
H
L
L
1_
1_
0_
0_
D_
D_
D_
D_
RL
RL
RL
RL
O
O
_W
_W
_W
_W
_0
_0
_0
_0
W
W
O
LO
LO
SL
SL
CS
CS
TC
TC
T
RT
_R
_R
N_
N_
IN
N
I
AI
RA
RA
TR
TR
T
T
NS
NS
NS
NS
CO
CO
CO
CO
S_
S_
S_
S_
PM
PM
PM
M
_P
_
F_
_
IF
IF
IF
PI
_P
_P
_P
_
_0
_0
_0
_0
RE
RE
RE
RE
d)
CO
CO
CO
CO
Submit Documentation Feedback
e
rv
S_
S_
S_
S_
se
PM
PM
PM
PM
(re
31 12 11 9 8 6 5 3 2 0
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_0_WORLD_0_L Configures the permission of CPU0 from Secure World to the lower region of RTC
Slow Memory 0. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_0_WORLD_0_H Configures the permission of CPU0 from Secure World to the higher region of RTC
Slow Memory 0. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_0_WORLD_1_L Configures the permission of CPU0 from Non-secure World to the lower region of
RTC Slow Memory 0. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_0_WORLD_1_H Configures the permission of CPU0 from Non-secure World to the higher region of
RTC Slow Memory 0. (R/W)
GoBack
Espressif Systems
0
D_
D_
RL
RL
O
O
W
W
R_
R_
DD
D
AD
TA
LT
PL
SP
_S
_
_1
_1
W
W
O
O
SL
SL
TC
TC
R
_R
N_
IN
AI
A
TR
TR
NS
NS
CO
O
C
S_
S_
PM
M
_P
_
IF
IF
Submit Documentation Feedback
_P
_P
_0
_0
RE
RE
d)
CO
CO
e
rv
S_
S_
se
PM
PM
(re
31 22 21 11 10 0
744
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_1_SPLTADDR_WORLD_0 Configures the address to split RTC Slow Memory 1 into two regions in
Secure World for CPU0. Note you should use address offset, instead of absolute address. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_1_SPLTADDR_WORLD_1 Configures the address to split RTC Slow Memory 1 into two regions in
Non-secure World for CPU0. Note you should use address offset, instead of absolute address. (R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
H
L
L
1_
1_
0_
0_
D_
D_
D_
D_
RL
RL
RL
RL
O
O
_W
_W
_W
_W
_1
_1
_1
_1
W
W
O
LO
LO
SL
SL
CS
CS
TC
TC
T
RT
_R
_R
N_
N_
IN
N
I
AI
RA
RA
TR
TR
T
T
NS
NS
NS
NS
CO
CO
CO
CO
S_
S_
S_
S_
PM
PM
PM
M
_P
_
F_
_
IF
IF
IF
PI
_P
_P
_P
_
_0
_0
_0
_0
RE
RE
RE
RE
d)
CO
CO
CO
CO
Submit Documentation Feedback
e
rv
S_
S_
S_
S_
se
PM
PM
PM
PM
(re
31 12 11 9 8 6 5 3 2 0
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_1_WORLD_0_L Configures the permission of CPU0 from Non-secure World to the lower region of
RTC Slow Memory 1. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_1_WORLD_0_H Configures the permission of CPU0 from Non-secure World to the higher region of
RTC Slow Memory 1. (R/W)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_1_WORLD_1_L Configures the permission of CPU0 from Secure World to the lower region of RTC
Slow Memory 1. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_0_PIF_PMS_CONSTRAIN_RTCSLOW_1_WORLD_1_H Configures the permission of CPU0 from Secure World to the higher region of RTC
Slow Memory 1. (R/W)
GoBack
Espressif Systems
CK
LO
N_
AI
TR
NS
CO
S_
PM
N_
IO
EG
_R
_0
RE
)
O
d
ve
C
S_
r
se
PM
(re
31 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_CORE_0_REGION_PMS_CONSTRAIN_LOCK Set this bit to lock Core0’s permission to peripheral regions. (R/W)
746
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
0
_1
_9
_7
_3
_1
_0
A_
A_
A_
A_
A_
EA
EA
EA
EA
EA
EA
RE
RE
RE
RE
RE
AR
AR
AR
AR
AR
_A
_A
A
0_
0_
0_
0_
0_
0_
0_
0_
_0
0
D_
D_
D_
D_
D_
D_
D_
D_
D_
D_
LD
RL
RL
RL
RL
RL
RL
RL
RL
RL
RL
R
O
O
W
_W
W
N_
N_
N_
N_
N_
N_
N_
N_
N_
N_
N
AI
AI
AI
AI
AI
AI
AI
AI
AI
AI
AI
TR
TR
TR
TR
TR
TR
TR
TR
TR
TR
TR
NS
NS
NS
NS
NS
NS
NS
NS
NS
NS
NS
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
C
S_
S_
S_
S_
S_
S_
S_
S_
S_
S_
S_
PM
PM
PM
PM
PM
PM
PM
PM
PM
_P
P
N_
N_
N_
N_
N_
N_
N_
N_
N
N
IO
IO
IO
IO
IO
IO
IO
IO
IO
IO
IO
G
EG
EG
EG
EG
EG
EG
EG
EG
EG
EG
E
_R
_R
_R
_R
_R
_R
_R
_R
_R
_R
_R
_0
_0
_0
_0
_0
_0
_0
_0
_0
_0
_0
RE
RE
RE
RE
RE
RE
RE
RE
RE
RE
RE
d)
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
e
rv
Submit Documentation Feedback
S_
S_
S_
S_
S_
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
PM
PM
PM
PM
PM
(re
31 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 Reset
747
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_0 Configures CPU0’s permission to Peri Region0 from the Secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_1 Configures CPU0’s permission to Peri Region1 from the Secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_2 Configures CPU0’s permission to Peri Region2 from the Secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_3 Configures CPU0’s permission to Peri Region3 from the Secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_4 Configures CPU0’s permission to Peri Region4 from the Secure World (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_5 Configures CPU0’s permission to Peri Region5 from the Secure World. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_6 Configures CPU0’s permission to Peri Region6 from the Secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_7 Configures CPU0’s permission to Peri Region7 from the Secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_8 Configures CPU0’s permission to Peri Region8 from the Secure World. (R/W)
GoBack
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_9 Configures CPU0’s permission to Peri Region9 from the Secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_0_AREA_10 Configures CPU0’s permission to Peri Region10 from the Secure World. (R/W)
Espressif Systems
0
_1
_9
_7
_3
_1
_0
A_
A_
A_
A_
A_
EA
EA
EA
EA
EA
EA
RE
RE
RE
RE
RE
AR
AR
AR
AR
AR
_A
_A
A
1_
1_
1_
1_
1_
1_
1_
1_
_1
1
D_
D_
D_
D_
D_
D_
D_
D_
D_
D_
LD
RL
RL
RL
RL
RL
RL
RL
RL
RL
RL
R
O
O
W
_W
W
N_
N_
N_
N_
N_
N_
N_
N_
N_
N_
N
AI
AI
AI
AI
AI
AI
AI
AI
AI
AI
AI
TR
TR
TR
TR
TR
TR
TR
TR
TR
TR
TR
NS
NS
NS
NS
NS
NS
NS
NS
NS
NS
NS
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
C
S_
S_
S_
S_
S_
S_
S_
S_
S_
S_
S_
PM
PM
PM
PM
PM
PM
PM
PM
PM
_P
P
N_
N_
N_
N_
N_
N_
N_
N_
N
N
IO
IO
IO
IO
IO
IO
IO
IO
IO
IO
IO
G
EG
EG
EG
EG
EG
EG
EG
EG
EG
EG
E
_R
_R
_R
_R
_R
_R
_R
_R
_R
_R
_R
_0
_0
_0
_0
_0
_0
_0
_0
_0
_0
_0
RE
RE
RE
RE
RE
RE
RE
RE
RE
RE
RE
d)
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
e
rv
Submit Documentation Feedback
S_
S_
S_
S_
S_
S_
S_
S_
S_
S_
S_
se
PM
PM
PM
PM
PM
PM
PM
PM
PM
PM
PM
(re
31 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 Reset
748
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_0 Configures CPU0’s permission to Peri Region0 from the Non-secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_1 Configures CPU0’s permission to Peri Region1 from the Non-secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_2 Configures CPU0’s permission to Peri Region2 from the Non-secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_3 Configures CPU0’s permission to Peri Region3 from the Non-secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_4 Configures CPU0’s permission to Peri Region4 from the Non-secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_5 Configures CPU0’s permission to Peri Region5 from the Non-secure World. (R/W)
ESP32-S3 TRM (Version 1.1)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_6 Configures CPU0’s permission to Peri Region6 from the Non-secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_7 Configures CPU0’s permission to Peri Region7 from the Non-secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_8 Configures CPU0’s permission to Peri Region8 from the Non-secure World. (R/W)
GoBack
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_9 Configures CPU0’s permission to Peri Region9 from the Non-secure World. (R/W)
PMS_CORE_0_REGION_PMS_CONSTRAIN_WORLD_1_AREA_10 Configures CPU0’s permission to Peri Region10 from the Non-secure World. (R/W)
Espressif Systems
0
R_
ADD
N_
AI
TR
NS
CO
S_
MP
N_
IO
EG
_R
_0
RE
d)
CO
e
rv
S_
se
PM
(re
31 30 29 0
Submit Documentation Feedback
0 0 0 Reset
CK
LO
R_
TO
NI
O
M
S_
PM
_
IF
_P
ESP32-S3 TRM (Version 1.1)
_0
RE
)
O
d
ve
C
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_CORE_0_PIF_PMS_MONITOR_LOCK Set this bit to lock CPU0’s PIF interrupt configuration. (R/W)
GoBack
Espressif Systems
LR
TE N
_C
LA E
O E_
VI AT
R_ OL
TO VI
NI R_
M ITO
S_ N
M O
O
_P _M
IF S
_P PM
_0 IF_
RE 0_P
CO E_
S_ OR
d)
ve
PM _C
er
S
s
PM
(re
31 2 1 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 Reset
PMS_CORE_0_PIF_PMS_MONITOR_VIOLATE_CLR Set this bit to clear the interrupt triggered when CPU0’s PIF bus tries to access RTC memory or
peripherals unauthorized. (R/W)
750
PMS_CORE_0_PIF_PMS_MONITOR_VIOLATE_EN Set this bit to enable interrupt when CPU0’s PIF bus tries to access RTC memory or peripherals
unauthorized. (R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
LR
TE N
_C
LA _E
IO TE
_V L A
RD IO
O _V
NW RD
N O WO
R_ ON
TO N
NI R_
M ITO
S_ N
M O
O
_P _M
IF S
_P PM
_0 IF_
RE 0_P
CO E_
S_ OR
d)
ve
PM _C
er
Submit Documentation Feedback
S
s
PM
(re
31 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 Reset
751
PMS_CORE_0_PIF_PMS_MONITOR_NONWORD_VIOLATE_CLR Set this bit to clear the interrupt triggered when CPU0’s PIF bus tries to access RTC
memory or peripherals using unsupported data type. (R/W)
PMS_CORE_0_PIF_PMS_MONITOR_NONWORD_VIOLATE_EN Set this bit to enable interrupt when CPU0’s PIF bus tries to access RTC memory or
peripherals using unsupported data type. (R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
CK
O
_L
E
ID
RR
VE
_O
SE
BA
EC
_V
_0
RE
)
O
d
ve
C
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
Submit Documentation Feedback
PMS_CORE_0_VECBASE_OVERRIDE_LOCK Set this bit to lock CPU0 VECBASE configuration register. (R/W)
752
K
AS
M
D_
RL
O
_W
SE
BA
EC
_V
_0
RE
)
O
d
ve
C
S_
r
ESP32-S3 TRM (Version 1.1)
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
PMS_CORE_0_VECBASE_WORLD_MASK Set this bit so CPU uses WORLD0_VALUE in Secure World and Non-secure World. Clear this bit so CPU uses
WORLD0_VALUE in Secure World and WORLD1_VALUE in Non-secure World. (R/W)
GoBack
Espressif Systems
UE
AL
_V
D0
RL
L
O
SE
W
E_
E_
ID
ID
RR
RR
VE
VE
_O
O
E_
SE
AS
A
CB
CB
E
E
_V
_V
_0
_0
RE
RE
d)
CO
CO
e
rv
S_
S_
se
PM
PM
(re
31 24 23 22 21 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 Reset
PMS_CORE_0_VECBASE_OVERRIDE_WORLD0_VALUE Configures the VECBASE value for the Secure World. (R/W)
753
GoBack
Espressif Systems
UE
AL
_V
D1
RL
O
W
E_
ID
RR
VE
O
E_
AS
ECB
_V
_0
RE
d)
CO
e
rv
S_
se
PM
(re
31 22 21 0
Submit Documentation Feedback
0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_CORE_0_VECBASE_OVERRIDE_WORLD1_VALUE Configures the VECBASE value for the Non-secure World. (R/W)
754
CK
LO
_
RY
DA
UN
BO
A_
DM
d )
ve
E
ESP32-S3 TRM (Version 1.1)
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
GoBack
Espressif Systems
0
_
RY
DA
UN
BO
A_
M
d)
ED
e
rv
S_
se
PM
(re
31 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_EDMA_BOUNDARY_0 Configures the ending address of external SRAM area0. For details, see Table 15-21. (R/W)
Submit Documentation Feedback
1
Y_
755
AR
D
UN
BO
A_
M
d)
ED
e
rv
S_
se
PM
(re
31 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x2000 Reset
PMS_EDMA_BOUNDARY_1 Configures the ending address of external SRAM area1. For details, see Table 15-21. (R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
2
_
RY
DA
UN
BO
A_
M
d)
ED
e
rv
S_
se
PM
(re
31 14 13 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x2000 Reset
PMS_EDMA_BOUNDARY_2 Configures the ending address of external SRAM area2. For details, see Table 15-21. (R/W)
Submit Documentation Feedback
CK
756
O
_L
I2
SP
S_
PM
A_
DM
d )
ve
E
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_EDMA_PMS_SPI2_LOCK Set this bit to lock the register that configures SPI2’s access to external SRAM. (R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
R2
R1
TT
TT
_A
_A
I2
I2
SP
SP
S_
S_
PM
PM
A_
A_
M
M
d)
ED
ED
ve
S_
S_
er
s
PM
PM
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 Reset
PMS_EDMA_PMS_SPI2_ATTR1 Configures SPI2’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
Submit Documentation Feedback
PMS_EDMA_PMS_SPI2_ATTR2 Configures SPI2’s access to external SRAM Area1. For details, see Table 15-22. (R/W)
CK
O
_L
I3
SP
S_
PM
A_
DM
d )
ve
E
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
ESP32-S3 TRM (Version 1.1)
PMS_EDMA_PMS_SPI3_LOCK Set this bit to lock the register that configures SPI3’s access to external SRAM. (R/W)
GoBack
Espressif Systems
R2
R1
TT
TT
_A
_A
I3
I3
SP
SP
S_
S_
PM
PM
A_
A_
M
M
d)
ED
ED
ve
S_
S_
er
s
PM
PM
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 Reset
PMS_EDMA_PMS_SPI3_ATTR1 Configures SPI3’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
Submit Documentation Feedback
PMS_EDMA_PMS_SPI3_ATTR2 Configures SPI3’s access to external SRAM Area1. For details, see Table 15-22. (R/W)
CK
LO
0_
CI
UH
S_
PM
A_
DM
d )
ve
E
S_
r
se
PM
31
(re 1 0
ESP32-S3 TRM (Version 1.1)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_EDMA_PMS_UHCI0_LOCK Set this bit to lock the register that configures UHCI0’s access to external SRAM. (R/W)
GoBack
Espressif Systems
1
TR
TR
AT
AT
0_
0_
CI
CI
UH
UH
S_
S_
PM
PM
A_
A_
M
M
d)
ED
ED
ve
S_
S_
er
s
PM
PM
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 Reset
PMS_EDMA_PMS_UHCI0_ATTR1 Configures UHCI0’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
Submit Documentation Feedback
PMS_EDMA_PMS_UHCI0_ATTR2 Configures UHCI0’s access to external SRAM Area1. For details, see Table 15-22. (R/W)
759
CK
O
_L
S0
I2
S_
PM
A_
DM
d )
ve
E
S_
r
se
PM
(re
31 1 0
ESP32-S3 TRM (Version 1.1)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_EDMA_PMS_I2S0_LOCK Set this bit to lock the register that configures I2S0’s access to external SRAM. (R/W)
GoBack
Espressif Systems
R2
R1
TT
TT
_A
_A
S0
S0
I2
I2
S_
S_
PM
PM
A_
A_
M
M
d)
ED
ED
ve
S_
S_
er
s
PM
PM
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 Reset
PMS_EDMA_PMS_I2S0_ATTR1 Configures I2S0’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
Submit Documentation Feedback
PMS_EDMA_PMS_I2S0_ATTR2 Configures I2S0’s access to external SRAM Area1. For details, see Table 15-22. (R/W)
CK
O
_L
S1
I2
S_
PM
A_
DM
d )
ve
E
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
ESP32-S3 TRM (Version 1.1)
PMS_EDMA_PMS_I2S1_LOCK Set this bit to lock the register that configures I2S1’s access to external SRAM. (R/W)
GoBack
Espressif Systems
R2
R1
TT
TT
_A
_A
S1
S1
I2
I2
S_
S_
PM
PM
A_
A_
M
M
d)
ED
ED
ve
S_
S_
er
s
PM
PM
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 Reset
PMS_EDMA_PMS_I2S1_ATTR1 Configures I2S1’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
Submit Documentation Feedback
PMS_EDMA_PMS_I2S1_ATTR2 Configures I2S1’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
CK
O
_L
M
CA
D_
LC
S_
PM
A_
DM
d )
ve
E
S_
r
se
PM
(re
31 1 0
ESP32-S3 TRM (Version 1.1)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_EDMA_PMS_LCD_CAM_LOCK Set this bit to lock the register that configures Camera-LCD Controller’s access to external SRAM. (R/W)
GoBack
Espressif Systems
R2
R1
TT
TT
_A
_A
M
M
CA
CA
D_
D_
LC
LC
S_
S_
PM
PM
A_
A_
M
M
d)
ED
ED
ve
S_
S_
er
s
PM
PM
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 Reset
PMS_EDMA_PMS_LCD_CAM_ATTR1 Configures Camera-LCD Controller’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
Submit Documentation Feedback
PMS_EDMA_PMS_LCD_CAM_ATTR2 Configures Camera-LCD Controller’s access to external SRAM Area1. For details, see Table 15-22. (R/W)
762
CK
LO
S_
AE
S_
PM
A_
DM
d )
ve
E
S_
r
se
PM
(re
31 1 0
ESP32-S3 TRM (Version 1.1)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_EDMA_PMS_AES_LOCK Set this bit to lock the register that configures AES’s access to external SRAM. (R/W)
GoBack
Espressif Systems
1
TR
TR
AT
AT
S_
S_
AE
AE
S_
S_
PM
PM
A_
A_
M
M
d)
ED
ED
ve
S_
S_
er
s
PM
PM
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 Reset
PMS_EDMA_PMS_AES_ATTR1 Configures AES’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
Submit Documentation Feedback
PMS_EDMA_PMS_AES_ATTR2 Configures AES’s access to external SRAM Area1. For details, see Table 15-22. (R/W)
CK
LO
A_
SH
S_
PM
A_
DM
d )
ve
E
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
ESP32-S3 TRM (Version 1.1)
PMS_EDMA_PMS_SHA_LOCK Set this bit to lock the register that configures SHA’s access to external SRAM. (R/W)
GoBack
Espressif Systems
1
TR
TR
AT
AT
A_
A_
SH
SH
S_
S_
PM
PM
A_
A_
M
M
d)
ED
ED
ve
S_
S_
er
s
PM
PM
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 Reset
PMS_EDMA_PMS_SHA_ATTR1 Configures SHA’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
Submit Documentation Feedback
PMS_EDMA_PMS_SHA_ATTR2 Configures SHA’s access to external SRAM Area1. For details, see Table 15-22. (R/W)
CK
LO
C_
DA
C_
AD
S_
PM
A_
DM
d )
ve
E
S_
r
se
PM
(re
31 1 0
ESP32-S3 TRM (Version 1.1)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_EDMA_PMS_ADC_DAC_LOCK Set this bit to lock the register that configures ADC Controller’s access to external SRAM. (R/W)
GoBack
Espressif Systems
1
TR
TR
AT
AT
C_
C_
DA
DA
C_
C_
AD
AD
S_
S_
PM
PM
A_
A_
M
M
d)
ED
ED
ve
S_
S_
er
s
PM
PM
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 Reset
PMS_EDMA_PMS_ADC_DAC_ATTR1 Configures ADC Controller’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
Submit Documentation Feedback
PMS_EDMA_PMS_ADC_DAC_ATTR2 Configures ADC Controller’s access to external SRAM Area1. For details, see Table 15-22. (R/W)
765
CK
LO
T_
RM
S_
PM
A_
DM
d )
ve
E
S_
r
se
PM
(re
31 1 0
ESP32-S3 TRM (Version 1.1)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_EDMA_PMS_RMT_LOCK Set this bit to lock the register that configures Remote Control Peripheral’s access to external SRAM. (R/W)
GoBack
Espressif Systems
1
TR
TR
AT
AT
T_
T_
RM
RM
S_
S_
PM
PM
A_
A_
M
M
d)
ED
ED
ve
S_
S_
er
s
PM
PM
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 Reset
PMS_EDMA_PMS_RMT_ATTR1 Configures Remote Control Peripheral’s access to external SRAM Area0. For details, see Table 15-22. (R/W)
Submit Documentation Feedback
PMS_EDMA_PMS_RMT_ATTR2 Configures Remote Control Peripheral’s access to external SRAM Area1. For details, see Table 15-22. (R/W)
N
_E
LK
_C
EG
d )
ve
R
S_
r
se
PM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
PMS_REG_CLK_EN Set this bit to enable the clock gating function. (R/W)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
RE
R TO
D
R _W DS
RL
DR
NT S A
O
AD
_I TU LO
VI AT TA _W
S_
TE TA S_
S
TU
TU
LA S U
O E_ T
TA
TA
_S
_S
R_ OL E_S
TE
TE
TO V I T
LA
LA
NI R_ OLA
O
O
VI
VI
M ITO VI
R_
R_
_
S_ ON OR
TO
TO
PM _M IT
NI
NI
0_ S N
O
M M O
O
M
M
S_
S_
RA _ S_
PM
PM
M
_0 AM _P
P
0_
0_
RE IR 0
0
AM
M
RA
CO _ A
IR
R
_I
S_ R _I
_I
_
_
_0
S_ E_0
0
0
Submit Documentation Feedback
PM _C E_
RE
E
PM OR
S OR
d)
CO
O
e
PM C
rv
S_
S_
se
PM
PM
(re
31 29 28 5 4 3 2 1 0
0 0 0 0 0 0 0 0 Reset
767
PMS_CORE_0_IRAM0_PMS_MONITOR_VIOLATE_INTR Stores the interrupt status of CPU0’s unauthorized IBUS access. (RO)
PMS_CORE_0_IRAM0_PMS_MONITOR_VIOLATE_STATUS_WR Indicates the access direction. 1: write; 0: read. Note that this field is only valid when
PMS_CORE_0_IRAM0_PMS_MONITOR_VIOLATE_STATUS_LOADSTORE is 1. (RO)
PMS_CORE_0_IRAM0_PMS_MONITOR_VIOLATE_STATUS_WORLD Stores the world the CPU0 was in when the illegal access happened. 0b01: Secure
ESP32-S3 TRM (Version 1.1)
PMS_CORE_0_IRAM0_PMS_MONITOR_VIOLATE_STATUS_ADDR Stores the address that CPU0’s IBUS was trying to access unautho-
rized. Note that this is an offset to 0x40000000 and the unit is 4, which means the actual address should be 0x40000000 +
PMS_CORE_0_IRAM0_PMS_MONITOR_VIOLATE_STATUS_ADDR * 4. (RO)
GoBack
Espressif Systems
R _LO D
L
DR
CK
_I TU OR
AD
W
S_
S_
NT S
TU
TU
TA
TA
TE TA
_S
_S
LA S
O E_
TE
NI R_ ATE
VI T
LA
A
M TO IOL
R _ OL
O
VI
TO VI
V
R_
R_
O
TO
T
NI
NI
I
S_ ON
O
O
M
PM _M
S_
S_
0_ S
PM
_0 RA PM
M PM
0_
0_
RA 0_
M
_D M
RA
RA
_D
_D
RE D _
_0
_0
0
CO _
RE
RE
E
S_ OR
d)
Submit Documentation Feedback
CO
CO
e
PM _C
rv
S_
S_
se
S
PM
PM
PM
(re
31 26 25 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 Reset
768
PMS_CORE_0_DRAM0_PMS_MONITOR_VIOLATE_STATUS_LOCK Flags atomic access. 1: atomic access; 0: not atomic access. (RO)
PMS_CORE_0_DRAM0_PMS_MONITOR_VIOLATE_STATUS_WORLD Stores the world the CPU was in when the unauthorized access happened. 0b01:
Secure World; 0b10: Non-secure World. (RO)
PMS_CORE_0_DRAM0_PMS_MONITOR_VIOLATE_STATUS_ADDR Stores the address that CPU0’s dBUS was trying to access unautho-
rized. Note that this is an offset to 0x3c000000 and the unit is 16, which means the actual address should be 0x3c000000 +
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
N
EE
T
R
BY
_W
S_
US
U
AT
AT
ST
ST
_
_
TE
TE
LA
LA
O
O
VI
VI
R_
R_
TO
TO
NI
NI
O
O
M
M
S_
S_
PM
PM
0_
0_
M
M
RA
RA
_D
_D
_0
_0
RE
RE
Submit Documentation Feedback
d)
CO
O
ve
C
S_
S_
ser
PM
PM
(re
31 17 16 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
769
GoBack
Espressif Systems
_0
HW LD
TE
RT
R
ZE
RI
O
PO
HW
SI
_H
R _H
S_
S_
US
NT S
TU
_I TU
AT
AT
TA
TE TA
ST
ST
_S
LA S
_
E_
O E_
TE
TE
AT
VI AT
LA
LA
R_ OL
O
IO
VI
VI
TO VI
_V
R_
NI R_
R
R
TO
TO
M ITO
T
NI
NI
NI
S_ N
_P M O
M O
O
M
_P _M
S_
S_
S _
IF S
_0 _PM
PM
_P PM
F_
_0 IF_
IF
IF
I
_P
_P
_P
RE P _
S_ E_0
_0
0
CO E_
RE
RE
PM OR
S_ OR
d)
CO
CO
ve
PM C
Submit Documentation Feedback
S_
S_
S_
er
s
PM
PM
PM
(re
31 8 7 6 5 4 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
770
PMS_CORE_0_PIF_PMS_MONITOR_VIOLATE_INTR Stores the interrupt status of PIF bus unauthorized access. (RO)
PMS_CORE_0_PIF_PMS_MONITOR_VIOLATE_STATUS_HSIZE Stores the data type of unauthorized access. 0: byte; 1: half-word; 2: word. (RO)
PMS_CORE_0_PIF_PMS_MONITOR_VIOLATE_STATUS_HWORLD Stores the world the CPU was in when the unauthorized access happened. 01:
Secure World; 10: Non-secure World. (RO)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
R
DD
HA
S_
TU
TA
_S
TE
LA
O
VI
R_
TO
NI
O
M
S_
M
_P
IF
_P
_0
RE
CO
S_
Submit Documentation Feedback
PM
31 0
0 Reset
771
PMS_CORE_0_PIF_PMS_MONITOR_VIOLATE_STATUS_HADDR Stores the address that CPU0’s PIF bus was trying to access unauthorized. (RO)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
D
RL
ZE
O
HW
SI
NT _H
S_
US
TU
AT
R
TA
ST
_S
_I
E_
TE
TE
T
LA
RD LA
LA
IO
IO
IO
_V
NW _V
_V
RD
D
NO OR
O
O
NW
W
TO ON
NO
_N
R_
R_
R
TO
TO
NI
NI
NI
O
_P MO
O
M
M
S_
S_
S_
M
_0 _PM
M
_P
Submit Documentation Feedback
IF
IF
I
_P
_P
_P
_0
_0
RE
RE
RE
d)
CO
CO
CO
ve
S_
S_
S_
ser
PM
PM
PM
(re
31 5 4 3 2 1 0
772
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
PMS_CORE_0_PIF_PMS_MONITOR_NONWORD_VIOLATE_INTR Stores the interrupt status of PIF upsupported data type. (RO)
PMS_CORE_0_PIF_PMS_MONITOR_NONWORD_VIOLATE_STATUS_HSIZE Stores the data type when the unauthorized access happened. (RO)
PMS_CORE_0_PIF_PMS_MONITOR_NONWORD_VIOLATE_STATUS_HWORLD Stores the world the CPU was in when the unauthorized access hap-
pened. 01: Secure World; 10: Non-secure World. (RO)
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
DR
AD
H
S_
TU
TA
_S
TE
LA
IO
_V
RD
O
NW
NO
R_
TO
NI
O
M
S_
M
_P
IF
Submit Documentation Feedback
_P
_0
RE
CO
S_
PM
31 0
773
0 Reset
PMS_CORE_0_PIF_PMS_MONITOR_NONWORD_VIOLATE_STATUS_HADDR Stores the address that CPU0’s PIF bus was trying to access using un-
supported data type. (RO)
TE
d)
DA
e
rv
S_
se
PM
(re
31 28 27 0
0 0 0 0 0x2101280 Reset
GoBack
Espressif Systems
CK
LO
S_
M
_P
EM
M
T_
EX
L_
R
d )
CT
r ve
B_
se
AP
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
APB_CTRL_EXT_MEM_PMS_LOCK Set this bit to lock the permission configuration related to external memory. (R/W)
Submit Documentation Feedback
TR
_ AT
En
AC
_
SH
LA
_F
RL
d)
CT
ve
er
B_
s
AP
(re
31 9 8 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0xff Reset
ESP32-S3 TRM (Version 1.1)
GoBack
Espressif Systems
S
R_
DD
A
n_
CE
A
H_
AS
FL
RL_
CT
B_
AP
31 0
0x000000 Reset
APB_CTRL_FLASH_ACE0_ADDR_S Configure the starting address of Flash Region n. The size of each region should be aligned to 64 KB. (R/W)
Submit Documentation Feedback
E
IZ
S
n_
CE
_A
SH
LA
_F
RL
d )
CT
ve
r
B_
se
AP
(re
31 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x1000 Reset
ESP32-S3 TRM (Version 1.1)
APB_CTRL_FLASH_ACEn_SIZE Configure the length of Flash Region n. The size of each region should be aligned to 64 KB. (R/W)
GoBack
Espressif Systems
TR
AT
n_
CE
_A
AM
SR
L_
R
d)
CT
ve
er
B_
s
AP
(re
31 9 8 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0xff Reset
_S
DR
AD
n_
CE
_A
RAM
_S
RL
CT
B_
AP
31 0
0x000000 Reset
ESP32-S3 TRM (Version 1.1)
APB_CTRL_SRAM_ACEn_ADDR_S Configure the starting address of SRAM Region n. The size of each region should be aligned to 64 KB. (R/W)
GoBack
Espressif Systems
E
IZ
S
n_
CE
_A
AM
SR
RL_
d)
CT
ve
er
B_
s
AP
(re
31 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x1000 Reset
APB_CTRL_SRAM_ACEn_SIZE Configure the lenght of SRAM Region n. The size of each region should be aligned to 64 KB. (R/W)
Submit Documentation Feedback
T_ R
T
CD
EC CL
IN
T_
EJ T_
EC
_R JEC
EJ
EM RE
_R
_M _
EM
PI EM
_M
_S M_
PI
RL PI
_S
CT _S
RL
B_ RL
d)
CT
AP CT
ve
er
B_
B_
s
AP
AP
(re
31 7 6 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 0 0 Reset
ESP32-S3 TRM (Version 1.1)
APB_CTRL_SPI_MEM_REJECT_INT Indicates exception accessing external memory and triggers an interrupt. (RO)
APB_CTRL_SPI_MEM_REJECT_CDE Stores the exception cause: invalid region, overlapping regions, illegal write, illegal read and illegal instruction exe-
cution. (RO)
GoBack
Espressif Systems
DR
AD
T_
EC
EJ
_R
EM
M
I_
SP
RL_
CT
B_
AP
31 0
0x000000 Reset
GoBack
16 World Controller (WCL) GoBack
16.1 Introduction
ESP32-S3 allows users to allocate its hardware and software resource into Secure World (World0) and
Non-secure World (World1), thus protecting resource from unauthorized access (read or write), and from
malicious attacks such as malware, hardware-based monitoring, hardware-level intervention, and so on. CPUs
can switch between Secure World and Non-secure World with the help of the World Controller.
By default, all resource in ESP32-S3 are shareable. Users can allocate the resource into two worlds by managing
respective permission (For details, please refer to Chapter 15 Permission Control (PMS)). This chapter only
introduces the World Controller and how CPUs can switch between worlds with the help of World
Controller.
16.2 Features
ESP32-S3’s World Controller:
• Controls the CPUs to switch between the Secure World and Non-secure World
– Performs all confidential operations, such as fingerprint identification, password processing, data
encryption and decryption, security authentication, etc.
– Performs other operations, such as user operation and different applications, etc.
ESP32-S3’s CPU and slave devices are both configurable with permission to either Secure World and/or
Non-Secure World:
– By default, CPU runs in Secure World after power-up, then can be programmed to switch between
two worlds.
• All slave devices (including peripherals* and memories) can be configured to be accessible from the Secure
World and/or the Non-secure World:
– Secure World Access: this slave can be called from Secure World only, meaning it can be accessed
only when CPU is in Secure World;
– Non-secure World Access: this slave can be called from Non-secure World only, meaning it can be
accessed only when CPU is in Non-secure World.
– Note that a slave can be configured to be accessible from both Secure World and Non-secure World
simultaneously.
Note:
* World Controller itself is a peripheral, meaning it also can be granted with Secure World access and/or Non-secure World
access, just like all other peripherals. However, to secure the world switch mechanism, World Controller should not be
accessible from Non-secure world. Therefore, world controller should not be granted with Non-secure World access,
preventing any modification to world controller from the Non-secure World.
1. First, CPU notifies the salve about its own world information;
2. Second, slave decides if it can be accessed by CPU based on the CPU’s world information and it’s own
world permission configuration.
• if not allowed, then this slave will not respond to CPU and trigger an interrupt.
In this way, the resources in the Secure World will not be illegally accessible by the Non-secure World in an
unauthorized way.
WORLD_PREPARE=1<<1
Function A Entry addr configuration
WORLD_TRIGGER_ADDR
WORLD_UPDATA
…
…
…
asm(“memw”)
Function A Entry Non-secure World
ESP32-S3’s CPU only needs to complete the following steps to switch from Secure World to Non-secure
World:
However, it’s worth noting that you cannot call the application in Non-secure world immediately after configuring
the World Controller. For reasons such as CPU pre-indexed addressing and pipeline, it is possible that the CPU
have already executed the application in Non-secure World before the World Controller configuration is effective,
meaning the CPU runs unsecured application in the Secure World.
Therefore, you need to make sure the CPU only calls applications in the Non-secure world after the World
Controller configuration takes effect. This can be guaranteed by declaring the applications in the Nonsecure
World as “noinline”.
The steps to configure the World Controller to switch the CPU from the Secure World to the Non-secure World
are described below:
1. Write 0x2 to Register WCL_CORE_m_WORLD_PERPARE_REG, indicating the CPU needs to switch to the
Non-secure World.
Note:
• After the configuration, you also need to use assembly instruction memw (memory wait) to clear write_buffer. For
details, see Section 16.4.3.
Afterwards, the World Controller keeps monitoring if CPU is executing the configured address of the application
in Non-secure World. CPU switches to the Non-secure World once it executes the configured address, and
executes the applications in the Non-secure World.
• Keeps monitoring until the CPU executes the configured address and switches to the Non-secure World.
• The World Controller can only switch from the Secure World to Non-secure World once per configuration.
Therefore, the World Controller needs to be configured again after each world switch to prepare it for the
next world switch.
CPU can only switch from Non-secure World to Secure World via Interrupts (or Exceptions). After configuring
the World Controller, the CPU can switch back Non-secure World to Secure World upon the configured Interrupt
trigger.
2. Configure Registers WCL_CORE_m_ENTRY_n_ADDR_REG (n: 1-13) as the entry address of interrupts (or
exceptions).
• Note that all of ESP32-S3’s interrupts and exceptions are using VecBase + offset as its address.
Therefore, you need to configure WCL_CORE_m_ENTRY_n_ADDR_REG (n: 1-13) whenever you
modify the VecBase.
• Bit x controls the entry monitoring of Entry x (WCL_CORE_m_ENTRY_x_ADDR_REG). You can enable
monitoring for more than one entry.
– 0: Disable monitoring
– 1: Enable monitoring
• Register WCL_CORE_m_ENTRY_CHECK_REG is effective after configuration all the time till it’s
disabled, meaning you don’t need to configure this register every time after each world switch.
3. Afterwards, the CPU will switch its data bus to the other world once it detects the agreed
sequences configured in WCL_CORE_m_MESSAGE_MAX_REG are being written to the agreed
address configured in WCL_CORE_m_MESSAGE_ADDR_REG.
StatusTableX
5 4 1 0
current from_entry from_world
• WCL_CORE_m_CURRENT_n: indicates if CPU is at the interrupt monitored at the current entry. When
CPU is at the interrupt monitored at Entry x,
– WCL_CORE_m_CURRENT_x is updated to 1,
1. At the beginning:
1. First, an interrupt occurs at Entry 9. At this time, CPU executes to the entry address of this interrupt. The
World Switch Log Table is updated as described in Figure 16-4:
• WCL_CORE_m_STATUSTABLE9_REG
2. Then another interrupt with higher priority occurs at Entry 1. At this time, CPU executes to the entry
address of this interrupt. The World Switch Log Table is updated again as described in Figure 16-5:
• WCL_CORE_m_STATUSTABLE1_REG
• WCL_CORE_m_STATUSTABLE9_REG
3. Then the last interrupt with highest priority occurs at Entry 4. At this time, CPU executes to the entry
address of interrupt 4. The World Switch Log Table is updated again as described in Figure 16-6:
• WCL_CORE_m_STATUSTABLE4_REG
• WCL_CORE_m_STATUSTABLE1_REG
2. Read 1 from Field WCL_CORE_m_FROM_ENTRY_4, and understand the CPU was at an interrupt
monitored at Entry 1.
3. Read 9 from Field WCL_CORE_m_FROM_ENTRY_1, and understand the CPU was at an interrupt
monitored at Entry 9.
4. Read 0 from WCL_CORE_m_FROM_ENTRY_9, and understand CPU wasn’t at any interrupt. Then read 1
from WCL_CORE_m_FROM_WORLD_9, and understand CPU was in Non-secure World at the begining.
1. An interrupt A occurs. CPU jumps to interrupt A entry, which triggers world switches.
3. Then the CPU drops the current interrupt A and switches to the higher priority interrupt B first.
4. After returning from interrupt B, CPU resumes executing the instruction at interrupt A entry, which triggers
world switches again.
In this way, CPU executes the entry address of the first interrupt twice (one time when the interrupt occurs and
another time when CPU returns to this interrupt), and thus triggering the world switches twice, which inevitably
leads to multiple records tracked for the same interrupt in World Switch Log and prevents the CPU from restoring
to the previous world correctly.
To avoid multiple records being logged incorrectly in the World Switch Log, the following actions must be
completed:
• During the design stage, add two assembly instruction NOP.N (No Operation) to the vector entrance of all
interrupts and exceptions.
• During the execution, update the address where the interrupts return to following the instructions described
in 16.5.4.2.
In this way, when returning to the interrupt at Entry B, the interrupt monitored at Entry A will not return to the entry
address of Entry B, but the address after the NOP instructions, thus preventing to trigger the world controller
unexpectedly. Also, the NOP instruction doesn’t do anything, so nothing is changed even when the NOP
instructions are skipped.
(b) Go to Step 5.
* If it points to the first NOP.N instruction of the interrupt at Entry B, then add 4 to the return
address of the interrupt at Entry A.
* If it points to the second NOP.N instruction of the interrupt at Entry B, then add 2 to the
return address of the interrupt at Entry A.
• If world switch required, then switch the CPU to the other world following instructions described
in Section 16.4, then go to Step 6.
Note:
Steps 4 and 5 should not be interrupted by any interrupts. Therefore, users need to disable all the interrupts before these
steps, and enable interrupts once done.
Normally, we can configure some CPU registers to mask different kinds of interrupts, but NMI interrupt is not one
of them. To mask an NMI interrupt, you need to configure the interrupt sources, which is more complicated. For
details, see Chapter 9 Interrupt Matrix (INTERRUPT).
World Controller has implemented some hardware mechanism to simplify the process to mask NMI interrupts
for:
• All applications:
– Configure WCL_CORE_m_NMI_MASK:
* 1: Enable
* 0: Disable
• Some applications:
3. Write any value to WCL_CORE_m_NMI_MASK_ENABLE to start masking NMI interrupts till the
address configured in WCL_CORE_m_NMI_MASK_TRIGGER_ADDR.
Note:
• Only one of the above two methods should be used at the same time.
• The configuration to mask NMI interrupts is effective all the time until trigger address executes. Therefore, you need
to configure the world controller to mask NMI interrupts again once trigger address executes.
Note that, the table below only lists the registers for CPU0. CPU1 shares exactly the same set of registers.
Adding 0x0400 to the offset of the equivalent of CPU0 register gives you address for CPU1 registers.
For example, the offset for CPU0 register WCL_CORE_0_ENTRY_CHECK_REG is 0x007C, the offset for CPU1
equivalent WCL_CORE_1_ENTRY_CHECK_REG should be 0x007C + 0x0400, which is 0x047C.
16.8 Registers
The addresses in this section are relative to the World Controller base address provided in Table 4-3 in Chapter 4
System and Memory.
Note that, the section below only lists the registers for CPU0. CPU1 shares exactly the same set of registers.
Adding 0x0400 to the offset of the equivalent of CPU0 register gives you address for CPU1 registers.
For example, the offset for CPU0 register WCL_CORE_0_ENTRY_CHECK_REG is 0x007C, the offset for CPU1
equivalent WCL_CORE_1_ENTRY_CHECK_REG should be 0x007C + 0x0400, which is 0x047C.
DR
AD
_
_n
RY
NT
_E
_0
RE
O
_C
CL
W
31 0
0 Reset
K
EC
CH
Y_
TR
EN
_
_0
RE
)
)
O
ed
d
ve
_C
rv
r
CL
se
se
(re
(re
W
31 14 13 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 Reset
WCL_CORE_0_ENTRY_CHECK Set this bit to enable CPU0 switching from Non-secure World to
Secure world upon the monitored address. (R/W)
DR
AD
E_
G
SA
ES
_M
_0
RE
O
_C
CL
W
31 0
0 Reset
AX
M
E_
G
SA
ES
_M
_0
RE
d)
O
e
_C
rv
CL
se
(re
W
31 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
E E
AS AS
PH PH
TA SS
CH
DA E
EC
E_ DR
AT
P
G D
EX
M
SA E_A
E_
E_
ES AG
AG
G
SA
_M S
S
_0 ES
ES
ES
RE M
_M
O _0_
_
_0
_0
_C RE
RE
RE
d)
CL O
O
ve
W _C
_C
_C
er
CL
CL
CL
s
(re
W
31 7 6 5 4 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
WCL_CORE_0_MESSAGE_EXPECT Indicates the number to be written next for CPU0. This field is
only used for debugging. (RO)
n
n
D_
Y_
RL
TR
n
T_
O
N
_W
EN
_E
M
M
RR
O
U
FR
_C
_F
0_
_0
_0
_
RE
RE
RE
)
O
ed
_C
_C
_C
rv
CL
CL
CL
se
(re
31 6 5 4 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 0 Reset
WCL_CORE_0_FROM_WORLD_n Stores the world info for CPU0 before entering entry n. (R/W)
WCL_CORE_0_FROM_ENTRY_n Stores the previous entry info for CPU0 before entering entry n.
(R/W)
NT
RE
UR
_C
E
BL
TA
US
AT
_ST
_0
RE
d)
)
O
ed
ve
_C
rv
er
CL
se
s
(re
(re
W
31 14 13 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
R
DD
_A
ER
G
IG
TR
D_
RL
O
W
_
_0
RE
O
_C
CL
W
31 0
0 Reset
O
ve
_C
r
CL
se
(re
31 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
WCL_CORE_0_WORLD_PREPARE Write 0x2 to this field to ready CPU0 for world switch from Se-
cure World to Non-secure World. This field is only used for debugging.(R/W)
E
D AT
UP
_
_0
RE
O
_C
CL
W
31 0
0 Reset
WCL_CORE_0_UPDATE Write any value to this field to indicate the completion of CPU0 configuration
for switching from Secure World to Non-Secure World. (WO)
EL
NC
CA
D_
RL
O
_W
_0
RE
O
_C
CL
W
31 0
0 Reset
WCL_CORE_0_WORLD_CANCEL Write any value to this filed to cancel the CPU0 configuration for
switching from Secure World to Non-Secure World. (WO)
0
M
RA
_I
D
RL
O
_W
_0
RE
d)
O
e
_C
rv
CL
se
(re
31 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
WCL_CORE_0_WORLD_IRAM0 Stores the world info of CPU0’s instruction bus. This field is only
used for debugging. (R/W)
F
PI
0_
AM
DR
D_
RL
O
_W
_0
RE
)
CO
ed
rv
_
CL
se
(re
W
31 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
WCL_CORE_0_WORLD_DRAM0_PIF Stores the world info of CPU0’s data bus and peripheral bus.
This field is only used for debugging. (R/W)
E
AS
PH
D_
RL
O
_W
_0
RE
)
O
d
ve
_C
er
CL
s
(re
W
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
31 0
0 Reset
WCL_CORE_0_NMI_MASK_ENABLE Write any value to this field to start CPU0 masking any NMI
interrupt. (WO)
R
DD
_A
ER
G
IG
TR
K_
AS
M
I_
M
_N
_0
RE
O
_C
CL
W
31 0
0 Reset
E
BL
SA
DI
K_
AS
M
I_
NM
_
_0
RE
O
_C
CL
W
31 0
0 Reset
WCL_CORE_0_NMI_MASK_DISABLE Write any value to this field so CPU0 checks NMI masking.
(WO)
31 0
0 Reset
WCL_CORE_0_NMI_MASK_CANCEL Write any value to this field to cancel CPU0’s NMI masking.
(WO)
K
AS
M
I_
NM
0_
_
RE
d)
O
ve
_C
er
CL
s
(re
W
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
WCL_CORE_0_NMI_MASK Set this bit to mask all the NMI interrupts in CPU0. (R/W)
SE
HA
K_P
AS
M
I_
M
_N
_0
RE
d)
O
ve
_C
r
CL
se
(re
W
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
17.1 Overview
The ESP32-S3 integrates a large number of peripherals, and enables the control of individual peripherals to
achieve optimal characteristics in performance-vs-power-consumption scenarios. Specifically, ESP32-S3 has a
various of system configuration registers that can be used for the chip’s clock management (clock gating), power
management, and the configuration of peripherals and core-system modules. This chapter lists all these system
registers and their functions.
17.2 Features
ESP32-S3 system registers can be used to control the following peripheral blocks and core modules:
• Clock
• Software Interrupt
• Low-power management
• CPU Control
• In register APB_CTRL_CLKGATE_FORCE_ON_REG:
– Setting different bits of the APB_CTRL_ROM_CLKGATE_FORCE_ON field forces on the clock gates
of different blocks of Internal ROM 0 and Internal ROM 1.
– Setting different bits of the APB_CTRL_SRAM_CLKGATE_FORCE_ON field forces on the clock gates
of different blocks of Internal SRAM.
– This means when the respective bits of this register are set to 1, the clock gate of the corresponding
ROM or SRAM blocks will always be on. Otherwise, the clock gate will turn on automatically when the
corresponding ROM or SRAM blocks are accessed and turn off automatically when the corresponding
ROM or SRAM blocks are not accessed. Therefore, it’s recommended to configure these bits to 0 to
lower power consumption.
• In register APB_CTRL_MEM_POWER_DOWN_REG:
– Setting different bits of the APB_CTRL_ROM_POWER_DOWN field sends different blocks of Internal
ROM 0 and Internal ROM 1 into retention state.
– Setting different bits of the APB_CTRL_SRAM_POWER_DOWN field sends different blocks of Internal
SRAM into retention state.
– The “Retention” state is a low-power state of a memory block. In this state, the memory block still
holds all the data stored but cannot be accessed, thus reducing the power consumption. Therefore,
you can send a certain block of memory into the retention state to reduce power consumption if you
know you are not going to use such memory block for some time.
• In register APB_CTRL_MEM_POWER_UP_REG:
– By default, all memory enters low-power state when the chip enters the Light-sleep mode.
– Setting different bits of the APB_CTRL_ROM_POWER_UP field forces different blocks of Internal ROM
0 and Internal ROM 1 to work as normal (do not enter the retention state) when the chip enters
Light-sleep.
– Setting different bits of the APB_CTRL_SRAM_POWER_UP field forces different blocks of Internal
SRAM to work as normal (do not enter the retention state) when the chip enters Light-sleep.
For detailed information about the controlling bits of different blocks, please see Table 17-1 below.
Internal Memory Lowest Address1 Highest Address1 Lowest Address2 Highest Address2 Controlling Bit
Internal ROM 0 0x4000_0000 0x4003_FFFF - - Bit0
Internal ROM 1 0x4004_0000 0x4004_FFFF - - Bit1
Internal ROM 2 0x4005_0000 0x4005_FFFF 0x3FF0_0000 0x3FF0_FFFF Bit2
SRAM Block0 0x4037_0000 0x4037_3FFF - - Bit0
SRAM Block1 0x4037_4000 0x4037_7FFF - - Bit1
SRAM Block2 0x4037_8000 0x4037_FFFF 0x3FC8_8000 0x3FC8_FFFF Bit2
SRAM Block3 0x4038_0000 0x4038_FFFF 0x3FC9_0000 0x3FC9_FFFF Bit3
SRAM Block4 0x4039_8000 0x4039_FFFF 0x3FCA_0000 0x3FCA_FFFF Bit4
SRAM Block5 0x403A_C000 0x403A_FFFF 0x3FCB_C000 0x3FCB_FFFF Bit5
SRAM Block6 0x403B_0000 0x403B_FFFF 0x3FCC_0000 0x3FCC_FFFF Bit6
SRAM Block7 0x403C_0000 0x403C_FFFF 0x3FCD_4000 0x3FCD_FFFF Bit7
SRAM Block8 0x403D_0000 0x403D_BFFF 0x3FCE_8000 0x3FCE_FFFF Bit8
SRAM Block9 - - 0x3FCF_0000 0x3FCF_7FFF Bit9
SRAM Block10 - - 0x3FCF_8000 0x3FCF_FFFF Bit10
For detailed information about the controlling bits of different blocks, please see Table 17-1 below.
• Setting the SYSTEM_RSA_MEM_PD bit to send the RSA memory into retention state. This bit has the
lowest priority, meaning it can be masked by the SYSTEM_RSA_MEM_FORCE_PU field. This bit is invalid
when the Digital Signature (DS) occupies the RSA.
• Setting the SYSTEM_RSA_MEM_FORCE_PU bit to force the RSA memory to work as normal when the
chip enters light sleep. This bit has the second highest priority, meaning it overrides the
SYSTEM_RSA_MEM_PD field.
• Setting the SYSTEM_RSA_MEM_FORCE_PD bit to send the RSA memory into retention state. This bit has
the highest priority, meaning it sends the RSA memory into retention state regardless of the
SYSTEM_RSA_MEM_FORCE_PU field.
• SYSTEM_CPU_PER_CONF_REG
• SYSTEM_SYSCLK_CONF_REG
• SYSTEM_BT_LPCK_DIV_FRAC_REG
• SYSTEM_CPU_INTR_FROM_CPU_0_REG
• SYSTEM_CPU_INTR_FROM_CPU_1_REG
• SYSTEM_CPU_INTR_FROM_CPU_2_REG
• SYSTEM_CPU_INTR_FROM_CPU_3_REG
• SYSTEM_CACHE_CONTROL_REG
• SYSTEM_EDMA_CTRL_REG
• SYSTEM_PERIP_CLK_EN0_REG
• SYSTEM_PERIP_RST_EN0_REG
• SYSTEM_PERIP_CLK_EN1_REG
• SYSTEM_PERIP_RST_EN1_REG
Note:
1. Setting the clock enable register to 1 enables the clock, and to 0 disables the clock;
2. Setting the reset enabling register to 1 resets a peripheral, and to 0 disables the reset.
3. Reset registers cannot be cleared by hardware. Therefore, SW reset clear is required after setting the reset registers.
4. UART memory is shared by all UART peripherals, meaning having any active UART peripherals will prevent the
UART memory from entering the clock-gated state.
5. When DMA is required for peripheral communications, for example, UCHI0, SPI, I2S, LCD_CAM, AES, SHA and
ADC, DMA clock should also be enabled.
7. Resetting this bit also resets the AES, SHA, and RSA accelerators.
• SYSTEM_CORE_1_CONTROL_0_REG
– Setting the SYSTEM_CONTROL_CORE_1_RUNSTALL bit stalls CPU1. When this bit is set, CPU1 will
finish the on-going task and stalls.
17.5 Registers
In this section, the addresses of all the registers starting with SYSTEM are relative to the base address of system
registers provided in Table 4-3 in Chapter 4 System and Memory; and those starting with APB are relative to the
base address of APB control also provided in Table 4-3 in Chapter 4 System and Memory.
G
IN
ET
ES
_R
_1
EN
RE
L
E_
AL
CO
AT
ST
G
UN
LK
L_
CO 1_C
_R
O
_1
_
R
RE
RE
NT
NT _CO
L_
O
L
_C RO
RO
_C
NT
d)
EM
O
e
_C
rv
ST
EM
EM
se
ST
ST
SY
(re
SY
SY
31 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 Reset
31 0
0 Reset
N
O
E_
RC
UM
O
_N
PE SE E_F
AY
L
_ D
EL
SE
L
EQ MO
_D
D_
_F IT_
TI
O
AI
RI
LL A
_W
_P _W
R
PU
PU
EM P
_C
ST _C
_C
)
ed
EM
SY EM
EM
rv
ST
ST
ST
se
SY
SY
SY
(re
31 8 7 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 1 1 0 Reset
SYSTEM_CPUPERIOD_SEL Set this field to select the CPU clock frequency. (R/W)
SYSTEM_PLL_FREQ_SEL Set this bit to select the PLL clock frequency. (R/W)
SYSTEM_CPU_WAIT_MODE_FORCE_ON Set this bit to force on the clock gate of CPU wait mode.
Usually, after executing the WAITI instruction, CPU enters the wait mode, during which the clock
gate of CPU is turned off until any interrupts occur. In this way, power consumption is reduced.
However, if this bit is set, the clock gate of CPU is always on and will not be turned off by the WAITI
instruction. (R/W)
SYSTEM_CPU_WAITI_DELAY_NUM Sets the number of delay cycles to turn off the CPU clock gate
after the CPU enters the wait mode because of a WAITI instruction. (R/W)
EN
EN
K_
EN
LK EN
K_
N
CL
SY rve TIM CL K_E EN
EN K_
CL
_C K_
1_
K_ EN
se _ I3_ L _
se _ RT K_ _
S _ _ E K_ N
S d) ER K_ N
ST _U I2_ 0_C N
K_ CL
P_
ER L
S _ CI K_ N
EN
CL EN
SY TEM RM _C _EN
(re TEM SP 0_C CLK
(re EM A CL LK
SY TEM I2C CL K_E
SY TEM SP XT _E
UP
M _C
G EN
SY TEM CA 1_C EN
EN
SY EM H CL _E
CL _
CL _
S d) 0_ LK
K_
1_ K_
S d) B_ EM
S _ _ E LK
TI B
RO
ST _U T_ LK
S _ NT LK
S _ M K_
S _ M 1_
S _ N_ L
YS AR
ed I0 L
R
SY rve US _M
rv SP _C
SY EM C C
SY EM W CL
G
_S C2_
_
ST d) ER
se _ RT
se _ T
ST _P C
ST _P 1_
R
SY EM ED
SY ve IM
SY EM 2S
EM D
(re TEM UA
(re EM A
ST _U
ST _A
ST _L
ST _I
S _
se _
S d)
)
ed
SY TEM
SY EM
SY TEM
(re TEM
SY EM
SY TEM
SY rve
rv
r
ST
se
se
SY
(re
(re
31 30 29 28 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 Reset
EM R TO SA K_ EN
N
UP LK N
I_ _A _C _EN
LK N
ST _C YP _R CL K_
S _ IO M_ N EN
_E
_P YPT _SH _C EN
CK _C _E
_C _E
N
SY TEM CR TO S_ _CL
SY TEM CR TO EN K_E
SY TEM CR CL T_C EN
SY TEM SD CA K_E K_
BA ES LK
ER O A LK
S _ D_ L CL
S _ A_ S K_
S _ P D C
S _ YP K_ L
SY TEM CR TO MA
SY TEM LC 2_C E_
SY TEM DM _HO CL
S _ RT VIC
S _ YP _H
_
SY TEM UA DE
S _ B_
Y
SY EM S
ST _U
d)
SY TEM
ve
er
S
s
SY
(re
31 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 Reset
T
RS
T
RS
T
_R T
1_
T RS
ST
ER S
P_
(re TEM SP 0_R RST
(re EM A RS ST
UP
M _R
RS _
RS T
ST _U I2_ 0_R
S d) B_ EM
SY TEM I2C RS T
SY rve TIM RS T
SY TEM SP XT T
TI B
RO
S _ T_ ST
T
S d) 0_ S
1_ T
ST _R NT ST
S _ M 1_
S _ N_ S
se _ I3_ S
S _ _E S
S _ CI T
S _ _E T
S d) ER T
se _ R T T
RS
YS AR
ed I0 S
S _ M T
T
R
SY TEM UH RS
SY EM W RS
SY EM M _R
rv SP _R
SY TEM PW XT
SY TEM PC _R
G
G
_S C2_
ST d) ER
se _ RT
se _ T
S _ C
ST _P 1_
R
SY EM ED
SY ve IM
SY EM 2S
EM D
(re EM A
(re EM A
ST _U
ST _U
ST _A
ST _L
ST _I
se _
S d)
)
ed
SY TEM
SY TEM
SY TEM
(re TEM
SY EM
SY TEM
SY rve
rv
r
se
se
S
SY
(re
(re
31 30 29 28 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
ST _C YP _R RS T
SY TEM CR TO S_ _RS
ST
BA ES ST
ER O A T
UP ST
T
_R
S _ D_ S RS
I_ _A _R
CK _R
S _ YP _D C
S _ A_ S T
SY TEM CR RS T_R
SY TEM CR TO MA
SY EM M O S
SY TEM LC 2_R E_
R
SY TEM SD CA T
S _ RT VIC
S _ YP _H
ST _D IO_ M_
SY TEM CR TO
SY TEM UA DE
H
S _ B_
SY EM S
ST _U
d)
SY TEM
ve
er
S
s
SY
(re
31 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 Reset
W
LO
LK EL TA 2K
_S
PC _S _X L3
_S _8 L
TC
_L LK EL TA
ST _L LK EL N
EL M
SY TEM LPC K_S C_E
_R
EM PC _S _X
S _ L T
SY TEM LPC K_R
S _ L
SY TEM LPC
S _
)
)
ed
ed
SY TEM
rv
rv
se
se
S
SY
(re
(re
31 29 28 27 26 25 24 23 0
0 0 0 0 0 0 1 0 1 Reset
SYSTEM_LPCLK_SEL_8M Set this bit to select RC_FAST_CLK div n as the low-power clock. (R/W)
SYSTEM_LPCLK_SEL_XTAL Set this bit to select XTAL_CLKL clock as the low-power clock. (R/W)
SYSTEM_LPCLK_SEL_XTAL32K Set this bit to select XTAL32K_CLK clock as the low-power clock.
(R/W)
0
U_
P
_C
M
RO
_F
TR
N
_I
PU
_C
)
ed
EM
rv
ST
se
SY
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTEM_CPU_INTR_FROM_CPU_0 Set this bit to generate CPU interrupt 0. This bit needs to be
reset by software in the ISR process. (R/W)
_1
PU
_C
M
O
FR
R_
NT
_I
PU
_C
d)
EM
ve
er
ST
s
SY
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTEM_CPU_INTR_FROM_CPU_1 Set this bit to generate CPU interrupt 1. This bit needs to be
reset by software in the ISR process. (R/W)
2
U_
P
_C
M
O
FR
R_
NT
_I
PU
_C
d)
EM
r ve
ST
se
SY
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTEM_CPU_INTR_FROM_CPU_2 Set this bit to generate CPU interrupt 2. This bit needs to be
reset by software in the ISR process. (R/W)
_3
PU
_C
M
O
FR
R_
NT
_I
PU
_C
d)
EM
e
rv
ST
se
SY
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SYSTEM_CPU_INTR_FROM_CPU_3 Set this bit to generate CPU interrupt 3. This bit needs to be
reset by software in the ISR process. (R/W)
_P RC PD
U
D E_P
EM FO E_
_M M_ RC
SA E FO
_R A_M M_
EM S E
ST _R A_M
SY TEM RS
S _
d)
SY TEM
ve
er
S
s
SY
(re
31 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
SYSTEM_RSA_MEM_PD Set this bit to send the RSA memory into retention state. This bit has the
lowest priority, meaning it can be masked by the SYSTEM_RSA_MEM_FORCE_PU field. When
Digital Signature occupies the RSA, this bit is invalid. (R/W)
SYSTEM_RSA_MEM_FORCE_PU Set this bit to force the RSA memory to work as normal when
the chip enters light sleep. This bit has the second highest priority, meaning it overrides the SYS-
TEM_RSA_MEM_PD field. (R/W)
SYSTEM_RSA_MEM_FORCE_PD Set this bit to send the RSA memory into retention state. This bit
has the highest priority, meaning it sends the RSA memory into retention state regardless of the
SYSTEM_RSA_MEM_FORCE_PU field. (R/W)
N
O
CL T
A_ ESE
K_
DM _R
_E MA
EM D
ST _E
)
ed
SY TEM
rv
se
S
SY
(re
31 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
E_ ESE N
N
CH _R _O
_I CH _C ET
O
CL T
K_
EM CA HE ES
CA E LK
ST _I AC _R
SY TEM DC HE
S _ AC
SY EM C
ST _D
d)
SY TEM
ve
er
S
s
SY
(re
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 Reset
EC YPT
T
R
UA _EN RYP
CB ENC
CR PT
Y
T
_
CR
YP
AL
_D
AD NU
EN
A
AN DB
NL _G0
NL _M
L_
_
AD
AD
O
O
NL
M
W
I_
O
DO
SP
_D
_D
E_
E_
LE
E
EM ABL
BL
BL
B
d)
NA
NA
NA
N
e
_E
_E
_E
_E
rv
EM
EM
EM
se
ST
ST
ST
ST
(re
SY
SY
SY
SY
31 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
T
R
AR
IS
DD
N
IN
ST
LE
_A
_F
_
RC
RC
RC
RC
_C
_C
_C
_C
EM
EM
EM
EM
M
_M
_M
_M
_
TC
TC
TC
TC
_R
_R
_R
_R
)
ed
EM
EM
EM
EM
rv
ST
ST
ST
ST
se
SY
SY
SY
SY
(re
31 30 20 19 9 8 7 0
SYSTEM_RTC_MEM_CRC_START Set this bit to start the CRC of RTC memory (R/W)
SYSTEM_RTC_MEM_CRC_ADDR This field is used to set address of RTC memory for CRC. (R/W)
SYSTEM_RTC_MEM_CRC_LEN This field is used to set length of RTC memory for CRC based on
start address. (R/W)
SYSTEM_RTC_MEM_CRC_FINISH This bit stores the status of RTC memory CRC. High level means
finished while low level means not finished. (RO)
31 0
0 Reset
SYSTEM_RTC_MEM_CRC_RES This field stores the CRC result of RTC memory. (RO)
EM
rv
ST
se
SY
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
E Q
NT
FR
SE
L_
_C
K_
TA
V
CL
DI
_X
C_
_
LK
RE
O
_C
_S
_P
d)
EM
EM
EM
ve
er
ST
ST
ST
s
SY
SY
SY
(re
31 19 18 12 11 10 9 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x1 Reset
SYSTEM_PRE_DIV_CNT This field is used to set the count of prescaler of XTAL_CLK. For details,
please refer to Table 7-4 in Chapter 7 Reset and Clock. (R/W)
SYSTEM_SOC_CLK_SEL This field is used to select SOC clock. For details, please refer to Table
7-2 in Chapter 7 Reset and Clock. (R/W)
ME
rv
ST
se
SY
(re
31 28 27 0
0 0 0 0 0x2101220 Reset
N
O
_O
E_
E
RC
RC
O
O
_F
_F
E
E
AT
AT
G
KG
LK
L
_C
_C
M
M
A
RO
SR
L_
L_
R
R
d)
CT
CT
ve
er
B_
B_
s
AP
AP
(re
31 14 13 3 2 0
N
W
W
O
O
_D
_D
ER
ER
W
W
O
O
_P
_P
M
M
RA
O
_R
_S
RL
RL
d)
CT
CT
e
rv
B_
B_
se
AP
AP
(re
31 14 13 3 2 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
APB_CTRL_ROM_POWER_DOWN Set this field to send the internal ROM into retention state. (R/W)
APB_CTRL_SRAM_POWER_DOWN Set this field to send the internal SRAM into retention state.
(R/W)
P
_U
_U
ER
ER
W
W
O
O
_P
_P
M
M
A
RO
SR
L_
L_
R
R
d)
CT
CT
ve
er
B_
B_
s
AP
AP
(re
31 14 13 3 2 0
APB_CTRL_ROM_POWER_UP Set this field to force the internal ROM to work as normal (do not
enter the retention state) when the chip enters light sleep. (R/W)
APB_CTRL_SRAM_POWER_UP Set this field to force the internal SRAM to work as normal (do not
enter the retention state) when the chip enters light sleep. (R/W)
18.1 Introduction
ESP32-S3 integrates an SHA accelerator, which is a hardware device that speeds up SHA algorithm significantly,
compared to SHA algorithm implemented solely in software. The SHA accelerator integrated in ESP32-S3 has
two working modes, which are Typical SHA and DMA-SHA.
18.2 Features
The following functionality is supported:
– SHA-1
– SHA-224
– SHA-256
– SHA-384
– SHA-512
– SHA-512/224
– SHA-512/256
– SHA-512/t
– Typical SHA
– DMA-SHA
• Typical SHA Working Mode: all the data is written and read via CPU directly.
• DMA-SHA Working Mode: all the data is read via DMA. That is, users can configure the DMA controller to
read all the data needed for hash operation, thus releasing CPU for completing other tasks.
Users can start the SHA accelerator with different working modes by configuring registers SHA_START_REG and
SHA_DMA_START_REG. For details, please see Table 18-1.
Users can choose hash algorithms by configuring the SHA_MODE_REG register. For details, please see Table
18-2.
Notice:
ESP32-S3’s Digital Signature (DS) and HMAC Accelerator (HMAC) modules also call the SHA accelerator.
Therefore, users cannot access the SHA accelerator when these modules are working.
18.4.1 Preprocessing
Preprocessing consists of three steps: padding the message, parsing the message into message blocks and
setting the initial hash value.
The SHA accelerator can only process message blocks of 512 or 1024 bits, depending on the algorithm. Thus,
all the messages should be padded to a multiple of 512 or 1024 bits before the hash task.
Suppose that the length of the message M is m bits. Then M shall be padded as introduced below:
2. Second, append k zero bits, where k is the smallest, non-negative solution to the equation
m + 1 + k ≡ 448 mod 512;
3. Last, append the 64-bit block of value equal to the number m expressed using a binary representation.
2. Second, append k zero bits, where k is the smallest, non-negative solution to the equation
m + 1 + k ≡ 896 mod 1024;
3. Last, append the 128-bit block of value equal to the number m expressed using a binary
representation.
For more details, please refer to Section “5.1 Padding the Message” in FIPS PUB 180-4 Spec.
The message and its padding must be parsed into N 512-bit or 1024-bit blocks.
• For SHA1, SHA224 and SHA256: the message and its padding are parsed into N 512-bit blocks, M (1) ,
M (2) , …, M (N ) . Since the 512 bits of the input block may be expressed as sixteen 32-bit words, the first
(i) (i) (i)
32 bits of message block i are denoted M0 , the next 32 bits are M1 , and so on up to M15 .
• For SHA384, SHA512, SHA512/224, SHA512/256 and SHA512/t: the message and its padding are
parsed into N 1024-bit blocks. Since the 1024 bits of the input block may be expressed as sixteen 64-bit
(i) (i) (i)
words, the first 64 bits of message block i are denoted M0 , the next 64 bits are M1 , and so on up to M15 .
During the task, all the message blocks are written into the SHA_M_n_REG, following the rules below:
(i) (i)
• For SHA1, SHA224 and SHA256: M0 is stored in SHA_M_0_REG, M1 stored in SHA_M_1_REG, …,
(i)
and M15 stored in SHA_M_15_REG.
• For SHA384, SHA512, SHA512/224 and SHA512/256: the most significant 32 bits and the least
(i)
significant 32 bits of M0 are stored in SHA_M_0_REG and SHA_M_1_REG, respectively, …, the most
(i)
significant 32 bits and the least significant 32 bits of M15 are stored in SHA_M_30_REG and
SHA_M_31_REG, respectively.
Note:
For more information about “message block”, please refer to Section “2.1 Glossary of Terms and Acronyms” in FIPS PUB
180-4 Spec.
Before hash task begins for each of the secure hash algorithms, the initial Hash value H(0) must be set based on
different algorithms, among which the SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and
SHA-512/256 algorithms use the initial Hash values (constant C) stored in the hardware.
However, SHA-512/t requires a distinct initial hash value for each operation for a given value of t. Simply put,
SHA-512/t is the generic name for a t-bit hash function based on SHA-512 whose output is truncated to t bits. t
is any positive integer without a leading zero such that t<512, and t is not 384. The initial hash value for
SHA-512/t for a given value of t can be calculated by performing SHA-512 from hexadecimal representation of
the string “SHA-512/t”. It’s not hard to observe that when determining the initial hash values for SHA-512/t
algorithms with different t, the only difference lies in the value of t.
Therefore, we have specially developed the following simplified method to calculate the initial hash value for
SHA-512/t:
1. Generate t_string and t_length: t_string is a 32-bit data that stores the input message of t. t_length is a
7-bit data that stores the length of the input message. The t_string and t_length are generated in methods
described below, depending on the value of t:
• If 1 <= t <= 9, then t_length = 7′ h48 and t_string is padded in the following format:
8′ h30 + 8′ ht0 1′ b1 23′ b0
where t0 = t.
• If 10 <= t <= 99, then t_length = 7′ h50 and t_string is padded in the following format:
8′ h30 + 8′ ht1 8′ h30 + 8′ ht0 1′ b1 15′ b0
• If 100 <= t < 512, then t_length = 7′ h58 and t_string is padded in the following format:
8′ h30 + 8′ ht2 8′ h30 + 8′ ht1 8′ h30 + 8′ ht0 1′ b1 7′ b0
3. Obtain initial hash value: Set the SHA_MODE_REG register to 7. Set the SHA_START_REG register to 1
to start the SHA accelerator. Then poll register SHA_BUSY_REG until the content of this register becomes
0, indicating the calculation of initial hash value is completed.
Please note that the initial value for SHA-512/t can be also calculated according to the Section “5.3.6 SHA-512/t”
in FIPS PUB 180-4 Spec, that is performing SHA-512 operation (with its initial hash value set to the result of
8-bitwise XOR operation of C and 0xa5) from the hexadecimal representation of the string “SHA-512/t”.
Usually, the SHA accelerator will process all blocks of a message and produce a message digest before starting
the next message digest.
However, ESP32-S3 SHA working in Typical SHA mode also supports optional “interleaved” message digest
calculation. Users can insert new calculation (both Typical SHA and DMA-SHA) each time the SHA accelerator
completes one message block. To be more specific, users can store the message digest in registers
SHA_H_n_REG after completing each message block, and assign the accelerator with other higher priority tasks.
After the inserted calculation completes, users can put the message digest stored back to registers
SHA_H_n_REG, and resume the accelerator with the previously paused calculation.
• If this is the first time to execute this step, set the SHA_START_REG register to 1 to start the SHA
accelerator. In this case, the accelerator uses the initial hash value stored in hardware for a given
algorithm configured in Step 1 to start the calculation;
• If this is not the first time to execute this step2 , set the SHA_CONTINUE_REG register to 1 to start the
SHA accelerator. In this case, the accelerator uses the hash value stored in the SHA_H_n_REG
register to start calculation.
• Poll register SHA_BUSY_REG until the content of this register becomes 0, indicating the accelerator
has completed the calculation for the current message block and now is in the “idle” status 3 .
(a) Calculate t_stiring and t_length and initialize SHA_T_STRING_REG and SHA_T_LENGTH_REG with
the generated t_string and t_length. For details, please refer to Section 18.4.1.3.
(c) Poll register SHA_BUSY_REG until the content of this register becomes 0, indicating the calculation of
initial hash value is completed.
• Set the SHA_CONTINUE_REG register to 1. In this case, the accelerator uses the hash value stored in
the SHA_H_n_REG register to start calculation.
• Poll register SHA_BUSY_REG until the content of this register becomes 0, indicating the accelerator
has completed the calculation for the current message block and now is in the “idle” status3 .
Note:
1. In this step, the software can also write the next message block (to be processed) in registers SHA_M_n_REG, if
any, while the hardware starts SHA calculation, to save time.
2. You are resuming the SHA accelerator with the previously paused calculation.
3. Here you can decide if you want to insert other calculations. If yes, please go to the process for interleaved
calculations for details.
As mentioned above, ESP32-S3 SHA accelerator supports “interleaving” calculation under the Typical SHA
working mode.
1. Prepare to hand the SHA accelerator over for an interleaved calculation by saving the following data of the
previous calculation.
2. Perform the interleaved calculation. For the detailed process of the interleaved calculation, please refer to
Typical SHA process or DMA-SHA process, depending on the working mode of your interleaved calculation.
3. Prepare to hand the SHA accelerator back to the previously paused calculation by restoring the following
data of the previous calculation.
4. Write the next message block from the previous paused calculation in registers SHA_M_n_REG, and set the
SHA_CONTINUE_REG register to 1 to restart the SHA accelerator with the previously paused calculation.
ESP32-S3 SHA accelerator does not support “interleaving” message digest calculation when using the DMA,
which means you cannot insert new calculation before the whole DMA-SHA process completes. In this case,
users who need inserted calculation are recommended to divide your message blocks and perform several
DMA-SHA calculation, instead of trying to compute all the messages in one go.
In contrast to the Typical SHA working mode, when the SHA accelerator is working under the DMA-SHA mode,
all data read are completed via DMA.
Therefore, users are required to configure the DMA controller following the description in Chapter 3 GDMA
Controller (GDMA).
• Select a hash algorithm by configuring the SHA_MODE_REG register. For details, please refer to Table
18-2.
• If the current DMA-SHA calculation follows a previous calculation, firstly write the message digest from
the previous calculation to registers SHA_H_n_REG, then write 1 to register
SHA_DMA_CONTINUE_REG to start SHA accelerator;
5. Wait till the completion of the DMA-SHA calculation, which happens when:
• An SHA interrupt occurs. In this case, please clear interrupt by writing 1 to the SHA_INT_CLEAR_REG
register.
(a) Calculate t_string and t_length and initialize SHA_T_STRING_REG and SHA_T_LENGTH_REG with
the generated t_string and t_length. For details, please refer to Section 18.4.1.3.
(c) Poll register SHA_BUSY_REG until the content of this register becomes 0, indicating the calculation of
initial hash value is completed.
6. Wait till the completion of the DMA-SHA calculation, which happens when:
• An SHA interrupt occurs. In this case, please clear interrupt by writing 1 to the SHA_INT_CLEAR_REG
register.
Table 186. The Storage and Length of Message digest from Different Algorithms
18.4.4 Interrupt
SHA accelerator supports interrupt on the completion of message digest calculation when working in the
DMA-SHA mode. To enable this function, write 1 to register SHA_INT_ENA_REG. Note that the interrupt should
be cleared by software after use via setting the SHA_INT_CLEAR_REG register to 1.
18.6 Registers
The addresses in this section are relative to the SHA accelerator base address provided in Table 4-3 in Chapter 4
System and Memory.
T
AR
d)
ST
ve
A_
r
se
SH
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
UE
IN
NT
d)
CO
e
rv
A_
se
SH
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
TE
TA
_S
SY
d )
BU
ve
A_
ser
SH
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SHA_BUSY_STATE Indicates the states of SHA accelerator. (RO) 1’h0: idle 1’h1: busy
DM
rv
A_
se
SH
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
UE
IN
NT
CO
A_
d)
DM
ve
A_
ser
SH
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
T
UP
RR
TE
IN
R_
EA
d )
CL
ve
A_
r
se
SH
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
NA
_E
PT
RU
ER
d)
T
ve
IN
A_
r
se
SH
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
_D
rv
se
A
SH
(re
31 30 29 0
0 0 0x20190402 Reset
DE
)
O
ed
M
rv
A_
se
SH
(re
31 3 2 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
SHA_MODE Defines the SHA algorithm. For details, please see Table 18-2. (R/W)
NG
RI
ST
T_
A_
SH
31 0
0x000000 Reset
SHA_T_STRING Defines t_string for calculating the initial Hash value for SHA-512/t. (R/W)
TH
NG
LE
)
ed
T_
rv
A_
se
SH
(re
31 6 5 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
SHA_T_LENGTH Defines t_length for calculating the initial Hash value for SHA-512/t. (R/W)
DM
e
rv
A_
se
SH
(re
31 6 5 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
n
H_
A_
SH
31 0
0x000000 Reset
SHA_H_n Stores the nth 32-bit piece of the Hash value. (R/W)
_n
M
A_
SH
31 0
0x000000 Reset
19.1 Introduction
ESP32-S3 integrates an Advanced Encryption Standard (AES) Accelerator, which is a hardware device that
speeds up AES Algorithm significantly, compared to AES algorithms implemented solely in software. The AES
Accelerator integrated in ESP32-S3 has two working modes, which are Typical AES and DMA-AES.
19.2 Features
The following functionality is supported:
* CTR (Counter)
– Supports encryption and decryption using cryptographic keys of 128 and 256 bits, specified in NIST
FIPS 197.
In this working mode, the plaintext and ciphertext is written and read via CPU directly.
– Supports encryption and decryption using cryptographic keys of 128 and 256 bits, specified in NIST
FIPS 197;
In this working mode, the plaintext and ciphertext is written and read via DMA. An interrupt will be
generated when operation completes.
Users can choose the working mode for AES accelerator by configuring the AES_DMA_ENABLE_REG register
according to Table 19-1 below.
Users can choose the length of cryptographic keys and encryption / decryption by configuring the
AES_MODE_REG register according to Table 19-2 below.
For detailed introduction on these two working modes, please refer to Section 19.4 and Section 19.5
below.
Notice: ESP32-S3’s Digital Signature (DS) module will call the AES accelerator. Therefore, users cannot
access the AES accelerator when Digital Signature (DS) module is working.
The plaintext and ciphertext are stored in AES_TEXT_IN_m_REG and AES_TEXT_OUT_m_REG, which are two
sets of four 32-bit registers.
• For AES-128/AES-256 encryption, the AES_TEXT_IN_m_REG registers are initialized with plaintext. Then,
the AES Accelerator stores the ciphertext into AES_TEXT_OUT_m_REG after operation.
• For AES-128/AES-256 decryption, the AES_TEXT_IN_m_REG registers are initialized with ciphertext. Then,
the AES Accelerator stores the plaintext into AES_TEXT_OUT_m_REG after operation.
19.4.2 Endianness
Text Endianness
In Typical AES working mode, the AES Accelerator uses cryptographic keys to encrypt and decrypt data in
blocks of 128 bits. When filling data into AES_TEXT_IN_m_REG register or reading result from
AES_TEXT_OUT_m_REG registers, users should follow the text endianness type specified in Table 19-4.
Plaintext/Ciphertext
c2
State1
0 1 2 3
0 AES_TEXT_x_0_REG[7:0] AES_TEXT_x_1_REG[7:0] AES_TEXT_x_2_REG[7:0] AES_TEXT_x_3_REG[7:0]
1 AES_TEXT_x_0_REG[15:8] AES_TEXT_x_1_REG[15:8] AES_TEXT_x_2_REG[15:8] AES_TEXT_x_3_REG[15:8]
r
2 AES_TEXT_x_0_REG[23:16] AES_TEXT_x_1_REG[23:16] AES_TEXT_x_2_REG[23:16] AES_TEXT_x_3_REG[23:16]
3 AES_TEXT_x_0_REG[31:24] AES_TEXT_x_1_REG[31:24] AES_TEXT_x_2_REG[31:24] AES_TEXT_x_3_REG[31:24]
1
The definition of “State (including c and r)” is described in Section 3.4 The State in NIST FIPS 197.
2
Where x = IN or OUT.
Key Endianness
In Typical AES working mode, When filling key into AES_KEY_m_REG registers, users should follow the key
endianness type specified in Table 19-5 and Table 19-6.
Table 195. Key Endianness Type for AES128 Encryption and Decryption
19
Table 196. Key Endianness Type for AES256 Encryption and Decryption
1
Column “Bit” specifies the bytes of each word stored in w[0] ~ w[7].
2
w[0] ~ w[7] are “the first Nk words of the expanded key” as specified in Chapter 5.2 Key Expansion in NIST FIPS 197.
Submit Documentation Feedback
836
ESP32-S3 TRM (Version 1.1)
GoBack
19 AES Accelerator (AES) GoBack
4. Wait till the content of the AES_STATE_REG register becomes 0, which indicates the operation is
completed.
Consecutive Operations
2. Initialize registers AES_MODE_REG and AES_KEY_n_REG before starting the first operation.
5. Wait till the content of the AES_STATE_REG register becomes 0, which indicates the operation completes.
6. Read results from the AES_TEXT_OUT_m_REG register, and return to Step 3 to continue the next
operation.
Users can check the working status of the AES accelerator by inquiring the AES_STATE_REG register and
comparing the return value against the Table 19-8 below.
When working in the DMA-AES working mode, the AES accelerator supports interrupt on the completion of
computation. To enable this function, write 1 to the AES_INT_ENA_REG register. By default, the interrupt
function is disabled. Also, note that the interrupt should be cleared by software after use.
During the block operations, the AES Accelerator reads source data from DMA, and write result data to DMA
after the computation.
• For encryption, DMA reads plaintext from memory, then passes it to AES as source data. After
computation, AES passes ciphertext as result data back to DMA to write into memory.
• For decryption, DMA reads ciphertext from memory, then passes it to AES as source data. After
computation, AES passes plaintext as result data back to DMA to write into memory.
During block operations, the lengths of the source data and result data are the same. The total computation time
is reduced because the DMA data operation and AES computation can happen concurrently.
The length of source data for AES Accelerator under DMA-AES working mode must be 128 bits or the integral
multiples of 128 bits. Otherwise, trailing zeros will be added to the original source data, so the length of source
data equals to the nearest integral multiples of 128 bits. Please see details in Table 19-9 below.
Function : TEXTPADDING( )
Input : X, bit string.
Output : Y = TEXTPADDING(X), whose length is the nearest integral multiples of 128 bits.
Steps
Let us assume that X is a data-stream that can be split into n parts as following:
X = X1 ||X2 || · · · ||Xn−1 ||Xn
Here, the lengths of X1 , X2 , · · · , Xn−1 all equal to 128 bits, and the length of Xn is t
(0<=t<=127).
If t = 0, then
TEXTPADDING(X) = X;
If 0 < t <= 127, define a 128-bit block, Xn∗ , and let Xn∗ = Xn ||0128−t , then
TEXTPADDING(X) = X1 ||X2 || · · · ||Xn−1 ||Xn∗ = X||0128−t
19.5.2 Endianness
Under the DMA-AES working mode, the transmission of source data and result data for AES Accelerator is solely
controlled by DMA. Therefore, the AES Accelerator cannot control the Endianness of the source data and result
data, but does have requirement on how these data should be stored in memory and on the length of the
data.
For example, let us assume DMA needs to write the following data into memory at address 0x0280.
– 0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20
• Data Length:
– Equals to 2 blocks.
Then, this data will be stored in memory as shown in Table 19-10 below.
DMA can access both internal memory and PSRAM outside ESP32-S3. When you use DMA to access external
PSRAM, please use base addresses that meet the requirements for DMA. When you use DMA to access internal
memory, base addresses do not have such requirements. Details can be found in Chapter 3 GDMA Controller
(GDMA).
Both IV and ICB are 128-bit strings, which can be divided into Byte0, Byte1, Byte2 · · · Byte15 (from left to right).
AES_IV_MEM stores data following the Endianness pattern presented in Table 19-10, i.e. the most significant
(i.e., left-most) byte Byte0 is stored at the lowest address while the least significant (i.e., right-most) byte Byte15
at the highest address.
• Select block cipher mode by configuring the AES_BLOCK_MODE_REG register. For details, see Table
19-7.
• Initialize the AES_INC_SEL_REG register (only needed when AES Accelerator is working under CTR
block operation).
• Initialize the AES_IV_MEM memory (This is always needed except for ECB block operation).
4. Wait for the completion of computation, which happens when the content of AES_STATE_REG becomes 2
or the AES interrupt occurs.
5. Check if DMA completes data transmission from AES to memory. At this time, DMA had already written the
result data in memory, which can be accessed directly. For details on DMA, please refer to Chapter 3
GDMA Controller (GDMA).
6. Clear interrupt by writing 1 to the AES_INT_CLR_REG register, if any AES interrupt occurred during the
computation.
7. Release the AES Accelerator by writing 0 to the AES_DMA_EXIT_REG register. After this, the content of the
AES_STATE_REG register becomes 0. Note that, you can release DMA earlier, but only after Step 4 is
completed.
19.8 Registers
The addresses in this section are relative to the AES accelerator base address provided in Table 4-3 in Chapter 4
System and Memory.
)
-7
:0
(n
G
RE
n_
Y_
KE
S_
AE
31 0
0x000000000 Reset
)
-3
:0
(m
EG
_R
m
_
IN
T_
X
TE
S_
AE
31 0
0x000000000 Reset
AES_TEXT_IN_m_REG (m: 03) Stores the source data when the AES Accelerator operates in the
Typical AES working mode. (R/W)
31 0
0x000000000 Reset
AES_TEXT_OUT_m_REG (m: 03) Stores the result data when the AES Accelerator operates in the
Typical AES working mode. (RO)
DE
)
ed
O
M
rv
S_
se
AE
(re
31 3 2 0
0x00000000 0 Reset
AES_MODE Defines the key length and encryption / decryption of the AES Accelerator. For details,
see Table 19-2. (R/W)
LE
AB
EN
A_
d)
DM
ve
r
S_
se
AE
(re
31 1 0
0x00000000 0 Reset
AES_DMA_ENABLE Defines the working mode of the AES Accelerator. 0: Typical AES, 1: DMA-AES.
For details, see Table 19-1. (R/W)
DE
O
_M
CK
O
d)
BL
e
rv
S_
se
AE
(re
31 3 2 0
0x00000000 0 Reset
AES_BLOCK_MODE Defines the block cipher mode of the AES Accelerator operating under the
DMA-AES working mode. For details, see Table 19-7. (R/W)
31 0
0x00000000 Reset
AES_BLOCK_NUM Stores the Block Number of plaintext or ciphertext when the AES Accelerator
operates under the DMA-AES working mode. For details, see Section 19.5.4. (R/W)
S EL
C_
d )
ve
IN
r
S_
se
AE
(re
31 1 0
0x00000000 0 Reset
AES_INC_SEL Defines the Standard Incrementing Function for CTR block operation. Set this bit to
0 or 1 to choose INC32 or INC128 . (R/W)
ER
G
IG
d)
TR
e
rv
S_
se
AE
(re
31 1 0
0x00000000 x Reset
E
AT
)
ed
ST
rv
S_
se
AE
(re
31 2 1 0
AES_STATE Stores the working status of the AES Accelerator. For details, see Table 19-3 for Typical
AES working mode and Table 19-8 for DMA AES working mode. (RO)
DM
rv
S_
se
AE
(re
31 1 0
0x00000000 x Reset
AES_DMA_EXIT Set this bit to 1 to exit AES operation. This register is only effective for DMA-AES
operation. (WO)
R
CL
T_
d )
ve
IN
r
S_
se
AE
(re
31 1 0
0x00000000 x Reset
NA
_E
d)
T
ve
IN
r
S_
se
AE
(re
31 1 0
0x00000000 0 Reset
AES_INT_ENA Set this bit to 1 to enable AES interrupt and 0 to disable interrupt. (R/W)
20.1 Introduction
The RSA Accelerator provides hardware support for high precision computation used in various RSA asymmetric
cipher algorithms by significantly reducing their software complexity. Compared with RSA algorithms
implemented solely in software, this hardware accelerator can speed up RSA algorithms significantly. Besides,
the RSA Accelerator also supports operands of different lengths, which provides more flexibility during the
computation.
20.2 Features
The following functionality is supported:
• Large-number multiplication
The RSA Accelerator is only available after the RSA-related memories are initialized. The content of the
RSA_CLEAN_REG register is 0 during initialization and will become 1 after the initialization is done. Therefore, it is
advised to wait until RSA_CLEAN_REG becomes 1 before using the RSA Accelerator.
Notice:
ESP32-S3’s Digital Signature (DS) module also calls the RSA accelerator. Therefore, users cannot access the
RSA accelerator when Digital Signature (DS) is working.
RSA Accelerator supports operands of length N = 32 × x, where x ∈ {1, 2, 3, . . . , 128}. The bit lengths of
arguments Z, X, Y , M , and r can be arbitrary N , but all numbers in a calculation must be of the same length.
To represent the numbers used as operands, let us define a base-b positional notation, as follows:
b = 232
Each of the n values in Zn−1 · · · Z0 , Xn−1 · · · X0 , Yn−1 · · · Y0 , Mn−1 · · · M0 , rn−1 · · · r0 represents one base-b
digit (a 32-bit word).
Zn−1 , Xn−1 , Yn−1 , Mn−1 and rn−1 are the most significant bits of Z, X, Y , M , while Z0 , X0 , Y0 , M0 and r0 are
the least significant bits.
The following equation in the form compatible with the extended binary GCD algorithm can be written as�
M −1 × M + 1 = R × R−1
M ′ = M −1 mod b
(c) Configure registers related to the acceleration options, which are described later in Section 20.3.4.
Users need to write data to each memory block only according to the length of the number; data beyond
this length are ignored.
5. Wait for the completion of computation, which happens when the content of RSA_IDLE_REG becomes 1
or the RSA interrupt occurs.
7. Write 1 to RSA_CLEAR_INTERRUPT_REG to clear the interrupt, if you have enabled the interrupt function.
After the computation, the RSA_MODE_REG register, memory blocks RSA_Y_MEM and RSA_M_MEM, as well
as the RSA_M_PRIME_REG remain unchanged. However, Xi in RSA_X_MEM and ri in RSA_Z_MEM
computation are overwritten, and only these overwritten memory blocks need to be re-initialized before starting
another computation.
The RSA Accelerator supports large-number modular multiplication with operands of 128 different lengths.
Users need to write data to each memory block only according to the length of the number; data beyond
this length are ignored.
5. Wait for the completion of computation, which happens when the content of RSA_IDLE_REG becomes 1
or the RSA interrupt occurs.
7. Write 1 to RSA_CLEAR_INTERRUPT_REG to clear the interrupt, if you have enabled the interrupt function.
After the computation, the length of operands in RSA_MODE_REG, the Xi in memory RSA_X_MEM, the Yi in
memory RSA_Y_MEM, the Mi in memory RSA_M_MEM, and the M ′ in memory RSA_M_PRIME_REG remain
unchanged. However, the ri in memory RSA_Z_MEM has already been overwritten, and only this overwritten
memory block needs to be re-initialized before starting another computation.
3. Write Xi and Yi for ∈ {0, 1, . . . , n − 1} to memory blocks RSA_X_MEM and RSA_Z_MEM. The capacity of
each memory block is 64 words. Each word of each memory block can store one base-b digit. The
memory blocks use the little endian format for storage, i.e. the least significant digit of each number is in
N
the lowest address. n is 32 .
Write Xi for i ∈ {0, 1, . . . , n − 1} to the address of the i words of the RSA_X_MEM memory block. Note
that Yi for i ∈ {0, 1, . . . , n − 1} will not be written to the address of the i words of the RSA_Z_MEM register,
but the address of the n + i words, i.e. the base address of the RSA_Z_MEM memory plus the address
offset 4 × (n + i).
Users need to write data to each memory block only according to the length of the number; data beyond
this length are ignored.
5. Wait for the completion of computation, which happens when the content of RSA_IDLE_REG becomes 1
or the RSA interrupt occurs.
7. Write 1 to RSA_CLEAR_INTERRUPT_REG to clear the interrupt, if you have enabled the interrupt function.
After the computation, the length of operands in RSA_MODE_REG and the Xi in memory RSA_X_MEM remain
unchanged. However, the Yi in memory RSA_Z_MEM has already been overwritten, and only this overwritten
memory block needs to be re-initialized before starting another computation.
To be more specific, when neither of these two options are configured for acceleration, the time required to
calculate Z = X Y mod M is solely determined by the lengths of operands. When either or both of these two
options are configured for acceleration, the time required is also correlated with the 0/1 distribution of Y .
To better illustrate how these two options work, first assume Y is represented in binaries as
where,
• N is the length of Y ,
• Yet is 1,
• and Yet−1 , Yet−2 , …, Ye0 are either 0 or 1 but exactly m bits should be equal to 0 and t-m bits 1, i.e. the
Hamming weight of Yet−1 Yet−2 , · · · , Ye0 is t − m.
– The accelerator ignores the bit positions of Yei , where i > α. Search position α is set by configuring
the RSA_SEARCH_POS_REG register. The maximum value of α is N -1, which leads to the same
result when this option is not used for acceleration. The best acceleration performance can be
achieved by setting α to t, in which case, all the YeN −1 , YeN −2 , …, Yet+1 of 0s are ignored during the
calculation. Note that if you set α to be less than t, then the result of the modular exponentiation
Z = X Y mod M will be incorrect.
– The accelerator speeds up the calculation by simplifying the calculation concerning the 0 bits of Y .
Therefore, the higher the proportion of bits 0 against bits 1, the better the acceleration performance is.
We provide an example to demonstrate the performance of the RSA Accelerator under different combinations of
SEARCH and CONSTANT_TIME configuration. Here we perform Z = X Y mod M with N = 3072 and Y =
65537. Table 20-1 below demonstrates the time costs under different combinations of SEARCH and
CONSTANT_TIME configuration. Here, we should also mention that, α is set to 16 when the SEARCH option is
enabled.
• The time cost is the biggest when none of these two options is configured for acceleration.
• The time cost is the smallest when both of these two options are configured for acceleration.
• The time cost can be dramatically reduced when either or both option(s) are configured for acceleration.
20.6 Registers
The addresses in this section are relative to the RSA accelerator base address provided in Table 4-3 in Chapter 4
System and Memory.
31 0
0x000000000 Reset
DE
d)
O
ve
_M
r
se
A
RS
(re
31 7 6 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
N
EA
d )
CL
ve
er
A_
s
RS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RSA_CLEAN The content of this bit is 1 when memories complete initialization. (RO)
T
R
TA
_S
XP
DE
)
O
d
ve
M
er
A_
s
RS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
O
e
M
rv
A_
se
RS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
T
AR
ST
T_
UL
d)
ve
M
r
A_
se
RS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
LE
d )
ve
ID
r
A_
se
RS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
RSA_IDLE The content of this bit is 1 when the RSA accelerator is idle. (RO)
T
UP
RR
TE
IN
R_
EA
d )
CL
ve
er
A_
s
RS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
CO
r ve
A_
se
RS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
LE
AB
_ EN
CH
AR
d)
SE
ve
r
A_
se
RS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
S
O
_P
CH
AR
d)
SE
ver
A_
se
RS
(re
31 12 11 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x000 Reset
RSA_SEARCH_POS Is used to configure the starting address when the acceleration option of search
is used. (R/W)
A
EN
T_
UP
RR
TE
e d)
IN
rv
A_
se
RS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Reset
RSA_INTERRUPT_ENA Set this bit to 1 to enable the RSA interrupt. This option is enabled by default.
(R/W)
DA
rv
A_
se
RS
(re
31 30 29 0
0 0 0x20190425 Reset
• Hash result only accessible by configurable hardware peripheral (in downstream mode)
• Generates required keys for the Digital Signature (DS) peripheral (in downstream mode)
After the reset signal being released, the HMAC module will check whether the DS key exists in the eFuse. If the
key exists, the HMAC module will enter downstream digital signature mode and finish the DS key calculation
automatically.
Assume the two entities in the challenge-response protocol are A and B respectively, and the entities share the
same secret KEY. The data message they expect to exchange is M. The general process of this protocol is as
follows:
• A sends M to B
• B calculates the HMAC value (through M and KEY) and sends the result to A
• A compares these two values. If they are the same, then the identity of B is authenticated
To calculate the HMAC value (the following steps should be done by the user):
2. Write the correctly padded message to the HMAC, one block at a time.
To re-enable the temporarily disabled JTAG, users can follow the steps below:
1. Enable the HMAC module and enter downstream JTAG enable mode.
3. Write the 256-bit HMAC value which is calculated locally from the 32-byte 0x00 using HMAC-SHA-256
algorithm and the pre-generated key to register HMAC_WR_JTAG_REG, in big-endian order of word.
4. If the HMAC internally calculated value matches the value that user programmed, then JTAG is re-enabled.
Otherwise, JTAG remains disabled.
5. JTAG remains in the status as in step 4 until the user writes 1 to register
HMAC_SET_INVALIDATE_JTAG_REG or restart JTAG.
Before starting the DS module, the user needs to obtain the key for it first through HMAC calculation. For more
information, please see Chapter 22 Digital Signature (DS). After the clock of HMAC be enabled and reset of
HMAC be released, the HMAC module will check to see if there is a functional key in eFuses for the DS module.
If yes, HMAC will enter downstream digital signature mode and finish DS key calculation automatically.
Before enabling HMAC to do calculations, user should make sure the key to be used has been burned in eFuse.
You can burn a key to eFuse as follows:
1. Prepare a secret 256-bit HMAC key and burn the key to an empty eFuse block y (there are six blocks for
storing a key in eFuse. The numbers of those blocks range from 4 to 9, so y = 4,5,..,9. Hence, if we are
talking about key0, we mean eFuse block4), and then program the purpose to
EFUSE_KEY_PURPOSE_(y − 4). Take upstream mode as an example: after programming the key, the
user should program EFUSE_KEY_PURPOSE_HMAC_UP (corresponding value is 8) to
EFUSE_KEY_PURPOSE_(y − 4). Please see Chapter 5 eFuse Controller on how to program eFuse keys.
2. Configure this eFuse key block to be read protected, so that users cannot read its value. A copy of this key
should be kept by any party who needs to verify this device.
The correct purpose (see Table 21-1) has to be written to register HMAC_SET_PARA_PURPOSE_REG by the
user.
The eFuse controller provides six key blocks, i.e., KEY0 ~ 5. To select a particular KEYn for a certain HMAC
calculation, write the key number n to register HMAC_SET_PARA_KEY_REG.
Note that the purpose of the key has also been programmed to eFuse memory. Only when the configured HMAC
purpose matches the defined purpose of KEYn, will the HMAC module execute the configured calculation.
Otherwise, it will return a matching error and stop the current calculation. For example, suppose a user selects
KEY3 for HMAC calculation, and the value programmed to KEY_PURPOSE_3 is 6
(EFUSE_KEY_PURPOSE_HMAC_DOWN_JTAG). Based on Table 21-1, KEY3 can be used to re-enable JTAG. If
the value written to register HMAC_SET_PARA_PURPOSE_REG is also 6, then the HMAC module will start the
process to re-enable JTAG.
(a) Set the peripheral clock bits for HMAC and SHA peripherals in SYSTEM_PEIRP_CLK_EN1_REG, and
clear the corresponding peripheral reset bits in SYSTEM_PEIRP_RST_EN1_REG. For registers
information, please see Chapter 4 System and Memory.
(a) Write the key purpose m to register HMAC_SET_PARA_PURPOSE_REG. The possible key purpose
values are shown in Table 21-1. For more information, please refer to Section 21.2.4.
(d) Read register HMAC_QUERY_ERROR_REG. If its value is 1, it means the purpose of the selected
block does not match the configured key purpose and the calculation will not proceed. If its value is 0,
it means the purpose of the selected block matches the configured key purpose, and then the
calculation can proceed.
(e) When the value of HMAC_SET_PARA_PURPOSE_REG is not 8, it means the HMAC module is in
downstream mode, proceed with Step 3. When the value is 8, it means the HMAC module is in
upstream mode, proceed with Step 4.
3. Downstream mode
(a) Poll Status register HMAC_QUERY_BUSY_REG. When the value of this register is 0, HMAC
calculation in downstream mode is completed.
(b) In downstream mode, the calculation result is used by either the JTAG or DS module in the hardware.
To clear the result and make further usage of the dependent hardware (JTAG or DS), write 1 to either
register HMAC_SET_INVALIDATE_JTAG_REG to clear the result generated by JTAG key; or to register
HMAC_SET_INVALIDATE_DS_REG to clear the result generated by DS key.
(a) Poll Status register HMAC_QUERY_BUSY_REG. When the value of this register is 0, go to step 4(b).
(c) Poll Status register HMAC_QUERY_BUSY_REG. When the value of this register is 0, go to step 4(d).
(d) Different message blocks will be generated, depending on whether the size of the to-be-processed
message is a multiple of 512 bits.
• If the bit length of the message is a multiple of 512 bits, there are three possible options:
ii. If Block_n is the last block of the message and the user wants to apply SHA padding in
hardware, write 1 to register HMAC_SET_MESSAGE_END_REG, and then jump to step 6.
iii. If Block_n is the last block of the padded message and the user has applied SHA padding in
software, write 1 to register HMAC_SET_MESSAGE_PAD_REG, and then jump to step 5.
• If the bit length of the message is not a multiple of 512 bits, there are three possible options as
follows. Note that in this case, the user should apply SHA padding to the message, after which
the padded message length should be a multiple of 512 bits.
i. If Block_n is the only message block, n = 1, and Block_1 has included all padding bits, write
1 to register HMAC_ONE_BLOCK_REG, and then jump to step 6.
iii. If Block_n is neither the last nor the second to last message block, write 1 to register
HMAC_SET_MESSAGE_ING_REG and define n = n + 1, and then jump to step 4.(b).
(a) After applying SHA padding to the last message block as described in Section 21.3.1, write this block
to register HMAC_WDATA0~15_REG, and then write 1 to register
HMAC_SET_MESSAGE_ONE_REG. Then the HMAC module will calculate this message block.
(a) Poll Status register HMAC_QUERY_BUSY_REG. When the value of this register is 0, go to the next
step.
Note:
The SHA accelerator can be called directly, or used internally by the DS module and the HMAC module. However, they
can not share the hardware resources simultaneously. Therefore, SHA module can not be called by the CPU nor DS
module when the HMAC module is in use.
As shown in Figure 21-1, suppose the length of the unpadded message is m bits. Padding steps are as
follows:
1. Append one bit of value “1” to the end of the unpadded message;
2. Append k bits of value “0”, where k is the smallest non-negative number which satisfies
m + 1 + k≡448(mod512);
3. Append a 64-bit integer value as a binary block. This block includes the length of the unpadded message
as a big-endian binary integer value m.
In downstream mode, there is no need to input any message or apply padding. In upstream mode, if the length
of the unpadded message is a multiple of 512 bits, the user can choose to configure hardware to apply the SHA
padding. If the length is not a multiple of 512 bits, the user must apply the SHA padding manually. For detailed
steps, please see Section 21.2.6.
In Figure 21-2:
The HMAC module appends a 256-bit 0 sequence after the bit sequence of the 256-bit key K in order to get a
512-bit K0 . Then, the HMAC module XORs K0 with ipad to get the 512-bit S1. Afterwards, the HMAC module
appends the input message (multiple of 512 bits) after the 512-bit S1, and exercises the SHA-256 algorithm to
get the 256-bit H1.
The HMAC module appends the 256-bit SHA-256 hash result H1 to the 512-bit S2 value, which is calculated
using the XOR operation of K0 and opad. A 768-bit sequence will be generated. Then, the HMAC module uses
the SHA padding algorithm described in Section 21.3.1 to pad the 768-bit sequence to a 1024-bit sequence,
and applies the SHA-256 algorithm to get the final hash result (256-bit).
21.5 Registers
The addresses in this section are relative to HMAC Accelerator base address provided in Table 4-3 in Chapter 4
System and Memory.
TR
TA
_S
ET
d)
_S
ve
AC
ser
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
ET
_S
SE
PO
UR
)
_P
ed
rv
AC
se
HM
(re
31 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
HMAC_PURPOSE_SET Set HMAC parameter purpose, please see Table 21-1. (WO)
ET
_S
EY
)
_K
ed
rv
AC
se
HM
(re
31 3 2 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
HMAC_KEY_SET Set HMAC parameter key. There are six keys with index 0 ~ 5. Write the index of
the selected key to this field. (WO)
D
EN
A_
AR
_P
ET
)
_S
ed
rv
AC
se
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
NE
O
T_
EX
_T
ET
d)
_S
e
rv
AC
se
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
G
_ IN
EXT
_T
ET
d)
_S
ve
AC
r
se
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
HMAC_SET_TEXT_ING Set this bit to show there are still some message blocks to be processed.
(WO)
D
_EN
XT
E
_T
ET
)
_S
ed
rv
AC
se
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
D
EN
_
LT
SU
E
_R
ET
d)
_S
e
rv
AC
se
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
HMAC_SET_RESULT_END After read result from upstream, then let HMAC back to idle. (WO)
G
TA
E_J
AT
ID
AL
NV
_I
ET
)
_S
ed
rv
AC
se
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
HMAC_SET_INVALIDATE_JTAG Set this bit to clear calculation results when re-enabling JTAG in
downstream mode. (WO)
S
_D
E
AT
ID
AL
NV
_I
ET
d)
_S
ve
AC
ser
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
HMAC_SET_INVALIDATE_DS Set this bit to clear calculation results of the DS module in downstream
mode. (WO)
CK
HE
_C
EY
UR
d)
_Q
e
rv
AC
se
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
• 1: error. (RO)
E
AT
ST
Y_
US
)
_B
ed
rv
AC
se
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
• 1’b0: idle.
0_
TA
DA
_W
AC
HM
31 0
0 Reset
_0
TA
DA
_R
AC
HM
31 0
0 Reset
D
_ PA
XT
E
_T
ET
d)
_S
ve
AC
r
se
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
_S
ed
rv
AC
se
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
L
TR
_C
G
TA
_J
FT
O
d)
_S
ve
AC
ser
HM
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
AG
JT
R_
_W
AC
HM
31 0
0 Reset
_D
ed
rv
AC
se
HM
(re
31 30 29 0
0 0 0x20190402 Reset
22.1 Overview
A Digital Signature is used to verify the authenticity and integrity of a message using a cryptographic algorithm.
This can be used to validate a device’s identity to a server, or to check the integrity of a message.
The ESP32-S3 includes a Digital Signature (DS) module providing hardware acceleration of messages’ signatures
based on RSA. It uses pre-encrypted parameters to calculate a signature. The parameters are encrypted using
HMAC as a key-derivation function. In turn, the HMAC uses eFuses as an input key. The whole process happens
in hardware so that neither the decryption key for the RSA parameters nor the input key for the HMAC key
derivation function can be seen by the users while calculating the signature.
22.2 Features
• RSA Digital Signatures with key length up to 4096 bits
Private key parameters are stored in flash or other memory as ciphertext. They are decrypted using a key
(DS_KEY ) which can only be read by the DS peripheral via the HMAC peripheral. The required inputs
(HM AC_KEY ) to generate the key are only stored in eFuse and can only be accessed by the HMAC peripheral.
The DS peripheral hardware can decrypt the private key, and the private key in plaintext is never accessed by the
software. For more detailed information about eFuse and HMAC peripherals, please refer to Chapter 5 eFuse
Controller and 21 HMAC Accelerator (HMAC) peripheral.
The input message X will be sent directly to the DS peripheral by the software, each time a signature is needed.
After the RSA signature operation, the signature Z is read back by the software.
For better understanding, we define some symbols and functions here, which are only applicable to this
chapter:
• [x]s A bit string of s bits, in which s should be the integral multiple of 8 bits. If x is a number (x < 2s ), it is
represented in little endian byte order in the bit string. x may be a variable value such as [Y ]4096 or as a
hexadecimal constant such as [0x0C]8 . If necessary, the value [x]t can be right-padded with (s − t)
number of 0 to reach s bits in length, and finally get [x]s . For example, [0x05]8 = 00000101,
[0x05]16 = 0000010100000000, [0x0005]16 = 0000000000000101, [0x13]8 = 00010011,
[0x13]16 = 0001001100000000, [0x0013]16 = 0000000000010011.
• || A bit string concatenation operator for joining multiple bit strings into a longer bit string.
Operands Y , M , r and M ′ are encrypted by the user along with an authentication digest and stored as a single
ciphertext C. C is inputted to the DS peripheral in this encrypted format, decrypted by the hardware, and then
used for RSA signature calculation. Detailed description of how to generate C is provided in Section
22.3.3.
The DS peripheral supports RSA signature calculation Z = X Y mod M , in which the length of operands should
be N = 32 × x where x ∈ {1, 2, 3, . . . , 128}. The bit lengths of arguments Z, X, Y , M and r should be an
arbitrary value in N , and all of them in a calculation must be of the same length, while the bit length of M ′ should
always be 32. For more detailed information about RSA calculation, please refer to Section 20.3.1 Large Number
Modular Exponentiation in Chapter 20 RSA Accelerator (RSA).
Note:
1. The software preparation (left side in the Figure 22-1) is a one-time operation before any signature is calculated,
while the hardware calculation (right side in the Figure 1-1) repeats for every signature calculation.
Users need to follow the steps shown in the left part of Figure 22-1 to calculate C. Detailed instructions are as
follows:
• Step 1: Prepare operands Y and M whose lengths should meet the requirements in Section 22.3.2.
N
Define [L]32 = 32 (i.e., for RSA 4096, [L]32 == [0x80]32 ). Prepare [HM AC_KEY ]256 and calculate
[DS_KEY ]256 based on DS_KEY = HMAC-SHA256 ([HM AC_KEY ]256 , 1256 ). Generate a random
[IV ]128 which should meet the requirements of the AES-CBC block encryption algorithm. For more
information on AES, please refer to Chapter 19 AES Accelerator (AES).
• Step 3: Extend Y , M and r, in order to get [Y ]4096 , [M ]4096 and [r]4096 , respectively. This step is only
required for Y , M and r whose length are less than 4096 bits, since their largest length are 4096 bits.
• Step 5: Build [P ]12672 = ( [Y ]4096 ||[M ]4096 ||[r]4096 ||[M D]256 ||[M ′ ]32 ||[L]32 ||[β]64 ), where [β]64 is a PKCS#7
padding value, i.e., a 64-bit string [0x0808080808080808]64 composed of 8 bytes (value = 0x80). The
purpose of [β]64 is to make the bit length of P a multiple of 128.
• Step 6: Calculate C = [C]12672 = AES-CBC-ENC ([P ]12672 , [DS_KEY ]256 , [IV ]128 ), where C is the
ciphertext with length of 12672 bits.
The DS operation at the hardware level can be divided into the following three stages:
The decryption process is the inverse of Step 6 in figure 22-1. The DS peripheral will call AES accelerator to
decrypt C in CBC block mode and get the resulted plaintext. The decryption process can be represented
by P = AES-CBC-DEC (C, DS_KEY , IV ), where IV (i.e., [IV ]128 ) is defined by users. [DS_KEY ]256 is
provided by HMAC module, derived from HM AC_KEY stored in eFuse. [DS_KEY ]256 , as well as
[HM AC_KEY ]256 are not readable by users.
With P, the DS peripheral can derive [Y ]4096 , [M ]4096 , [r]4096 , [M ′ ]32 , [L]32 , MD authentication code, and
the padding value [β]64 . This process is the inverse of Step 5.
The DS peripheral will perform two checks: MD check and padding check. Padding check is not shown in
Figure 22-1, as it happens at the same time with MD check.
• Padding check: The DS peripheral checks if [β]64 complies with the aforementioned PKCS#7 format.
Only when [β]64 complies with the format, padding check passes.
The DS peripheral will only perform subsequent operations if MD check passes. If padding check fails, an
error bit is set in the query register, but it does not affect the subsequent operations, i.e., it is up to the user
to proceed or not.
The DS peripheral treats X (input by users) and Y , M , r (compiled) as big numbers. With M ′ , all operands
to perform X Y mod M are in place. The operand length is defined by L. The DS peripheral will get the
signed result Z by calling RSA to perform Z = X Y mod M .
We assume that the software has called the HMAC peripheral and HMAC on the hardware has calculated
DS_KEY based on HM AC_KEY .
If the software does not read 0 in DS_QUERY_BUSY_REG after approximately 1 ms, it indicates a problem
with HMAC initialization. In such a case, the software can read register DS_QUERY_KEY_WRONG_REG to
get more information:
• If the software reads 0 in DS_QUERY_KEY_WRONG_REG, it indicates that the HMAC peripheral has
not been activated.
4. Configure register: Write IV block to register DS_IV_m_REG (m: 0-3). For more information on the IV
block, please refer to Chapter 19 AES Accelerator (AES).
6. Write C to memory block DS_C_MEM: Write Ci (i ∈ {0, 1, . . . , 395}) to memory block DS_C_MEM
whose capacity is 396 words. Each word can store one base-b digit.
8. Wait for the operation to be completed: Poll register DS_QUERY_BUSY_REG until the software reads 0.
9. Query check result: Read register DS_QUERY_CHECK_REG and determine the subsequent operations
based on the return value.
• If the value is 0, it indicates that both padding check and MD check pass. Users can continue to get
the signed result Z.
• If the value is 1, it indicates that the padding check passes but MD check fails. The signed result Z is
invalid. The operation will resume directly from Step 11.
• If the value is 2, it indicates that the padding check fails but MD check passes. Users can continue to
get the signed result Z. But please note that the data encapsulation format does not complie with the
aforementioned PKCS#7 format, which may not be what you want.
• If the value is 3, it indicates that both padding check and MD check fail. In this case, some fatal errors
may occurred and the signed result Z is invalid. The operation will resume directly from Step 11.
10. Read the signed result: Read the signed result Zi (i ∈ {0, 1, . . . , n − 1}), where n = N
32 , from memory
block DS_Z_MEM. The memory block stores Z in little-endian byte order.
11. Exit the operation: Write 1 to DS_SET_FINISH_REG, then poll DS_QUERY_BUSY_REG until the software
reads 0.
After the operation, all the input/output registers and memory blocks are cleared.
22.6 Registers
The addresses in this section are relative to the Digital Signature base address provided in Table 4-3 in Chapter 4
System and Memory.
)
-3
:0
(m
EG
_R
m
V_
_I
DS
31 0
0x000000000 Reset
RT
TA
_S
d)
ET
ve
_S
r
se
DS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
E
_M
)
ed
ET
rv
_S
se
DS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
ET
ve
_S
r
se
DS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
SY
_ BU
RY
d)
UE
ve
Q
r
se
_
DS
(re
31 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
NG
RO
W
Y_
_ KE
RY
)
ed
UE
rv
_Q
se
DS
(re
31 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
DS_QUERY_KEY_WRONG 1-15: HMAC was activated, but the DS peripheral did not successfully
receive the DS_KEY from the HMAC peripheral. (The biggest value is 15); 0: HMAC is not
activated. (RO)
RO AD
ER _B
R
D_ NG
_M DI
d)
DS PAD
e
rv
se
_
DS
(re
31 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
DS_PADDING_BAD 1: The padding check fails; 0: The padding check passes. (RO)
E
ed
AT
rv
_D
se
DS
(re
31 30 29 0
0 0 0x20191217 Reset
23.1 Overview
The ESP32-S3 integrates an External Memory Encryption and Decryption module that complies with the
XTS_AES standard algorithm specified in IEEE Std 1619-2007, providing security for users’ application code and
data stored in the external memory (flash and RAM). Users can store proprietary firmware and sensitive data
(e.g., credentials for gaining access to a private network) to the external flash, or store general data to the
external RAM.
23.2 Features
• General XTS_AES algorithm, compliant with IEEE Std 1619-2007
• Encryption and decryption functions jointly determined by registers configuration, eFuse parameters, and
boot mode
The Manual Encryption block can encrypt instructions/data which will then be written to the external flash as
ciphertext via SPI1.
When the CPU writes data to the external RAM through cache, the Auto Encryption block will automatically
encrypt the data first, then the data will be written to the external RAM as ciphertext.
When the CPU reads from the external flash or external RAM through cache, the Auto Decryption block will
automatically decrypt the ciphertext to retrieve instructions and data.
In the System Registers (SYSREG) peripheral, the following four bits in register
SYSTEM_EXTERNAL_DEVICE_ENCRYPT_DECRYPT_CONTROL_REG are relevant to the external memory
encryption and decryption:
• SYSTEM_ENABLE_DOWNLOAD_MANUAL_ENCRYPT
• SYSTEM_ENABLE_DOWNLOAD_G0CB_DECRYPT
• SYSTEM_ENABLE_DOWNLOAD_DB_ENCRYPT
• SYSTEM_ENABLE_SPI_MANUAL_ENCRYPT
The XTS_AES module also fetches two parameters from the peripheral 5 eFuse Controller, which are:
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT and EFUSE_SPI_BOOT_CRYPT_CNT.
23.4.2 Key
The Manual Encryption block, Auto Encryption block and Auto Decryption block share the same Key when
implementing XTS algorithm. The Key is provided by the eFuse hardware and cannot be accessed by
users.
The Key can be either 256-bit or 512-bit long. The value and length of the Key are determined by eFuse
parameters. For easier description, now define:
There are five possibilities of how the Key is generated depending on whether BlockA , BlockB and BlockC exists
or not, as shown in Table 23-1. In each case, the Key can be uniquely determined by BlockA , BlockB or
BlockC .
Notes:
“YES” indicates that the block exists; “NO” indicates that the block does not exist; “0256 ” indicates a bit string
that consists of 256-bit zeros; “||” is a bonding operator for joining one bit string to another.
For more information of key purposes, please refer to Table 5-2 Secure Key Purpose Values in Chapter 5 eFuse
Controller.
• Type: the type of the target memory space, either external flash or external RAM. Value 0 indicates external
flash, while 1 indicates external RAM.
• Size: the size of the target memory space, indicating the number bytes encrypted in one encryption
operation, which supports 16, 32 or 64 bytes.
• Base address: the base_addr of the target memory space. It is a 30-bit physical address, with range of
0x0000_0000 ~ 0x3FFF_FFFF. It should be aligned to size, i.e., base_addr%size == 0.
For example, if there are 16 bytes of instruction data need to be encrypted and written to address 0x130 ~ 0x13F
in the external flash, then the target space is 0x130 ~ 0x13F, type is 0 (external flash), size is 16 (bytes), and base
address is 0x130.
The encryption of any length (must be multiples of 16 bytes) of plaintext instruction/data can be completed
separately in multiple operations, and each operation has individual target memory space and the relevant
parameters.
For Auto Encryption/Decryption blocks, these parameters are automatically defined by hardware. For Manual
Encryption block, these parameters should be configured manually by users.
Note:
The “tweak” defined in Chapter 5.1 Data units and tweaks of IEEE Std 1619-2007 is a 128-bit non-negative integer
(tweak), which can be generated according to tweak = type ∗ 230 + (base_addr & 0x3FFFFF80). The lowest 7 bits
and the highest 97 bits in tweak are always zero.
registers block which consists of 16 registers, i.e., XTS_AES_PLAIN_n_REG (n: 0-15), that are dedicated to data
padding and can store up to 512 bits of plaintext instructions/data.
Actually, the Manual Encryption block does not care where the plaintext comes from, but only where the
ciphertext will be stored. Because of the strict correspondence between plaintext and ciphertext, in order to
better describe how the plaintext is stored in the register block, we assume that the plaintext is stored in the
target memory space in the first place and replaced by ciphertext after encryption. Therefore, the following
description no longer has the concept of “plaintext”, but uses “target memory space” instead. Please note that
the plaintext can come from everywhere in actual use, but users should understand how the plaintext is stored in
the register block.
For example, if the size of the target memory space is 64, then all the 16 registers will be used for data storage.
The mapping between of f set and registers is shown in Table 23-2.
The Manual Encryption block is operational only under certain conditions. The operating conditions
are:
Note:
• Even though the CPU can skip cache and get the encrypted instruction/data directly by reading the external mem-
ory, users can by no means access Key.
The Auto Encryption block is operational only under certain conditions. The operating conditions are:
If the first bit or the third bit in parameter SPI_BOOT_CRYPT_CNT (3 bits) is set to 1, then the Auto
Encryption block can be enabled. Otherwise, it is not operational.
Note:
• When the Auto Encryption block is enabled, it will automatically encrypt data if the CPU writes data to the external
RAM, and then the encrypted ciphertext will be written to the external RAM. The entire encryption process does
not need software participation and is transparent to the cache. Users can by no means obtain the encryption Key
during the process.
• When the Auto Encryption block is disabled, it will ignore the CPU’s access request to cache and do not process
the data. Therefore, the data will be written to the external RAM as plaintext directly.
The Auto Decryption block is operational only under certain conditions. The operating conditions are:
If the first bit or the third bit in parameter SPI_BOOT_CRYPT_CNT (3 bits) is set to 1, then the Auto
Decryption block can be enabled. Otherwise, it is not operational.
Note:
• When the Auto Decryption block is enabled, it will automatically decrypt the ciphertext if the CPU reads instruction-
s/data from the external memory via cache to retrieve the instructions/data. The entire decryption process does
not need software participation and is transparent to the cache. Users can by no means obtain the decryption Key
during the process.
• When the Auto Decryption block is disabled, it does not have any effect on the contents stored in the external
memory, no matter they are encrypted or not. Therefore, what the CPU reads via cache is the original information
stored in the external memory.
1. Configure XTS_AES:
For definitions of type, base_addr and size, please refer to Section 23.4.3.
2. Pad plaintext data to the registers block XTS_AES_PLAIN_n_REG (n: 0-15). For detailed information,
please refer to Section 23.4.4.
Please pad data to registers according to your actual needs, and the unused ones could be set to arbitrary
values.
3. Wait for Manual Encrypt block to be idle. Poll register XTS_AES_STATE_REG until the software reads 0.
5. Wait for the encryption process. Poll register XTS_AES_STATE_REG until the software reads 2.
Step 1 to 5 are the steps of encrypting plaintext instructions with the Manual Encryption block using the
Key.
6. Grant the ciphertext access to SPI1. Write 1 to register XTS_AES_RELEASE_REG to grant SPI1 the
access to the encrypted ciphertext. After this, the value of register XTS_AES_STATE_REG will become 3.
7. Call SPI1 to write the ciphertext in the external flash (see Chapter 30 SPI Controller (SPI)).
8. Destroy the ciphertext. Write 1 to register XTS_AES_DESTROY_REG. After this, the value of register
XTS_AES_STATE_REG will become 0.
23.7 Registers
The addresses in this section are relative to the External Memory Encryption and Decryption base address
provided in Table 4-3 in Chapter 4 System and Memory.
n
N_
AI
PL
S_
AE
S_
XT
31 0
0x000000 Reset
ZE
SI
NE
LI
S_
)
ed
AE
rv
S_
se
XT
(re
31 2 1 0
0x00000000 0 Reset
• 0: 16 bytes;
• 1: 32 bytes;
• 2: 64 bytes. (R/W)
AE
rv
S_
se
XT
(re
31 1 0
0x00000000 0 Reset
XTS_AES_DESTINATION Configures the type of the external memory. Currently, it must be set to 0,
as the Manual Encryption block only supports flash encryption. Errors may occur if users write 1.
0: flash; 1: external RAM. (R/W)
SS
RE
DD
_A
AL
IC
YS
PH
S_
d)
AE
ve
er
S_
s
XT
(re
31 30 29 0
ER
G
IG
TR
S_
d)
AE
e
rv
S_
se
XT
(re
31 1 0
0x00000000 x Reset
E
AS
LE
RE
S_
)
ed
AE
rv
S_
se
XT
(re
31 1 0
0x00000000 x Reset
AE
rve
S_
se
XT
(re
31 1 0
0x00000000 x Reset
E
AT
ST
S_
)
ed
AE
rv
S_
se
XT
(re
31 2 1 0
• 0x2 (XTS_AES_DONE): encryption is completed, but the encrypted result is not accessible to
SPI;
AE
e
rv
S_
se
XT
(re
31 30 29 0
0 0 0x20200111 Reset
24.2
2. Functional Description
功能描述
24.2.1 Clock Glitch Detection
2.1 毛刺检测
The Clock Glitch Detection module on ESP32-S3 monitors input clock signals from XTAL_CLK. If it detects a
ESP32-S2
glitch, 的毛刺检测模块将对输入芯片的
namely a clock XTAL_CLK
pulse (a or b in the figure below) shorter than 3 ns, input clock signals ,a
with a width 时钟信号进行检测,当时钟的脉宽 或
from :)小
于 3ns 时,将认为检测到毛刺,触发毛刺检测信号
XTAL_CLK are blocked. ,屏蔽输入的 XTAL_CLK 时钟信号。
a a
XTAL_CLK
b
2.2 中断及复位
24.2.2 Reset
当毛刺检测信号触发后,毛刺检测模块将向系统发送中断,GLITCH_DET_INT),如果
Once detecting a glitch on XTAL_CLK that affects the circuit’s normal operation, the Clock Glitch Detection
RTC_CNTL_GLITCH_RST_EN 使能,将触发系统级复位。
module triggers a system reset if RTC_CNTL_GLITCH_RST_EN bit is enabled. By default, this bit is set to enable
a reset.
25.1 Introduction
The ESP32-S3 contains a true random number generator, which generates 32-bit random numbers that can be
used for cryptographical operations, among other things.
25.2 Features
The random number generator in ESP32-S3 generates true random numbers, which means random number
generated from a physical process, rather than by means of an algorithm. No number generated within the
specified range is more or less likely to appear than any other number.
Thermal noise comes from the high-speed ADC or SAR ADC or both. Whenever the high-speed ADC or SAR
ADC is enabled, bit streams will be generated and fed into the random number generator through an XOR logic
gate as random seeds.
When the RC_FAST_CLK clock is enabled for the digital core, the random number generator will also sample
RC_FAST_CLK (20 MHz) as a random bit seed. RC_FAST_CLK is an asynchronous clock source and it
increases the RNG entropy by introducing circuit metastability. However, to ensure maximum entropy, it’s
recommended to always enable an ADC source as well.
Random bit
SAR ADC
seeds XOR
XOR
Random RNG_DATA_REG
Number
Generator
High Speed Random bit
ADC seeds
Random bit
RC_FAST_CLK
seeds
When there is noise coming from the SAR ADC, the random number generator is fed with a 2-bit entropy in one
clock cycle of RC_FAST_CLK (20 MHz), which is generated from an internal RC oscillator (see Chapter 7 Reset
and Clock for details). Thus, it is advisable to read the RNG_DATA_REG register at a maximum rate of 500 kHz to
obtain the maximum entropy.
When there is noise coming from the high-speed ADC, the random number generator is fed with a 2-bit entropy
in one APB clock cycle, which is normally 80 MHz. Thus, it is advisable to read the RNG_DATA_REG register at a
maximum rate of 5 MHz to obtain the maximum entropy.
• SAR ADC can be enabled by using the DIG ADC controller. For details, please refer to Chapter 39 On-Chip
Sensors and Analog Signal Processing.
• High-speed ADC is enabled automatically when the Wi-Fi or Bluetooth modules is enabled.
Note:
Note that, when the Wi-Fi module is enabled, the value read from the high-speed ADC can be saturated in some extreme
cases, which lowers the entropy. Thus, it is advisable to also enable the SAR ADC as the noise source for the random
number generator for such cases.
When using the random number generator, read the RNG_DATA_REG register multiple times until sufficient
random numbers have been generated. Ensure the rate at which the register is read does not exceed the
frequencies described in section 25.3 above.
25.6 Register
The address in this section is relative to the random number generator base address provided in Table 4-3 in
Chapter 4 System and Memory.
31 0
0x00000000 Reset
26.1 Overview
In embedded system applications, data are required to be transferred in a simple way with minimal system
resources. This can be achieved by a Universal Asynchronous Receiver/Transmitter (UART), which flexibly
exchanges data with other peripheral devices in full-duplex mode. ESP32-S3 has three UART controllers
compatible with various UART devices. They support Infrared Data Association (IrDA) and RS485
transmission.
Each of the three UART controllers has a group of registers that function identically. In this chapter, the three
UART controllers are referred to as UARTn, in which n denotes 0, 1, or 2.
A UART is a character-oriented data link for asynchronous communication between devices. Such
communication does not provide any clock signal to send data. Therefore, in order to communicate successfully,
the transmitter and the receiver must operate at the same baud rate with the same stop bit and parity bit.
A UART data frame usually begins with one start bit, followed by data bits, one parity bit (optional) and one or
more stop bits. UART controllers on ESP32-S3 support various lengths of data bits and stop bits. These
controllers also support software and hardware flow control as well as GDMA for seamless high-speed data
transfer. This allows developers to use multiple UART ports at minimal software cost.
26.2 Features
Each UART controller has the following features:
• 1024 x 8-bit RAM shared by TX FIFOs and RX FIFOs of the three UART controllers
• Parity bit
• RS485 protocol
• IrDA protocol
Figure 26-1 shows the basic structure of a UART controller. A UART controller works in two clock domains,
namely APB_CLK domain and Core Clock domain (the UART Core’s clock domain). The UART Core has three
clock sources: 80 MHz APB_CLK, FOSC_CLK and external crystal clock XTAL_CLK (for details, please refer to
Chapter 7 Reset and Clock), which are selected by configuring UART_SCLK_SEL. The selected clock source is
divided by a divider to generate clock signals that drive the UART Core.
A UART controller is broken down into two parts: a transmitter and a receiver.
The transmitter contains a FIFO, called TX FIFO (or Tx_FIFO), which buffers data to be sent. Software can write
data to the Tx_FIFO either via the APB bus, or using GDMA. Tx_FIFO_Ctrl controls writing and reading the
Tx_FIFO. When Tx_FIFO is not empty, Tx_FSM reads data bits in the data frame via Tx_FIFO_Ctrl, and converts
them into a bitstream. The levels of output signal txd_out can be inverted by configuring UART_TXD_INV
field.
The receiver also contains a FIFO, called RX FIFO (or Rx_FIFO), which buffers received data. The levels of input
signal rxd_in can be inverted by configuring UART_RXD_INV field. Baudrate_Detect measures the baud rate of
input signal rxd_in by detecting its minimum pulse width. Start_Detect detects the start bit in a data frame. If the
start bit is detected, Rx_FSM stores data bits in the data frame into Rx_FIFO by Rx_FIFO_Ctrl. Software can read
data from Rx_FIFO via the APB bus, or receive data using GDMA.
HW_Flow_Ctrl controls rxd_in and txd_out data flows by standard UART RTS and CTS flow control signals
(rtsn_out and ctsn_in). SW_Flow_Ctrl controls data flows by automatically adding special characters to outgoing
When a UART controller is in Light-sleep mode (see Chapter 10 Low-power Management (RTC_CNTL) for more
details), Wakeup_Ctrl counts up rising edges of rxd_in. When the number reaches UART_ACTIVE_THRESHOLD
+ 2, a wake_up signal is generated and sent to RTC, which then wakes up the ESP32-S3 chip.
When the frequency of the UART Core’s clock is higher than the frequency needed to generate baud rate, the
UART Core can be clocked at a lower frequency by the divider, in order to reduce power consumption. Usually,
the UART Core’s clock frequency is lower than the APB_CLK’s frequency, and can be divided by the largest
divisor value when higher than the frequency needed to generate baud rate. The frequency of the UART Core’s
clock can also be at most twice higher than the APB_CLK. The clock for the UART transmitter and the UART
receiver can be controlled independently. To enable the clock for the UART transmitter, UART_TX_SCLK_EN
shall be set; to enable the clock for the UART receiver, UART_RX_SCLK_EN shall be set.
Section 26.5 explains the procedure to ensure that the configured register values are synchronized between
APB_CLK domain and Core Clock domain.
Section 26.5.2.1 explains the procedure to reset the whole UART controller. Note that it is not recommended to
only reset the APB clock domain module or UART Core.
All three UART controllers on ESP32-S3 share 1024 × 8 bits of RAM. As Figure 26-2 illustrates, the RAM is
divided into 8 blocks, each has 128 × 8 bits. Figure 26-2 shows how many RAM blocks are allocated by default
to TX and RX FIFOs for each of the three UART controllers. UARTn Tx_FIFO can be expanded by configuring
UART_TX_SIZE, while UARTn Rx_FIFO can be expanded by configuring UART_RX_SIZE. Some limits are
imposed:
• UART1 Tx_FIFO can be increased up to 7 blocks (from offset 128 to the end address);
• UART2 Tx_FIFO can be increased up to 6 blocks (from offset 256 to the end address);
• UART0 Rx_FIFO can be increased up to 4 blocks (from offset 512 to the end address);
• UART1 Rx_FIFO can be increased up to 3 blocks (from offset 640 to the end address);
• UART2 Rx_FIFO can be increased up to 2 blocks (from offset 768 to the end address).
Please note that starting addresses of all FIFOs are fixed, so expanding one FIFO may take up the default space
of other FIFOs. For example, by setting UART_TX_SIZE of UART0 to 2, the size of UART0 Tx_FIFO is increased
by 128 bytes (from offset 0 to offset 255). In this case, UART0 Tx_FIFO takes up the default space for UART1
Tx_FIFO, and UART1’s transmitting function cannot be used as a result.
When neither of the three UART controllers is active, RAM can enter low-power mode by setting
UART_MEM_FORCE_PD.
The ”empty” signal threshold for Tx_FIFO is configured by setting UART_TXFIFO_EMPTY_THRHD. When data
stored in Tx_FIFO is less than UART_TXFIFO_EMPTY_THRHD, a UART_TXFIFO_EMPTY_INT interrupt is
generated. The ”full” signal threshold for Rx_FIFO is configured by setting UART_RXFIFO_FULL_THRHD. When
data stored in Rx_FIFO is equal to or greater than UART_RXFIFO_FULL_THRHD, a UART_RXFIFO_FULL_INT
interrupt is generated. In addition, when Rx_FIFO receives more data than its capacity, a
UART_RXFIFO_OVF_INT interrupt is generated.
TX FIFO and RX FIFO can be accessed via the APB bus or GDMA. Access via the APB bus is performed through
register UART_FIFO_REG. You can put data into TX FIFO by writing UART_RXFIFO_RD_BYTE, and get data in
RX FIFO by reading this exact same field. For access via GDMA, please refer to Section 26.4.10.
Before a UART controller sends or receives data, the baud rate should be configured by setting corresponding
registers. The baud rate generator of a UART controller functions by dividing the input clock source. It can divide
the clock source by a fractional amount. The divisor is configured by UART_CLKDIV_REG: UART_CLKDIV for the
integer part, and UART_CLKDIV_FRAG for the fractional part. When using the 80 MHz input clock, the UART
controller supports a maximum baud rate of 5 Mbaud.
where INPUT_FREQ is the frequency of UART Core’s source clock. For example, if UART_CLKDIV = 694 and
UART_CLKDIV_FRAG = 7 then the divisor value is
7
694 + = 694.4375
16
When UART_CLKDIV_FRAG is 0, the baud rate generator is an integer clock divider where an output pulse is
generated every UART_CLKDIV input pulses.
When UART_CLKDIV_FRAG is not 0, the divider is fractional and the output baud rate clock pulses are not
strictly uniform. As shown in Figure 26-3, for every 16 output pulses, the frequency of some pulses is
INPUT_FREQ/(UART_CLKDIV + 1), and the frequency of the other pulses is INPUT_FREQ/UART_CLKDIV. A total
of UART_CLKDIV_FRAG output pulses are generated by dividing (UART_CLKDIV + 1) input pulses, and the
remaining (16 - UART_CLKDIV_FRAG) output pulses are generated by dividing UART_CLKDIV input
pulses.
The output pulses are interleaved as shown in Figure 26-3 below, to make the output timing more uniform:
To support IrDA (see Section 26.4.6 for details), the fractional clock divider for IrDA data transmission generates
clock signals divided by 16 × UART_CLKDIV_REG. This divider works similarly as the one elaborated above: it
takes UART_CLKDIV/16 as the integer value and the lowest four bits of UART_CLKDIV as the fractional
value.
Automatic baud rate detection (Autobaud) on UARTs is enabled by setting UART_AUTOBAUD_EN. The
Baudrate_Detect module shown in Figure 26-1 filters any noise whose pulse width is shorter than
UART_GLITCH_FILT.
Before communication starts, the transmitter can send random data to the receiver for baud rate detection.
UART_LOWPULSE_MIN_CNT stores the minimum low pulse width, UART_HIGHPULSE_MIN_CNT stores the
minimum high pulse width, UART_POSEDGE_MIN_CNT stores the minimum pulse width between two rising
edges, and UART_NEGEDGE_MIN_CNT stores the minimum pulse width between two falling edges. These four
fields are read by software to determine the transmitter’s baud rate.
Figure 264. The Timing Diagram of Weak UART Signals Along Falling Edges
1. Normally, to avoid sampling erroneous data along rising or falling edges in metastable state, which results in
inaccuracy of UART_LOWPULSE_MIN_CNT or UART_HIGHPULSE_MIN_CNT, use a weighted average of
these two values to eliminate errors. In this case, baud rate is calculated as follows:
fclk
Buart =
(UART_LOWPULSE_MIN_CNT + UART_HIGHPULSE_MIN_CNT + 2)/2
2. If UART signals are weak along falling edges as shown in Figure 26-4, which leads to inaccurate average of
UART_LOWPULSE_MIN_CNT and UART_HIGHPULSE_MIN_CNT, use UART_POSEDGE_MIN_CNT to
determine the transmitter’s baud rate as follows:
fclk
Buart =
(UART_POSEDGE_MIN_CNT + 1)/2
3. If UART signals are weak along rising edges, use UART_NEGEDGE_MIN_CNT to determine the
transmitter’s baud rate as follows:
fclk
Buart =
(UART_NEGEDGE_MIN_CNT + 1)/2
Figure 26-5 shows the basic structure of a data frame. A frame starts with one START bit, and ends with STOP
bits which can be 1, 1.5, 2 or 3 bits long, configured by UART_STOP_BIT_NUM, UART_DL1_EN and
UART_DL0_EN. The START bit is logical low, whereas STOP bits are logical high.
The actual data length can be anywhere between 5 ~ 8 bits, configured by UART_BIT_NUM. When
UART_PARITY_EN is set, a parity bit is added after data bits. UART_PARITY is used to choose even parity or
odd parity. When the receiver detects a parity bit error in data received, a UART_PARITY_ERR_INT interrupt is
generated, and the erroneous data are still stored into the RX FIFO. When the receiver detects a data frame error,
a UART_FRM_ERR_INT interrupt is generated, and the erroneous data by default is stored into the RX
FIFO.
If all data in Tx_FIFO have been sent, a UART_TX_DONE_INT interrupt is generated. After this, if the
UART_TXD_BRK bit is set then the transmitter will send several low level bits, namely delimiters, to separate data
packets. The number of low level bits is configured by UART_TX_BRK_NUM. Once the transmitter has sent all
delimiters, a UART_TX_BRK_DONE_INT interrupt is generated. The minimum interval between data frames can
be configured using UART_TX_IDLE_NUM. If the transmitter stays idle for UART_TX_IDLE_NUM or more time (in
the unit of bit time, i.e. the time it takes to transfer one bit), a UART_TX_BRK_IDLE_DONE_INT interrupt is
generated.
Figure 26-6 is the structure of a special character AT_CMD. If the receiver constantly receives AT_CMD_CHAR
and the following conditions are met, a UART_AT_CMD_CHAR_DET_INT interrupt is generated. The specific
value of AT_CMD_CHAR can be read from UARTn_AT_CMD_CHAR.
• The interval between the first AT_CMD_CHAR and the last non-AT_CMD_CHAR character is at least
UART_PRE_IDLE_NUM cycles.
• The interval between two AT_CMD_CHAR characters is less than UART_RX_GAP_TOUT cycles.
• The interval between the last AT_CMD_CHAR character and next non-AT_CMD_CHAR character is at least
UART_POST_IDLE_NUM cycles.
26.4.5 RS485
All three UART controllers support RS485 protocol. This protocol uses differential signals to transmit data, so it
can communicate over longer distances at higher bit rates than RS232. RS485 has two-wire half-duplex mode
and four-wire full-duplex modes. UART controllers support two-wire half-duplex transmission and bus snooping.
In a two-wire RS485 multidrop network, there can be 32 slaves at most.
As shown in Figure 26-7, in a two-wire multidrop network, an external RS485 transceiver is needed for differential
to single-ended conversion. A RS485 transceiver contains a driver and a receiver. When a UART controller is not
in transmitter mode, the connection to the differential line can be broken by disabling the driver. When the DE
(Driver Enable) signal is 1, the driver is enabled; when DE is 0, the driver is disabled.
The UART receiver converts differential signals to single-ended signals via an external receiver. RE is the enable
control signal for the receiver. When RE is 0, the receiver is enabled; when RE is 1, the receiver is disabled. If RE
is configured as 0, the UART controller is allowed to snoop data on the bus, including data sent by itself.
DE can be controlled by either software or hardware. To reduce the cost of software, DE is controlled by
hardware in our design. As shown in Figure 26-7, DE is connected to dtrn_out of UART (please refer to Section
26.4.9.1 for more details).
transceiver
By default, all three UART controllers work in receiver mode. When a UART controller is switched from
transmitter mode to receiver mode, the RS485 protocol requires a turnaround delay of one cycle after the stop
bit. The UART transmitter supports adding a turnaround delay of one cycle not only before the start bit but also
after the stop bit. When UART_DL0_EN is set, a turnaround delay of one cycle is added before the start bit;
when UART_DL1_EN is set, a turnaround delay of one cycle is added after the stop bit.
In a two-wire multidrop network, UART controllers support bus snooping if RE of the external RS485 transceiver
is 0. By default, a UART controller is not allowed to transmit and receive data simultaneously. If
UART_RS485TX_RX_EN is set and the external RS485 transceiver is configured as in Figure 26-7, a UART
controller may receive data in transmitter mode and snoop the bus. If UART_RS485RXBY_TX_EN is set, a UART
controller may transmit data in receiver mode.
All three UART controllers can snoop data sent by themselves. In transmitter mode, when a UART controller
monitors a collision between data sent and data received, a UART_RS485_CLASH_INT interrupt is generated;
when it monitors a data frame error, a UART_RS485_FRM_ERR_INT interrupt is generated; when it monitors a
polarity error, a UART_RS485_PARITY_ERR_INT is generated.
26.4.6 IrDA
IrDA protocol consists of three layers, namely the physical layer, the link access protocol, and the link
management protocol. The three UART controllers implement IrDA’s physical layer. In IrDA encoding, a UART
controller supports data rates up to 115.2 kbit/s (SIR, or serial infrared mode). As shown in Figure 26-8, the IrDA
encoder converts a NRZ (non-return to zero code) signal to a RZI (return to zero code) signal and sends it to the
external driver and infrared LED. This encoder uses modulated signals whose pulse width is 3/16 bits to indicate
logic “0”, and low levels to indicate logic “1”. The IrDA decoder receives signals from the infrared receiver and
converts them to NRZ signals. In most cases, the receiver is high when it is idle, and the encoder output polarity
is the opposite of the decoder input polarity. If a low pulse is detected, it indicates that a start bit has been
received.
When IrDA function is enabled, one bit is divided into 16 clock cycles. If the bit to be sent is zero, then the 9th,
10th and 11th clock cycle are high.
Figure 268. The Timing Diagram of Encoding and Decoding in SIR mode
The IrDA transceiver is half-duplex, meaning that it cannot send and receive data simultaneously. As shown in
Figure 26-9, IrDA function is enabled by setting UART_IRDA_EN. When UART_IRDA_TX_EN is set (high), the
IrDA transceiver is enabled to send data and not allowed to receive data; when UART_IRDA_TX_EN is reset (low),
the IrDA transceiver is enabled to receive data and not allowed to send data.
26.4.7 Wakeup
UART0 and UART1 can be set as a wake-up source for Light-sleep mode. To be specific Wakeup_Ctrl counts up
the rising edges of rxd_in, and when this count becomes greater than UART_ACTIVE_THRESHOLD + 2, a
wake_up signal is generated and sent to RTC, which then wakes ESP32-S3 up.
Figure 26-10 shows hardware flow control of a UART controller. Hardware flow control uses output signal
rtsn_out and input signal dsrn_in. Figure 26-11 illustrates how these signals are connected between UART on
ESP32-S3 (hereinafter referred to as IU0) and the external UART (hereinafter referred to as EU0).
When rtsn_out of IU0 is low, EU0 is allowed to send data; when rtsn_out of IU0 is high, EU0 is notified to stop
sending data until rtsn_out of IU0 returns to low. The output signal rtsn_out can be controlled in two ways.
• Software control: Enter this mode by clearing UART_RX_FLOW_EN to 0. In this mode, the level of rtsn_out
is changed by configuring UART_SW_RTS.
• Hardware control: Enter this mode by setting UART_RX_FLOW_EN to 1. In this mode, rtsn_out is pulled
high when data in Rx_FIFO exceeds UART_RX_FLOW_THRHD.
When ctsn_in of IU0 is low, IU0 is allowed to send data; when ctsn_in is high, IU0 is not allowed to send data.
When IU0 detects an edge change on ctsn_in, a UART_CTS_CHG_INT interrupt is generated.
If dtrn_out of IU0 is high, it indicates that IU0 is ready to transmit data. dtrn_out is generated by configuring the
UART_SW_DTR field. When the IU0 transmitter detects a edge change on dsrn_in, a UART_DSR_CHG_INT
interrupt is generated. After this interrupt is detected, software can obtain the level of input signal dsrn_in by
reading UART_DSRN. If dsrn_in is high, it indicates that EU0 is ready to transmit data.
In a two-wire RS485 multidrop network enabled by setting UART_RS485_EN, dtrn_out is generated by hardware
and used for transmit/receive turnaround. When data transmission starts, dtrn_out is pulled high and the external
driver is enabled; when data transmission completes, dtrn_out is pulled low and the external driver is disabled.
Please note that when there is turnaround delay of one cycle added after the stop bit, dtrn_out is pulled low after
the delay.
Instead of CTS/RTS lines, software flow control uses XON/XOFF characters to start or stop data transmission.
Such flow control can be enabled by setting UART_SW_FLOW_CON_EN to 1.
When choosing software flow control, the hardware automatically detects if XON and XOFF characters are used
in data flow, and generates a UART_SW_XOFF_INT or a UART_SW_XON_INT interrupt accordingly. When XOFF
character is detected, the transmitter stops data transmission once the current byte has been transmitted; when
XON character is detected, the transmitter starts data transmission. In addition, software can force the
transmitter to stop sending data or to start sending data by setting respectively UART_FORCE_XOFF or
UART_FORCE_XON.
Software determines whether to insert flow control characters according to the remaining room in the RX FIFO.
When UART_SEND_XOFF is set, the transmitter sends an XOFF character configured by UART_XOFF_CHAR
after the current byte in transmission; when UART_SEND_XON is set, the transmitter sends an XON character
configured by UART_XON_CHAR after the current byte in transmission. If the RX FIFO of a UART controller
stores more data than UART_XOFF_THRESHOLD, UART_SEND_XOFF is set by hardware. As a result, the
transmitter sends an XOFF character configured by UART_XOFF_CHAR after the current byte in transmission. If
the RX FIFO of a UART controller stores less data than UART_XON_THRESHOLD, UART_SEND_XON is set by
hardware. As a result, the transmitter sends an XON character configured by UART_XON_CHAR after the current
byte in transmission.
Figure 26-12 shows how data are transferred using GDMA. Before GDMA receives data, software prepares an
inlink (i.e. a linked list of receive descriptors. For details, see Chapter 3 GDMA Controller (GDMA)).
GDMA_INLINK_ADDR_CHn points to the first receive descriptor in the inlink. After GDMA_INLINK_START_CHn
is set, UHCI passes data that UART has received to the decoder. The decoded data are then stored into the
RAM pointed by the inlink under the control of GDMA.
Before GDMA sends data, software prepares an outlink and data to be sent. GDMA_OUTLINK_ADDR_CHn
points to the first transmit descriptor in the outlink. After GDMA_OUTLINK_START_CHn is set, GDMA reads data
from the RAM pointed by outlink. The data are then encoded by the encoder, and sent sequentially by the UART
transmitter.
HCI data packets have separators at the beginning and the end, with data bits in the middle (separators + data
bits + separators). The encoder inserts separators in front of and after data bits, and replaces data bits identical
to separators with special characters (i.e. escape characters). The decoder removes separators in front of and
after data bits, and replaces escape characters with separators. There can be more than one continuous
separator at the beginning and the end of a data packet. The separator is configured by UHCI_SEPER_CHAR,
0xC0 by default. The escape characters are configured by UHCI_ESC_SEQ0_CHAR0 (0xDB by default) and
UHCI_ESC_SEQ0_CHAR1 (0xDD by default). When all data have been sent, a
GDMA_OUT_TOTAL_EOF_CHn_INT interrupt is generated. When all data have been received, a
GDMA_IN_SUC_EOF_CHn_INT is generated.
• UART_RS485_CLASH_INT: Triggered when a collision is detected between the transmitter and the receiver
in RS485 mode.
• UART_RS485_FRM_ERR_INT: Triggered when an error is detected in the data frame sent by the
transmitter in RS485 mode.
• UART_RS485_PARITY_ERR_INT: Triggered when an error is detected in the parity bit sent by the
transmitter in RS485 mode.
• UART_TX_DONE_INT: Triggered when all data in the TX FIFO have been sent.
• UART_TX_BRK_IDLE_DONE_INT: Triggered when the transmitter stays idle after sending the last data bit.
The minimum amount of time marking the transmitter state as idle is determined by the configurable
threshold value.
• UART_TX_BRK_DONE_INT: Triggered when the transmitter has sent all NULL characters following the
complete transmission of data from the TX FIFO.
• UART_GLITCH_DET_INT: Triggered when the receiver detects a glitch in the middle of the start bit.
• UART_SW_XOFF_INT: Triggered when UART_SW_FLOW_CON_EN is set and the receiver receives a XOFF
character.
• UART_SW_XON_INT: Triggered when UART_SW_FLOW_CON_EN is set and the receiver receives a XON
character.
• UART_RXFIFO_TOUT_INT: Triggered when the receiver takes more time than UART_RX_TOUT_THRHD to
receive one byte.
• UART_BRK_DET_INT: Triggered when the receiver detects a NULL character after stop bits.
• UART_CTS_CHG_INT: Triggered when the receiver detects an edge change on CTSn signals.
• UART_DSR_CHG_INT: Triggered when the receiver detects an edge change on DSRn signals.
• UART_RXFIFO_OVF_INT: Triggered when the receiver receives more data than the capacity of the RX FIFO.
• UART_TXFIFO_EMPTY_INT: Triggered when the TX FIFO stores less data than what
UART_TXFIFO_EMPTY_THRHD specifies.
• UART_RXFIFO_FULL_INT: Triggered when the receiver receives more data than what
UART_RXFIFO_FULL_THRHD specifies.
• UHCI_SEND_A_REG_Q_INT: Triggered when UHCI has sent a series of short packets using always_send.
• UHCI_SEND_S_REG_Q_INT: Triggered when UHCI has sent a series of short packets using single_send.
• UHCI_TX_HUNG_INT: Triggered when UHCI takes too long to read RAM using a GDMA transmit channel.
• UHCI_RX_HUNG_INT: Triggered when UHCI takes too long to receive data using a GDMA receive channel.
synchronous registers, static registers, and immediate registers. Synchronous registers are read in Core Clock
domain, and take effect after synchronization. Static registers are also read in Core Clock domain, but would not
change dynamically. Therefore, for static registers, clock domain crossing is not required, and software can turn
on and off the clock for the UART transmitter or receiver to ensure that the configuration sampled in Core Clock
domain is correct. Immediate registers are read in APB_CLK domain, and take effect after being configured via
the APB bus.
Since synchronous registers are read in core clock domain, but written in APB_CLK domain, they implement the
clock domain crossing design to ensure that their values sampled in Core Clock domain are correct. These
registers as listed in Table 26-1 are configured as follows:
• Wait for UART_REG_UPDATE to become 0, which indicates the completion of last synchronization;
Register Field
UART_CLKDIV_REG UART_CLKDIV_FRAG[3:0]
UART_CLKDIV[11:0]
UART_CONF0_REG UART_AUTOBAUD_EN
UART_ERR_WR_MASK
UART_TXD_INV
UART_RXD_INV
UART_IRDA_EN
UART_TX_FLOW_EN
UART_LOOPBACK
UART_IRDA_RX_INV
UART_IRDA_TX_EN
UART_IRDA_WCTL
UART_IRDA_TX_EN
UART_IRDA_DPLX
UART_STOP_BIT_NUM
UART_BIT_NUM
UART_PARITY_EN
UART_PARITY
Cont’d on next page
Static registers, though also read in Core Clock domain, would not change dynamically when UART controllers
are at work, so they do not implement the clock domain crossing design. These registers must be configured
when the UART transmitter or receiver is not at work. In this case, software can turn off the clock for the UART
transmitter or receiver, so that static registers are not sampled in their metastable state. When software turns on
the clock, the configured values are stable to be correctly sampled. Static registers as listed in Table 26-2 are
configured as follows:
• Turn off the clock for the UART transmitter by clearing UART_TX_SCLK_EN, or the clock for the UART
receiver by clearing UART_RX_SCLK_EN, depending on which one (transmitter or receiver) is not at work;
• Turn on the clock for the UART transmitter by writing 1 to UART_TX_SCLK_EN, or the clock for the UART
receiver by writing 1 to UART_RX_SCLK_EN.
Register Field
UART_RX_FILT_REG UART_GLITCH_FILT_EN
UART_GLITCH_FILT[7:0]
UART_SLEEP_CONF_REG UART_ACTIVE_THRESHOLD[9:0]
UART_SWFC_CONF0_REG UART_XOFF_CHAR[7:0]
UART_SWFC_CONF1_REG UART_XON_CHAR[7:0]
UART_IDLE_CONF_REG UART_TX_IDLE_NUM[9:0]
UART_AT_CMD_PRECNT_REG UART_PRE_IDLE_NUM[15:0]
UART_AT_CMD_POSTCNT_REG UART_POST_IDLE_NUM[15:0]
UART_AT_CMD_GAPTOUT_REG UART_RX_GAP_TOUT[15:0]
UART_AT_CMD_CHAR_REG UART_CHAR_NUM[7:0]
UART_AT_CMD_CHAR[7:0]
Except those listed in Table 26-1 and Table 26-2, registers that can be configured by software are immediate
registers read in APB_CLK domain, such as interrupt and FIFO configuration registers.
Initializing UARTn requires two steps: resetting UARTn and enabling register synchronization.
To reset UARTn:
• clear SYSTEM_UARTn_RST;
• write 1 to UART_RST_CORE;
• write 1 to SYSTEM_UARTn_RST;
• clear SYSTEM_UARTn_RST;
• clear UART_RST_CORE.
• wait for UART_REG_UPDATE to become 0, which indicates the completion of last synchronization;
• configure the baud rate for transmission via UART_CLKDIV and UART_CLKDIV_FRAG;
• read data from RXFIFO via UART_RXFIFO_RD_BYTE, and obtain the number of bytes received in RXFIFO
via UART_RXFIFO_CNT.
26.7 Registers
26.7.1 UART Registers
The addresses in this section are relative to UART Controller base address provided in Table 4-3 in Chapter 4
System and Memory.
E
B YT
D_
_R
FO
FI
RX
d)
ve
T_
er
R
s
UA
(re
31 8 7 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
HD
HD
RC PU
PD
HR
HR
O E_
E_
_T
_F RC
_T
W
UT
EM FO
E
E
O
IZ
IZ
TO
FL
_M M_
_S
S
X_
X_
X_
RT E
X
)
)
ed
ed
UA T_M
_R
_R
_R
_T
rv
rv
RT
RT
RT
RT
se
se
R
UA
UA
UA
UA
UA
(re
(re
31 29 28 27 26 17 16 7 6 4 3 1 0
UART_RX_SIZE This field is used to configure the amount of RAM allocated for RX FIFO. The default
number is 128 bytes. (R/W)
UART_TX_SIZE This field is used to configure the amount of RAM allocated for TX FIFO. The default
number is 128 bytes. (R/W)
UART_RX_FLOW_THRHD This field is used to configure the maximum amount of data bytes that
can be received when hardware flow control works. (R/W)
UART_RX_TOUT_THRHD This field is used to configure the threshold time that receiver takes
to receive one byte, in the unit of bit time (the time it takes to transfer one bit). The
UART_RXFIFO_TOUT_INT interrupt will be triggered when the receiver takes more time to receive
one byte with UART RX_TOUT_EN set to 1. (R/W)
UART_MEM_FORCE_PD Set this bit to force power down UART RAM. (R/W)
R X N IT _ AW AW
RT XF ON NT _R AW AW
W
RA
UA T_G _BR _ID _R R_I AW
UA T_T _DO AR ERR _R _R
RA W
R X _P _ NT INT
R W F _ T T
R X K NT R _R
R X H IN AW W
N
W
T_ A
UA _B IF _IN _R AW
UL _I W
_R IFO RR _R AW
I
UA T_R R_C G_ _R RA
IN _R
UA T_T _BR E_I Y_E INT
UA T_T 485 RM H_I T_
UA T_S _X DE E_I E_
_F TY RA
UA T_T RIT R_ INT W
R R O_ IN AW
XF _E _I AW
R R O_ T AW
L_ NT
R S _F S DE
R S H NT T_
RT XF Y_E INT _R
R W H_ N N
R S _C HA W
R T E UT W
R A ER F_ A
N
O P _
UA T_S ITC _DO _DO
UA T_R 485 _C _RA
UA T_P M_ OV T_R
UA T_D S_C T_I _IN
IF M NT
UA T_R 485 LA R_
R S D T
T
UA _R CM _IN
RT T_ UP
O
UA T_A KE
R A
d)
UA T_W
ve
er
R
s
UA
(re
31 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 Reset
UART_RXFIFO_FULL_INT_RAW This interrupt raw bit turns to high level when the receiver receives
more data than what UART_RXFIFO_FULL_THRHD specifies. (R/WTC/SS)
UART_TXFIFO_EMPTY_INT_RAW This interrupt raw bit turns to high level when the amount of data
in TX FIFO is less than what UART_TXFIFO_EMPTY_THRHD specifies. (R/WTC/SS)
UART_PARITY_ERR_INT_RAW This interrupt raw bit turns to high level when the receiver detects a
parity error in the data. (R/WTC/SS)
UART_FRM_ERR_INT_RAW This interrupt raw bit turns to high level when the receiver detects a
data frame error. (R/WTC/SS)
UART_RXFIFO_OVF_INT_RAW This interrupt raw bit turns to high level when the receiver receives
more data than the capacity of RX FIFO. (R/WTC/SS)
UART_DSR_CHG_INT_RAW This interrupt raw bit turns to high level when the receiver detects the
edge change of DSRn signal. (R/WTC/SS)
UART_CTS_CHG_INT_RAW This interrupt raw bit turns to high level when the receiver detects the
edge change of CTSn signal. (R/WTC/SS)
UART_BRK_DET_INT_RAW This interrupt raw bit turns to high level when the receiver detects a 0
after the stop bit. (R/WTC/SS)
UART_RXFIFO_TOUT_INT_RAW This interrupt raw bit turns to high level when the receiver takes
more time than UART_RX_TOUT_THRHD to receive a byte. (R/WTC/SS)
UART_SW_XON_INT_RAW This interrupt raw bit turns to high level when the receiver receives an
XON character and UART_SW_FLOW_CON_EN is set to 1. (R/WTC/SS)
UART_SW_XOFF_INT_RAW This interrupt raw bit turns to high level when the receiver receives an
XOFF character and UART_SW_FLOW_CON_EN is set to 1. (R/WTC/SS)
UART_GLITCH_DET_INT_RAW This interrupt raw bit turns to high level when the receiver detects a
glitch in the middle of a start bit. (R/WTC/SS)
UART_TX_BRK_DONE_INT_RAW This interrupt raw bit turns to high level when the transmitter com-
pletes sending NULL characters, after all data in TX FIFO are sent. (R/WTC/SS)
UART_TX_BRK_IDLE_DONE_INT_RAW This interrupt raw bit turns to high level when the transmitter
has kept the shortest duration after sending the last data. (R/WTC/SS)
UART_TX_DONE_INT_RAW This interrupt raw bit turns to high level when the transmitter has sent
out all data in FIFO. (R/WTC/SS)
UART_RS485_PARITY_ERR_INT_RAW This interrupt raw bit turns to high level when the receiver
detects a parity error from the echo of the transmitter in RS485 mode. (R/WTC/SS)
UART_RS485_FRM_ERR_INT_RAW This interrupt raw bit turns to high level when the receiver de-
tects a data frame error from the echo of the transmitter in RS485 mode. (R/WTC/SS)
UART_RS485_CLASH_INT_RAW This interrupt raw bit turns to high level when a collision is detected
between the transmitter and the receiver in RS485 mode. (R/WTC/SS)
UART_AT_CMD_CHAR_DET_INT_RAW This interrupt raw bit turns to high level when the receiver
detects the configured UART_AT_CMD_CHAR. (R/WTC/SS)
UART_WAKEUP_INT_RAW This interrupt raw bit turns to high level when the input RXD edge
changes more times than what UART_ACTIVE_THRESHOLD specifies in Light-sleep mode.
(R/WTC/SS)
R X ON NT _S T T
ST
UA T_T _DO AR ERR _ST _S
R W OF T_ NT INT
S
T_ T
_
I N _S
UA T_R R_C G_ _S ST
UA T_T _BR E_I Y_E INT
UA T_T 485 RM H_I T_
UA T_S _X DE E_I E_
ST
UA T_B FIF _IN _S T
_F TY ST
_R IFO RR _S T
L_ NT
R S _F S DE
R S H NT T_
R W H_ N N
RT XF Y_E INT _S
R
R X N IT _
R A E R F_ T
R R O_ IN T
O P _
XF _E _I T
R R O_ T T
UA _S TC DO DO
R X H INT T
UA T_R 485 _C _ST
UA T_P M_ OV T_S
UA T_D S_C T_I _IN
UA T_C K_D TO _ST
IF M NT
UA T_F FIF G_ _S
UL _I
UA T_R 485 LA R_
R S _C HA
R T E UT
R S D T
N
UA _R CM _IN
RT T_ UP
K
UA T_A KE
R A
d)
X
UA T_W
ve
er
R
s
UA
(re
31 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
R X N IT _ A NA
RT XF ON NT _E NA NA
A
EN
UA T_T _DO AR ERR _EN _E
R W F _ T T
EN A
R X K NT R _E
R X H IN NA A
T_ N
A
UA _B IF _IN _E NA
I
UA T_R R_C G_ _E EN
UL _I A
_R IFO RR _E NA
IN _E
UA T_T _BR E_I Y_E INT
UA T_T 485 RM H_I T_
UA T_S _X DE E_I E_
_F TY EN
UA T_T RIT R_ INT A
R R O_ IN NA
XF _E _I NA
L_ NT
R R O_ T NA
R S _F S DE
R S H NT T_
R W H_ N N
RT XF Y_E INT _E
R S _C HA A
R T E UT A
R A ER F_ N
N
O P _
UA T_S ITC _DO _DO
UA T_R 485 _C _EN
UA T_P M_ OV T_E
IF M NT
UA T_F FIF G_ T_E
UA T_R 485 LA R_
R S D T
T
UA _R CM _IN
RT T_ UP
O
UA T_A KE
R A
d)
UA T_W
ve
er
R
s
UA
(re
31 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
R X N IT _ LR LR
RT XF ON NT _C LR LR
R
CL
UA T_T _DO AR ERR _C _C
R W F _ T T
T_ LR
R X K NT R _C
R X H INT LR R
R
UA _B IF _IN _C LR
I
IN _C
UL _I LR
UA T_R R_C G_ _C CL
_R IFO RR _C LR
UA T_T _BR E_I Y_E INT
UA T_T 485 RM H_I T_
UA T_S _X DE E_I E_
CL
R A ER F_ LR
R R O_ IN LR
L_ NT
_F TY C
XF _E _I LR
RT XF Y_E INT _C
R S _ F S DE
R R O _ T LR
R S H NT T_
R W H_ N N
R S _C HA R
R T E UT R
N
O P _
UA T_S ITC _DO _DO
UA T_P M_ OV T_C
UA T_R 485 _C _CL
UA T_F FIF G_ _C
IF M NT
UA T_T RIT R_ INT
UA T_R 485 LA R_
R S D T
T
UA _R CM _IN
RT T_ UP
O
UA T_A KE
R A
d)
UA T_W
ve
er
R
s
UA
(re
31 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
IV
DI
D
LK
LK
)
d)
ed
_C
_C
e
rv
rv
RT
RT
se
se
UA
UA
(re
(re
31 24 23 20 19 12 11 0
LT
FI
I
_F
H_
CH
TC
T
LI
LI
d)
_G
G
ve
T_
RT
r
se
R
UA
UA
(re
31 9 8 7 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x8 Reset
UART_GLITCH_FILT When input pulse width is lower than this value, the pulse is ignored. (R/W)
M
UA T_D K_E _M N
R T N AS
R R BA EN
NU
R L R _E
R RD BA N
R RD TX V
R RD W V
R X EN T
UA T_T A_ _EN
R RD O_ T
UA T_I OP _E
UA T_I A_ CTL
UA T_I A_ _IN
UA T_I A_ CK
UA T_C R_W UD
UA T_I A_ _IN
UA _E O K_
UA T_S D_B LX
UA T_T A_ RS
IT EN
T_
UA T_I FIF RS
R O OW
RT W RK
M
R X DP
RT UT CL
R T NV
R X NV
BI
R RD RX
UA SW TR
R T NV
R X NV
_S TS
R X NV
R S NV
R RD TX
AR _
R X _
NU
_P I TY
Y
UA T_R FIFO
P_
UA T_A M_
_ _D
UA T_C R_I
UA T_L _FL
RT _R
UA T_T D_I
UA T_R R_I
UA T_R S_I
UA T_T S_I
UA T_D D_I
_
TO
RT AR
IT
R E
)d
UA _M
_B
UA _P
ve
RT
RT
RT
ser
UA
UA
UA
(re
31 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 0 0 Reset
UART_PARITY This bit is used to configure the parity check mode. (R/W)
UART_STOP_BIT_NUM This field is used to set the length of stop bit. (R/W)
UART_SW_RTS This bit is used to configure the software RTS signal which is used in software flow
control. (R/W)
UART_SW_DTR This bit is used to configure the software DTR signal which is used in software flow
control. (R/W)
UART_TXD_BRK Set this bit to enable the transmitter to send NULL characters when the process of
sending data is done. (R/W)
UART_IRDA_TX_EN This is the start enable bit for IrDA transmitter. (R/W)
UART_IRDA_WCTL 0: Set IrDA transmitter’s 11th bit to 0; 1: The IrDA transmitter’s 11th bit is the
same as 10th bit. (R/W)
UART_IRDA_TX_INV Set this bit to invert the level of IrDA transmitter. (R/W)
UART_IRDA_RX_INV Set this bit to invert the level of IrDA receiver. (R/W)
UART_LOOPBACK Set this bit to enable UART loopback test mode. (R/W)
UART_TX_FLOW_EN Set this bit to enable flow control function for transmitter. (R/W)
UART_RXD_INV Set this bit to invert the level value of UART RXD signal. (R/W)
UART_CTS_INV Set this bit to invert the level value of UART CTS signal. (R/W)
UART_DSR_INV Set this bit to invert the level value of UART DSR signal. (R/W)
UART_TXD_INV Set this bit to invert the level value of UART TXD signal. (R/W)
UART_RTS_INV Set this bit to invert the level value of UART RTS signal. (R/W)
UART_DTR_INV Set this bit to invert the level value of UART DTR signal. (R/W)
UART_CLK_EN 0: Support clock only when application writes registers; 1: Force clock on for regis-
ters. (R/W)
UART_ERR_WR_MASK 0: Receiver stores the data even if the received data is wrong; 1: Receiver
stops storing data into FIFO when data is wrong. (R/W)
UART_AUTOBAUD_EN This is the enable bit for baud rate detection. (R/W)
D
RH
D
O IS
RH
T_ _D
TH
VF
H
DA OW
Y_
_T
PT
IS UT N
RT X_ OW N
LL
X_ FL
_D TO _E
UA _R FL _E
U
_R _
_F
RT X_ UT
_E
O
FO
UA T_R _TO
IF
FI
XF
R X
d)
X
UA T_R
_R
_T
ve
RT
RT
r
se
R
UA
UA
UA
(re
31 24 23 22 21 20 19 10 9 0
UART_RX_TOUT_FLOW_DIS Set this bit to stop accumulating idle_cnt when hardware flow control
works. (R/W)
UART_RX_FLOW_EN This is the flow enable bit for UART receiver. (R/W)
UART_RX_TOUT_EN This is the enable bit for UART receiver’s timeout function. (R/W)
EN
N_
O
LO EL
RT ON E_X FF
_C
_S O ON
R O _X F
UA T_F RC ON
UA T_X RC XO
_F _D
UA T_F ND OF
W
W FF
R O E_
R E _X
UA T_S ND
R E
)
ed
UA T_S
rv
se
R
UA
(re
31 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
UART_SW_FLOW_CON_EN Set this bit to enable software flow control. When UART receives
flow control characters XON or XOFF, which can be configured by UART_XON_CHAR or
UART_XOFF_CHAR respectively, UART_SW_XON_INT or UART_SW_XOFF_INT interrupts can be
triggered if enabled. (R/W)
UART_XONOFF_DEL Set this bit to remove flow control characters from the received data. (R/W)
UART_FORCE_XON Set this bit to force the transmitter to send data. (R/W)
UART_FORCE_XOFF Set this bit to stop the transmitter from sending data. (R/W)
UART_SEND_XON Set this bit to send an XON character. This bit is cleared by hardware automati-
cally. (R/W/SS/SC)
UART_SEND_XOFF Set this bit to send an XOFF character. This bit is cleared by hardware automat-
ically. (R/W/SS/SC)
LD
O
SH
RE
TH
E_
IV
CT
)
ed
_A
rv
RT
se
UA
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0xf0 Reset
UART_ACTIVE_THRESHOLD UART is activated from Light-sleep mode when the input RXD edge
changes more times than the value of this field. (R/W)
LD
HO
ES
R
HA
HR
_C
_T
FF
FF
XO
XO
d)
ve
T_
T_
er
R
s
UA
UA
31 (re 18 17 10 9 0
UART_XOFF_THRESHOLD When the number of data bytes in RX FIFO is more than the value of this
field with UART_SW_FLOW_CON_EN set to 1, the transmitter sends an XOFF character. (R/W)
UART_XOFF_CHAR This field stores the XOFF flow control character. (R/W)
LD
O
SH
AR
RE
CH
TH
N_
N_
O
O
)
ed
_X
_X
rv
RT
RT
se
UA
UA
(re
31 18 17 10 9 0
UART_XON_THRESHOLD When the number of data bytes in RX FIFO is less than the value of this
field with UART_SW_FLOW_CON_EN set to 1, the transmitter sends an XON character. (R/W)
UART_XON_CHAR This field stores the XON flow control character. (R/W)
_T
rv
RT
se
UA
(re
31 8 7 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0xa Reset
UART_TX_BRK_NUM This field is used to configure the number of 0 to be sent after the process of
sending data is done. It is active when UART_TXD_BRK is set to 1. (R/W)
HD
UM
HR
_N
_T
E
E
DL
DL
_I
_I
RX
)
TX
ed
T_
T_
rv
se
R
UA
UA
(re
31 20 19 10 9 0
UART_RX_IDLE_THRHD A frame end signal is generated when the receiver takes more time to re-
ceive one byte data than the value of this field, in the unit of bit time (the time it takes to transfer
one bit). (R/W)
UART_TX_IDLE_NUM This field is used to configure the duration time between transfers, in the unit
of bit time (the time it takes to transfer one bit). (R/W)
RT L0 N X_ EN
R L TX _ NU
NU
EN
UA T_D 485 XBY Y_
Y_
R S R DL
DL
UA _R 85 X_
X_
N
RT S4 _R
_E
_T
S4 N
85
UA _R 85
85
_R _E
S4
RT S4
d)
_R
UA _R
ve
RT
RT
r
se
UA
UA
(re
31 10 9 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
UART_DL0_EN Set this bit to delay the stop bit by 1 bit. (R/W)
UART_DL1_EN Set this bit to delay the stop bit by 1 bit. (R/W)
UART_RS485TX_RX_EN Set this bit to enable receiver could receive data when the transmitter is
transmitting data in RS485 mode. (R/W)
UART_RS485RXBY_TX_EN 1: enable RS485 transmitter to send data when RS485 receiver line is
busy. (R/W)
UART_RS485_RX_DLY_NUM This bit is used to delay the receiver’s internal data signal. (R/W)
UART_RS485_TX_DLY_NUM This field is used to delay the transmitter’s internal data signal. (R/W)
UM
UA T_T _SC CO E
RT X_ LK RE
R X T_ R
RT ST LK N
UA SC CO N
_N
_B
A
UA T_R _RS _CO
UA _R SC _E
_ _ _E
RT LK_ RE
V_
L
IV
V
CL N
SE
DI
DI
_D
E
R X T
UA T_T _RS
K_
K_
K_
LK
CL
CL
SC
R X
d)
UA T_R
_S
_S
_S
ve
T_
RT
RT
er
R
s
UA
UA
UA
UA
(re
31 28 27 26 25 24 23 22 21 20 19 12 11 6 5 0
UART_RST_CORE Write 1 and then write 0 to this bit, to reset UART TX/RX. (R/W)
UART_TX_RST_CORE Write 1 and then write 0 to this bit, to reset UART TX. (R/W)
UART_RX_RST_CORE Write 1 and then write 0 to this bit, to reset UART RX. (R/W)
T
NT
N
_C
_C
O
O
N
N
_D N
_D N
F
IF
FI
SR
RT XD
TR
RT TS
RT TS
UA T_R D
XF
RX
)
)
R X
ed
ed
UA _C
UA T_R
UA T_T
_T
T_
rv
rv
RT
se
se
R
R
UA
UA
UA
UA
(re
(re
31 30 29 28 26 25 16 15 14 13 12 10 9 0
1 1 1 0 0 0 0 1 1 0 0 0 0 0 Reset
UART_DSRN This bit represents the level of the internal UART DSR signal. (RO)
UART_CTSN This bit represents the level of the internal UART CTS signal. (RO)
UART_RXD This bit represents the level of the internal UART RXD signal. (RO)
UART_DTRN This bit represents the level of the internal UART DTR signal. (RO)
UART_RTSN This bit represents the level of the internal UART RTS signal. (RO)
UART_TXD This bit represents the level of the internal UART TXD signal. (RO)
DR
AD
R
W
DD
T X_
RA
B_
X_
AP
d)
)
ed
_T
ve
T_
rv
RT
er
se
R
s
UA
UA
(re
(re
31 21 20 11 10 9 0
UART_APB_TX_WADDR This field stores the offset address in TX FIFO when software writes TX FIFO
via APB. (RO)
UART_TX_RADDR This field stores the offset address in TX FIFO when TX FSM reads data via
Tx_FIFO_Ctrl. (RO)
R
DD
RA
DR
X_
AD
_R
W
PB
X_
d)
)
ed
_R
_A
ve
rv
RT
RT
r
se
se
UA
UA
(re
(re
31 21 20 11 10 9 0
UART_APB_RX_RADDR This field stores the offset address in RX FIFO when software reads data
from RX FIFO via APB. UART0 is 0x200. UART1 is 0x280. UART2 is 0x300. (RO)
UART_RX_WADDR This field stores the offset address in RX FIFO when Rx_FIFO_Ctrl writes RX FIFO.
UART0 is 0x200. UART1 is 0x280. UART2 is 0x300. (RO)
_O
_O
RX
U TX
_U
T_
)
ST
ed
_S
T_
rv
RT
se
R
UA
UA
(re
31 8 7 4 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
NT
_C
IN
M
E_
LS
PU
W
LO
d)
ve
T_
er
R
s
UA
(re
31 12 11 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0xfff Reset
UART_LOWPULSE_MIN_CNT This field stores the value of the minimum duration time of the low
level pulse, in the unit of APB_CLK cycles. It is used in baud rate detection. (RO)
T
N
_C
IN
_M
SE
UL
HP
IG
)
ed
_H
rv
RT
se
UA
(re
31 12 11 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0xfff Reset
UART_HIGHPULSE_MIN_CNT This field stores the value of the maximum duration time for the high
level pulse, in the unit of APB_CLK cycles. It is used in baud rate detection. (RO)
_R
e
rv
RT
se
UA
(re
31 10 9 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0 Reset
UART_RXD_EDGE_CNT This field stores the count of RXD edge change. It is used in baud rate
detection. (RO)
NT
_C
IN
M
E_
DG
SE
PO
d)
ve
T_
er
R
s
UA
(re
31 12 11 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0xfff Reset
UART_POSEDGE_MIN_CNT This field stores the minimal input clock count between two positive
edges. It is used in baud rate detection. (RO)
T
_CN
IN
M
E_
G
ED
GE
d)
_N
ve
RT
r
se
UA
(re
31 12 11 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0xfff Reset
UART_NEGEDGE_MIN_CNT This field stores the minimal input clock count between two negative
edges. It is used in baud rate detection. (RO)
_P
rv
RT
se
UA
(re
31 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x901 Reset
UART_PRE_IDLE_NUM This field is used to configure the idle duration time before the first AT_CMD
is received by the receiver, in the unit of bit time (the time it takes to transfer one bit). (R/W)
UM
E _N
DL
_I
ST
O
d)
_P
ve
RT
er
s
UA
(re
31 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x901 Reset
UART_POST_IDLE_NUM This field is used to configure the duration time between the last AT_CMD
and the next data byte, in the unit of bit time (the time it takes to transfer one bit). (R/W)
UT
O
_T
AP
_G
X
)
d
_R
ve
RT
er
s
UA
(re
31 16 15 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 Reset
UART_RX_GAP_TOUT This field is used to configure the duration time between the AT_CMD char-
acters, in the unit of bit time (the time it takes to transfer one bit). (R/W)
AR
CH
M
NU
D_
R_
CM
HA
T_
)
ed
_C
_A
rv
RT
RT
se
UA
UA
(re
31 16 15 8 7 0
UART_AT_CMD_CHAR This field is used to configure the content of AT_CMD character. (R/W)
UART_CHAR_NUM This field is used to configure the number of continuous AT_CMD characters
received by the receiver. (R/W)
E
AT
_D
RT
UA
31 0
0x2008270 Reset
D
UA T_R
_I
RT
R
UA
UA
31 30 29 0
0 1 0x000500 Reset
UART_UPDATE_CTRL This bit is used to control register synchronization mode. 0: After registers
are configured, software needs to write 1 to UART_REG_UPDATE to synchronize registers; 1:
Registers are automatically synchronized into UART Core’s clock domain. (R/W)
UART_REG_UPDATE When this bit is set to 1 by software, registers are synchronized to UART Core’s
clock domain. This bit is cleared by hardware after synchronization is done. (R/W/SC)
EN
F_
C EP EN N EN
O
C R ID N N
UH I_S D_ C_E F_
_E
UH _C T_ _E _E
C EA E EO
CI NC N RK
CI AR OF C R
UH I_U _E _C
UH I_U T2 N
UH _U T1 E
UH I_R T0 E
_T RS E
CI AR _C
C AR _C
CI X_ _C
C LK RX
C AR _E
C EN E
X_ T
T
UH _L OD
UH I_U ER
UH I_C T_
RS
C AR
d)
UH I_U
ve
er
C
s
UH
(re
31 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 0 0 0 0 0 Reset
UHCI_TX_RST Write 1, then write 0 to this bit to reset decode state machine. (R/W)
UHCI_RX_RST Write 1, then write 0 to this bit to reset encode state machine. (R/W)
UHCI_SEPER_EN Set this bit to separate the data frame using a special character. (R/W)
UHCI_HEAD_EN Set this bit to encode the data packet with a formatting header. (R/W)
UHCI_CRC_REC_EN Set this bit to enable UHCI to receive the 16 bit CRC. (R/W)
UHCI_UART_IDLE_EOF_EN If this bit is set to 1, UHCI will end the payload receiving process when
UART has been in idle state. (R/W)
UHCI_LEN_EOF_EN If this bit is set to 1, UHCI decoder stops receiving payload data when the
number of received data bytes has reached the specified value. The value is payload length indi-
cated by UHCI packet header when UHCI_HEAD_EN is 1 or the value is configuration value when
UHCI_HEAD_EN is 0. If this bit is set to 0, UHCI decoder stops receiving payload data when 0xC0
has been received. (R/W)
UHCI_ENCODE_CRC_EN Set this bit to enable data integrity check by appending a 16 bit CCITT-
CRC to end of the payload. (R/W)
UHCI_CLK_EN 0: Support clock only when application writes registers; 1: Force clock on for regis-
ters. (R/W)
UHCI_UART_RX_BRK_EOF_EN If this bit is set to 1, UHCI will end payload receive process when
NULL frame is received by UART. (R/W)
E
_R
UH I_C E_ K_ _RE
RT
N
UH I_C C_D AD M
UM N
_E
_S _E
C R HE SU
TA
HE K_ LE
C AV EC M
CK EQ
UH I_S CH NU
_S
_C C B
UH rve IT_ RT
CI HE ISA
S
C d) SW
C _ _
se A A
K
(re _W ST
UH _T C
CI X_A
CI W_
d)
X
UH I_S
ve
UH I_T
er
C
s
UH
(re
31 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 Reset
UHCI_CHECK_SUM_EN This is the enable bit to check header checksum when UHCI receives a
data packet. (R/W)
UHCI_CHECK_SEQ_EN This is the enable bit to check sequence number when UHCI receives a data
packet. (R/W)
UHCI_CRC_DISABLE Set this bit to support CRC calculation. Data Integrity Check Present bit in
UHCI packet frame should be 1. (R/W)
UHCI_SAVE_HEAD Set this bit to save the packet header when UHCI receives a data packet. (R/W)
UHCI_TX_CHECK_SUM_RE Set this bit to encode the data packet with a checksum. (R/W)
UHCI_TX_ACK_NUM_RE Set this bit to encode the data packet with an acknowledgment when a
reliable packet is to be transmitted. (R/W)
UHCI_WAIT_SW_START The UHCI encoder will jump to ST_SW_WAIT status if this bit is set to 1.
(R/W)
UHCI_SW_START If current UHCI_ENCODE_STATE is ST_SW_WAIT, the UHCI will start to send data
packet out when this bit is set to 1. (R/W/SC)
UH I_T 13_ SC N
UH I_T 11_ SC_ N
SC N
N
UH I_R DB SC N
UH I_T C0 SC N
CI X_D ES EN
C0 SC N
C X_ _E _E
C X_ E _E
_E _E
_E
C X_ _E _E
C X_ _E _E
X_ _E _E
UH I_R 11 SC
_T B C
C X_ _E
UH I_R 13
C X_
d)
UH I_R
ve
er
C
s
UH
(re
31 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 Reset
UHCI_TX_C0_ESC_EN Set this bit to to decode character 0xC0 when DMA receives data. (R/W)
UHCI_TX_DB_ESC_EN Set this bit to to decode character 0xDB when DMA receives data. (R/W)
UHCI_TX_11_ESC_EN Set this bit to to decode flow control character 0x11 when DMA receives data.
(R/W)
UHCI_TX_13_ESC_EN Set this bit to to decode flow control character 0x13 when DMA receives data.
(R/W)
UHCI_RX_C0_ESC_EN Set this bit to replace 0xC0 by special characters when DMA sends data.
(R/W)
UHCI_RX_DB_ESC_EN Set this bit to replace 0xDB by special characters when DMA sends data.
(R/W)
UHCI_RX_11_ESC_EN Set this bit to replace flow control character 0x11 by special characters when
DMA sends data. (R/W)
UHCI_RX_13_ESC_EN Set this bit to replace flow control character 0x13 by special characters when
DMA sends data. (R/W)
FT
FT
NA
NA
HI
HI
_S
_E
_S
_E
UT
UT
UT
UT
UT
UT
EO
EO
EO
EO
EO
EO
IM
IM
IM
IM
IM
IM
_T
_T
_T
_T
_T
_T
FO
FO
FO
O
IF
IF
IF
FI
FI
FI
XF
XF
XF
)
RX
RX
X
ed
_R
_T
_T
_T
rv
_
CI
CI
CI
CI
CI
CI
se
UH
UH
UH
UH
UH
UH
(re
31 24 23 22 20 19 12 11 10 8 7 0
UHCI_TXFIFO_TIMEOUT This field stores the timeout value. UHCI will produce the
UHCI_TX_HUNG_INT interrupt when DMA takes more time to receive data. (R/W)
UHCI_TXFIFO_TIMEOUT_SHIFT This field is used to configure the maximum tick count. (R/W)
UHCI_TXFIFO_TIMEOUT_ENA This is the enable bit for TX FIFO receive timeout. (R/W)
UHCI_RXFIFO_TIMEOUT This field stores the timeout value. UHCI will produce the
UHCI_RX_HUNG_INT interrupt when DMA takes more time to read data from RAM. (R/W)
UHCI_RXFIFO_TIMEOUT_SHIFT This field is used to configure the maximum tick count. (R/W)
UHCI_RXFIFO_TIMEOUT_ENA This is the enable bit for DMA send timeout. (R/W)
AD
O
_L
UM
M
NU
_N
K_
CK
d)
C
_A
_A
e
rv
CI
CI
se
UH
UH
(re
31 4 3 2 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0x0 Reset
UHCI_ACK_NUM This is the ACK number used in software flow control. (R/W)
UHCI_ACK_NUM_LOAD Set this bit to 1, and the value configured by UHCI_ACK_NUM would be
loaded. (WT)
UM
M
N
NU
N
_N
_E
_E
D_
ND
ND
D
EN
EN
SE
SE
_S
_S
S_
S_
LE
LE
AY
AY
G
LW
LW
IN
IN
)
ed
_A
_A
_S
_S
rv
CI
CI
CI
CI
se
UH
UH
UH
UH
(re
31 8 7 6 4 3 2 0
UHCI_SINGLE_SEND_EN Set this bit to enable single_send mode to send short packets. (R/W/SC)
UHCI_ALWAYS_SEND_EN Set this bit to enable always_send mode to send short packets. (R/W)
31 0
0x000000 Reset
31 0
0x000000 Reset
0
RD
O
W
1_
_Q
END
_S
CI
UH
31 0
0x000000 Reset
1
RD
O
W
1_
_Q
END
_S
CI
UH
31 0
0x000000 Reset
31 0
0x000000 Reset
1
RD
O
W
2_
_Q
END
_S
CI
UH
31 0
0x000000 Reset
0
RD
O
W
3_
_Q
END
_S
CI
UH
31 0
0x000000 Reset
31 0
0x000000 Reset
0
RD
O
W
4_
_Q
END
_S
CI
UH
31 0
0x000000 Reset
1
RD
O
W
4_
_Q
END
_S
CI
UH
31 0
0x000000 Reset
31 0
0x000000 Reset
1
RD
O
W
5_
_Q
END
_S
CI
UH
31 0
0x000000 Reset
0
RD
O
W
6_
_Q
END
_S
CI
UH
31 0
0x000000 Reset
31 0
0x000000 Reset
R0
AR
A
H
CH
_C
R
C_
HA
SC
ES
_C
_E
R_
ER
ER
PE
EP
EP
)
E
ed
_S
_S
_S
rv
CI
CI
CI
se
UH
UH
UH
(re
31 24 23 16 15 8 7 0
UHCI_SEPER_CHAR This field is used to define separators to encode data packets. The default
value is 0xC0. (R/W)
UHCI_SEPER_ESC_CHAR0 This field is used to define the first character of SLIP escape sequence.
The default value is 0xDB. (R/W)
UHCI_SEPER_ESC_CHAR1 This field is used to define the second character of SLIP escape se-
quence. The default value is 0xDC. (R/W)
0
AR
HA
CH
C
0_
0_
0
Q
EQ
EQ
E
_S
_S
_S
SC
SC
SC
ed)
_E
_E
_E
rv
CI
CI
CI
se
UH
UH
UH
(re
31 24 23 16 15 8 7 0
UHCI_ESC_SEQ0 This field is used to define a character that need to be encoded. The default value
is 0xDB that used as the first character of SLIP escape sequence. (R/W)
UHCI_ESC_SEQ0_CHAR0 This field is used to define the first character of SLIP escape sequence.
The default value is 0xDB. (R/W)
UHCI_ESC_SEQ0_CHAR1 This field is used to define the second character of SLIP escape se-
quence. The default value is 0xDD. (R/W)
R1
R0
HA
A
CH
C
1_
1_
1
Q
EQ
E
SE
_S
_S
C_
SC
SC
)
ES
ed
_E
_E
rv
_
CI
CI
CI
se
UH
UH
UH
(re
31 24 23 16 15 8 7 0
UHCI_ESC_SEQ1 This field is used to define a character that need to be encoded. The default value
is 0x11 that used as a flow control character. (R/W)
UHCI_ESC_SEQ1_CHAR0 This field is used to define the first character of SLIP escape sequence.
The default value is 0xDB. (R/W)
UHCI_ESC_SEQ1_CHAR1 This field is used to define the second character of SLIP escape se-
quence. The default value is 0xDE. (R/W)
0
AR
AR
CH
CH
2_
2_
2
EQ
EQ
SE
_S
_S
C_
SC
SC
d)
S
e
_E
_E
_E
rv
CI
CI
CI
se
UH
UH
UH
(re
31 24 23 16 15 8 7 0
UHCI_ESC_SEQ2 This field is used to define a character that need to be decoded. The default value
is 0x13 that used as a flow control character. (R/W)
UHCI_ESC_SEQ2_CHAR0 This field is used to define the first character of SLIP escape sequence.
The default value is 0xDB. (R/W)
UHCI_ESC_SEQ2_CHAR1 This field is used to define the second character of SLIP escape se-
quence. The default value is 0xDF. (R/W)
S
HR
_T
KT
)
ed
_P
v
er
CI
s
UH
(re
31 13 12 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x80 Reset
UHCI_PKT_THRS This field is used to configure the maximum value of the packet length when
UHCI_HEAD_EN is 0. (R/W)
W
X_ AR INT AW RA
UH I_T HU _I _Q_ T_R
UH I_S D_ F_IN T_ W
UH I_T D_ RE _RA W
_R T _ R _
W
T_ W
AR IN AW
C EN O _IN RA
C EN A_ T RA
C X_ S_ G W
C X_ NG G IN
RA
IN A
UH I_R HU RE _Q_
UH I_S T_E L0 T_
T_ _R
ST T_ _R
C U TR _IN
T
UH I_O _C L1
C PP TR
UH _A _C
CI PP
)
ed
UH I_A
rv
se
C
UH
(re
31 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
UHCI_RX_START_INT_RAW This is the interrupt raw bit for UHCI_RX_START_INT interrupt. The
interrupt is triggered when a separator has been sent. (R/WTC/SS)
UHCI_TX_START_INT_RAW This is the interrupt raw bit for UHCI_TX_START_INT interrupt. The
interrupt is triggered when UHCI detects a separator. (R/WTC/SS)
UHCI_RX_HUNG_INT_RAW This is the interrupt raw bit for UHCI_RX_HUNG_INT interrupt. The in-
terrupt is triggered when UHCI takes more time to receive data than configure value. (R/WTC/SS)
UHCI_TX_HUNG_INT_RAW This is the interrupt raw bit for UHCI_TX_HUNG_INT interrupt. The in-
terrupt is triggered when UHCI takes more time to read data from RAM than the configured value.
(R/WTC/SS)
UHCI_OUT_EOF_INT_RAW This is the interrupt raw bit for UHCI_OUT_EOF_INT interrupt. The in-
terrupt is triggered when there are some errors in EOF in the transmit descriptors. (R/WTC/SS)
UHCI_APP_CTRL0_INT_RAW This is the interrupt raw bit for UHCI_APP_CTRL0_INT interrupt. The
interrupt is triggered when UHCI_APP_CTRL0_IN_SET is set. (R/W)
UHCI_APP_CTRL1_INT_RAW This is the interrupt raw bit for UHCI_APP_CTRL1_INT interrupt. The
interrupt is triggered when UHCI_APP_CTRL1_IN_SET is set. (R/W)
_R T _ S _
C EN K _IN ST
C EN A_ OF ST
C X_ S_ G R
ST
IN T
AR IN T
UH I_T D_ RE _ER
UH I_S TLIN L0 T_
UH I_S D_ _E T_
T_ T_S
ST T_ _S
T_
C U TR _IN
UH I_O _C L1
C PP TR
UH I_A _C
C PP
d)
UH I_A
ve
er
C
s
UH
(re
31 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
UHCI_RX_START_INT_ST This is the masked interrupt bit for UHCI_RX_START_INT interrupt when
UHCI_RX_START_INT_ENA is set to 1. (RO)
UHCI_TX_START_INT_ST This is the masked interrupt bit for UHCI_TX_START_INT interrupt when
UHCI_TX_START_INT_ENA is set to 1. (RO)
UHCI_RX_HUNG_INT_ST This is the masked interrupt bit for UHCI_RX_HUNG_INT interrupt when
UHCI_RX_HUNG_INT_ENA is set to 1. (RO)
UHCI_TX_HUNG_INT_ST This is the masked interrupt bit for UHCI_TX_HUNG_INT interrupt when
UHCI_TX_HUNG_INT_ENA is set to 1. (RO)
A
C X_ NG G IN T_
X_ AR INT NA EN
UH I_R HU RE _Q_ _IN
_R T _ E _
UH I_S D_ _E T_ A
UH I_T D_ RE _ER A
C EN K _IN EN
C EN A_ OF EN
A
T_ A
AR IN NA
C X_ S_ G R
EN
IN N
UH I_S TLIN L0 T_
T_ _E
ST T_ _E
C U TR _IN
T
UH I_O _C L1
C PP TR
UH I_A _C
C PP
d)
UH I_A
ve
er
C
s
UH
(re
31 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Reset
UHCI_RX_START_INT_ENA This is the interrupt enable bit for UHCI_RX_START_INT interrupt. (R/W)
UHCI_TX_START_INT_ENA This is the interrupt enable bit for UHCI_TX_START_INT interrupt. (R/W)
UHCI_RX_HUNG_INT_ENA This is the interrupt enable bit for UHCI_RX_HUNG_INT interrupt. (R/W)
UHCI_TX_HUNG_INT_ENA This is the interrupt enable bit for UHCI_TX_HUNG_INT interrupt. (R/W)
R
C X_ NG G IN T_
X_ AR INT LR CL
UH I_R HU RE _Q_ _IN
_R T _ C _
UH I_S D_ _E T_ R
UH I_T D_ RE _ER R
C EN K _IN CL
C EN A_ OF CL
R
IN LR
AR IN LR
C X_ S_ G R
CL
UH I_S TLIN L0 T_