tasmota-webserial-esptool 9.2.8 → 9.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/const.d.ts +89 -6
- package/dist/const.js +115 -14
- package/dist/esp_loader.d.ts +108 -2
- package/dist/esp_loader.js +633 -97
- package/dist/web/index.js +1 -1
- package/js/modules/esptool.js +1 -1
- package/package.json +1 -1
- package/src/const.ts +151 -18
- package/src/esp_loader.ts +765 -117
package/src/const.ts
CHANGED
|
@@ -80,7 +80,7 @@ export const ESP8266_SPI_MOSI_DLEN_OFFS = -1;
|
|
|
80
80
|
export const ESP8266_SPI_MISO_DLEN_OFFS = -1;
|
|
81
81
|
export const ESP8266_SPI_W0_OFFS = 0x40;
|
|
82
82
|
export const ESP8266_UART_DATE_REG_ADDR = 0x60000078;
|
|
83
|
-
export const ESP8266_BOOTLOADER_FLASH_OFFSET =
|
|
83
|
+
export const ESP8266_BOOTLOADER_FLASH_OFFSET = 0x0000;
|
|
84
84
|
|
|
85
85
|
export const ESP32_SPI_REG_BASE = 0x3ff42000;
|
|
86
86
|
export const ESP32_BASEFUSEADDR = 0x3ff5a000;
|
|
@@ -105,18 +105,23 @@ export const ESP32S2_SPI_MISO_DLEN_OFFS = 0x28;
|
|
|
105
105
|
export const ESP32S2_SPI_W0_OFFS = 0x58;
|
|
106
106
|
export const ESP32S2_UART_DATE_REG_ADDR = 0x60000078;
|
|
107
107
|
export const ESP32S2_BOOTLOADER_FLASH_OFFSET = 0x1000;
|
|
108
|
-
|
|
109
108
|
// ESP32-S2 RTC Watchdog Timer registers for USB-OTG reset
|
|
110
|
-
export const
|
|
111
|
-
export const
|
|
112
|
-
|
|
109
|
+
export const ESP32S2_RTCCNTL_BASE_REG = 0x3f408000;
|
|
110
|
+
export const ESP32S2_RTC_CNTL_WDTWPROTECT_REG =
|
|
111
|
+
ESP32S2_RTCCNTL_BASE_REG + 0x00ac;
|
|
112
|
+
export const ESP32S2_RTC_CNTL_WDTCONFIG0_REG =
|
|
113
|
+
ESP32S2_RTCCNTL_BASE_REG + 0x0094;
|
|
114
|
+
export const ESP32S2_RTC_CNTL_WDTCONFIG1_REG =
|
|
115
|
+
ESP32S2_RTCCNTL_BASE_REG + 0x0098;
|
|
113
116
|
export const ESP32S2_RTC_CNTL_WDT_WKEY = 0x50d83aa1;
|
|
114
|
-
|
|
115
117
|
// ESP32-S2 GPIO strap register and boot mode control
|
|
116
118
|
export const ESP32S2_GPIO_STRAP_REG = 0x3f404038;
|
|
117
119
|
export const ESP32S2_GPIO_STRAP_SPI_BOOT_MASK = 1 << 3; // Not download mode
|
|
120
|
+
export const ESP32S2_GPIO_STRAP_VDDSPI_MASK = 1 << 4; // SPI voltage (1.8V vs 3.3V)
|
|
118
121
|
export const ESP32S2_RTC_CNTL_OPTION1_REG = 0x3f408128;
|
|
119
122
|
export const ESP32S2_RTC_CNTL_FORCE_DOWNLOAD_BOOT_MASK = 0x1; // Is download mode forced over USB?
|
|
123
|
+
export const ESP32S2_UARTDEV_BUF_NO = 0x3ffffd14; // Variable in ROM .bss which indicates the port in use
|
|
124
|
+
export const ESP32S2_UARTDEV_BUF_NO_USB_OTG = 2; // Value of the above indicating that USB-OTG is in use
|
|
120
125
|
|
|
121
126
|
export const ESP32S3_SPI_REG_BASE = 0x60002000;
|
|
122
127
|
export const ESP32S3_BASEFUSEADDR = 0x60007000;
|
|
@@ -128,19 +133,25 @@ export const ESP32S3_SPI_MOSI_DLEN_OFFS = 0x24;
|
|
|
128
133
|
export const ESP32S3_SPI_MISO_DLEN_OFFS = 0x28;
|
|
129
134
|
export const ESP32S3_SPI_W0_OFFS = 0x58;
|
|
130
135
|
export const ESP32S3_UART_DATE_REG_ADDR = 0x60000080;
|
|
131
|
-
export const ESP32S3_BOOTLOADER_FLASH_OFFSET =
|
|
132
|
-
|
|
136
|
+
export const ESP32S3_BOOTLOADER_FLASH_OFFSET = 0x0000;
|
|
133
137
|
// ESP32-S3 RTC Watchdog Timer registers for USB-OTG reset
|
|
134
|
-
export const
|
|
135
|
-
export const
|
|
136
|
-
|
|
138
|
+
export const ESP32S3_RTCCNTL_BASE_REG = 0x60008000;
|
|
139
|
+
export const ESP32S3_RTC_CNTL_WDTWPROTECT_REG =
|
|
140
|
+
ESP32S3_RTCCNTL_BASE_REG + 0x00b0;
|
|
141
|
+
export const ESP32S3_RTC_CNTL_WDTCONFIG0_REG =
|
|
142
|
+
ESP32S3_RTCCNTL_BASE_REG + 0x0098;
|
|
143
|
+
export const ESP32S3_RTC_CNTL_WDTCONFIG1_REG =
|
|
144
|
+
ESP32S3_RTCCNTL_BASE_REG + 0x009c;
|
|
137
145
|
export const ESP32S3_RTC_CNTL_WDT_WKEY = 0x50d83aa1;
|
|
138
|
-
|
|
139
146
|
// ESP32-S3 GPIO strap register and boot mode control
|
|
140
147
|
export const ESP32S3_GPIO_STRAP_REG = 0x60004038;
|
|
141
148
|
export const ESP32S3_GPIO_STRAP_SPI_BOOT_MASK = 1 << 3; // Not download mode
|
|
149
|
+
export const ESP32S3_GPIO_STRAP_VDDSPI_MASK = 1 << 4;
|
|
142
150
|
export const ESP32S3_RTC_CNTL_OPTION1_REG = 0x6000812c;
|
|
143
151
|
export const ESP32S3_RTC_CNTL_FORCE_DOWNLOAD_BOOT_MASK = 0x1; // Is download mode forced over USB?
|
|
152
|
+
export const ESP32S3_UARTDEV_BUF_NO = 0x3fcef14c; // Variable in ROM .bss which indicates the port in use
|
|
153
|
+
export const ESP32S3_UARTDEV_BUF_NO_USB_OTG = 3; // The above var when USB-OTG is used
|
|
154
|
+
export const ESP32S3_UARTDEV_BUF_NO_USB_JTAG_SERIAL = 4; // The above var when USB-JTAG/Serial is used
|
|
144
155
|
|
|
145
156
|
export const ESP32C2_SPI_REG_BASE = 0x60002000;
|
|
146
157
|
export const ESP32C2_BASEFUSEADDR = 0x60008800;
|
|
@@ -152,10 +163,20 @@ export const ESP32C2_SPI_MOSI_DLEN_OFFS = 0x24;
|
|
|
152
163
|
export const ESP32C2_SPI_MISO_DLEN_OFFS = 0x28;
|
|
153
164
|
export const ESP32C2_SPI_W0_OFFS = 0x58;
|
|
154
165
|
export const ESP32C2_UART_DATE_REG_ADDR = 0x6000007c;
|
|
155
|
-
export const ESP32C2_BOOTLOADER_FLASH_OFFSET =
|
|
166
|
+
export const ESP32C2_BOOTLOADER_FLASH_OFFSET = 0x0000;
|
|
167
|
+
// ESP32-C2 RTC Watchdog Timer registers
|
|
168
|
+
export const ESP32C2_RTCCNTL_BASE_REG = 0x60008000;
|
|
169
|
+
export const ESP32C2_RTC_CNTL_WDTWPROTECT_REG =
|
|
170
|
+
ESP32C2_RTCCNTL_BASE_REG + 0x009c;
|
|
171
|
+
export const ESP32C2_RTC_CNTL_WDTCONFIG0_REG =
|
|
172
|
+
ESP32C2_RTCCNTL_BASE_REG + 0x0084;
|
|
173
|
+
export const ESP32C2_RTC_CNTL_WDTCONFIG1_REG =
|
|
174
|
+
ESP32C2_RTCCNTL_BASE_REG + 0x0088;
|
|
175
|
+
export const ESP32C2_RTC_CNTL_WDT_WKEY = 0x50d83aa1;
|
|
156
176
|
|
|
157
177
|
export const ESP32C3_SPI_REG_BASE = 0x60002000;
|
|
158
178
|
export const ESP32C3_BASEFUSEADDR = 0x60008800;
|
|
179
|
+
export const ESP32C3_EFUSE_BLOCK1_ADDR = ESP32C3_BASEFUSEADDR + 0x044;
|
|
159
180
|
export const ESP32C3_MACFUSEADDR = 0x60008800 + 0x044;
|
|
160
181
|
export const ESP32C3_SPI_USR_OFFS = 0x18;
|
|
161
182
|
export const ESP32C3_SPI_USR1_OFFS = 0x1c;
|
|
@@ -164,7 +185,28 @@ export const ESP32C3_SPI_MOSI_DLEN_OFFS = 0x24;
|
|
|
164
185
|
export const ESP32C3_SPI_MISO_DLEN_OFFS = 0x28;
|
|
165
186
|
export const ESP32C3_SPI_W0_OFFS = 0x58;
|
|
166
187
|
export const ESP32C3_UART_DATE_REG_ADDR = 0x6000007c;
|
|
167
|
-
export const ESP32C3_BOOTLOADER_FLASH_OFFSET =
|
|
188
|
+
export const ESP32C3_BOOTLOADER_FLASH_OFFSET = 0x0000;
|
|
189
|
+
// ESP32-C3 RTC Watchdog Timer registers
|
|
190
|
+
export const ESP32C3_RTC_CNTL_BASE_REG = 0x60008000;
|
|
191
|
+
export const ESP32C3_RTC_CNTL_WDTWPROTECT_REG =
|
|
192
|
+
ESP32C3_RTC_CNTL_BASE_REG + 0x00a8;
|
|
193
|
+
export const ESP32C3_RTC_CNTL_WDTCONFIG0_REG =
|
|
194
|
+
ESP32C3_RTC_CNTL_BASE_REG + 0x0090;
|
|
195
|
+
export const ESP32C3_RTC_CNTL_WDTCONFIG1_REG =
|
|
196
|
+
ESP32C3_RTC_CNTL_BASE_REG + 0x0094;
|
|
197
|
+
export const ESP32C3_RTC_CNTL_WDT_WKEY = 0x50d83aa1;
|
|
198
|
+
export const ESP32C3_RTC_CNTL_SWD_WKEY = 0x8f1d312a;
|
|
199
|
+
export const ESP32C3_RTC_CNTL_SWD_CONF_REG = ESP32C3_RTC_CNTL_BASE_REG + 0x00ac;
|
|
200
|
+
export const ESP32C3_RTC_CNTL_SWD_AUTO_FEED_EN = 1 << 31;
|
|
201
|
+
export const ESP32C3_RTC_CNTL_SWD_WPROTECT_REG =
|
|
202
|
+
ESP32C3_RTC_CNTL_BASE_REG + 0x00b0;
|
|
203
|
+
export const ESP32C3_UARTDEV_BUF_NO_USB_JTAG_SERIAL = 3; // The above var when USB-JTAG/Serial is used
|
|
204
|
+
export const ESP32C3_BUF_UART_NO_OFFSET = 24;
|
|
205
|
+
// Note: ESP32C3_BSS_UART_DEV_ADDR is calculated dynamically based on chip revision in esp_loader.ts
|
|
206
|
+
// Revision < 101: 0x3FCDF064, Revision >= 101: 0x3FCDF060
|
|
207
|
+
// ESP32-C3 EFUSE registers for chip revision detection
|
|
208
|
+
export const ESP32C3_EFUSE_RD_MAC_SPI_SYS_3_REG = 0x60008850;
|
|
209
|
+
export const ESP32C3_EFUSE_RD_MAC_SPI_SYS_5_REG = 0x60008858;
|
|
168
210
|
|
|
169
211
|
export const ESP32C5_SPI_REG_BASE = 0x60003000;
|
|
170
212
|
export const ESP32C5_BASEFUSEADDR = 0x600b4800;
|
|
@@ -177,6 +219,9 @@ export const ESP32C5_SPI_MISO_DLEN_OFFS = 0x28;
|
|
|
177
219
|
export const ESP32C5_SPI_W0_OFFS = 0x58;
|
|
178
220
|
export const ESP32C5_UART_DATE_REG_ADDR = 0x6000007c;
|
|
179
221
|
export const ESP32C5_BOOTLOADER_FLASH_OFFSET = 0x2000;
|
|
222
|
+
// ESP32-C5 USB-JTAG/Serial detection
|
|
223
|
+
export const ESP32C5_UARTDEV_BUF_NO = 0x4085f514; // Variable in ROM .bss which indicates the port in use
|
|
224
|
+
export const ESP32C5_UARTDEV_BUF_NO_USB_JTAG_SERIAL = 3; // The above var when USB-JTAG/Serial is used
|
|
180
225
|
|
|
181
226
|
export const ESP32C6_SPI_REG_BASE = 0x60003000;
|
|
182
227
|
export const ESP32C6_BASEFUSEADDR = 0x600b0800;
|
|
@@ -188,7 +233,35 @@ export const ESP32C6_SPI_MOSI_DLEN_OFFS = 0x24;
|
|
|
188
233
|
export const ESP32C6_SPI_MISO_DLEN_OFFS = 0x28;
|
|
189
234
|
export const ESP32C6_SPI_W0_OFFS = 0x58;
|
|
190
235
|
export const ESP32C6_UART_DATE_REG_ADDR = 0x6000007c;
|
|
191
|
-
export const ESP32C6_BOOTLOADER_FLASH_OFFSET =
|
|
236
|
+
export const ESP32C6_BOOTLOADER_FLASH_OFFSET = 0x0000;
|
|
237
|
+
// ESP32-C6 RTC Watchdog Timer registers (LP_WDT)
|
|
238
|
+
export const ESP32C6_DR_REG_LP_WDT_BASE = 0x600b1c00;
|
|
239
|
+
export const ESP32C6_RTC_CNTL_WDTWPROTECT_REG =
|
|
240
|
+
ESP32C6_DR_REG_LP_WDT_BASE + 0x0018; // LP_WDT_RWDT_WPROTECT_REG
|
|
241
|
+
export const ESP32C6_RTC_CNTL_WDTCONFIG0_REG =
|
|
242
|
+
ESP32C6_DR_REG_LP_WDT_BASE + 0x0000; // LP_WDT_RWDT_CONFIG0_REG
|
|
243
|
+
export const ESP32C6_RTC_CNTL_WDTCONFIG1_REG =
|
|
244
|
+
ESP32C6_DR_REG_LP_WDT_BASE + 0x0004; // LP_WDT_RWDT_CONFIG1_REG
|
|
245
|
+
export const ESP32C6_RTC_CNTL_WDT_WKEY = 0x50d83aa1; // LP_WDT_SWD_WKEY, same as WDT key in this case
|
|
246
|
+
export const ESP32C6_RTC_CNTL_SWD_WKEY = 0x50d83aa1; // LP_WDT_SWD_WKEY, same as WDT key in this case
|
|
247
|
+
// ESP32-C6 USB-JTAG/Serial detection
|
|
248
|
+
export const ESP32C6_UARTDEV_BUF_NO = 0x4087f580; // Variable in ROM .bss which indicates the port in use
|
|
249
|
+
export const ESP32C6_UARTDEV_BUF_NO_USB_JTAG_SERIAL = 3; // The above var when USB-JTAG/Serial is used
|
|
250
|
+
|
|
251
|
+
// ESP32-C5/C6 LP Watchdog Timer registers (Low Power WDT)
|
|
252
|
+
export const ESP32C5_C6_DR_REG_LP_WDT_BASE = 0x600b1c00;
|
|
253
|
+
export const ESP32C5_C6_RTC_CNTL_WDTCONFIG0_REG =
|
|
254
|
+
ESP32C5_C6_DR_REG_LP_WDT_BASE + 0x0000; // LP_WDT_RWDT_CONFIG0_REG
|
|
255
|
+
export const ESP32C5_C6_RTC_CNTL_WDTCONFIG1_REG =
|
|
256
|
+
ESP32C5_C6_DR_REG_LP_WDT_BASE + 0x0004; // LP_WDT_RWDT_CONFIG1_REG
|
|
257
|
+
export const ESP32C5_C6_RTC_CNTL_WDTWPROTECT_REG =
|
|
258
|
+
ESP32C5_C6_DR_REG_LP_WDT_BASE + 0x0018; // LP_WDT_RWDT_WPROTECT_REG
|
|
259
|
+
export const ESP32C5_C6_RTC_CNTL_WDT_WKEY = 0x50d83aa1; // LP_WDT_SWD_WKEY
|
|
260
|
+
export const ESP32C5_C6_RTC_CNTL_SWD_CONF_REG =
|
|
261
|
+
ESP32C5_C6_DR_REG_LP_WDT_BASE + 0x001c; // LP_WDT_SWD_CONFIG_REG
|
|
262
|
+
export const ESP32C5_C6_RTC_CNTL_SWD_AUTO_FEED_EN = 1 << 18;
|
|
263
|
+
export const ESP32C5_C6_RTC_CNTL_SWD_WPROTECT_REG =
|
|
264
|
+
ESP32C5_C6_DR_REG_LP_WDT_BASE + 0x0020; // LP_WDT_SWD_WPROTECT_REG
|
|
192
265
|
|
|
193
266
|
export const ESP32C61_SPI_REG_BASE = 0x60003000;
|
|
194
267
|
export const ESP32C61_BASEFUSEADDR = 0x600b4800;
|
|
@@ -200,7 +273,7 @@ export const ESP32C61_SPI_MOSI_DLEN_OFFS = 0x24;
|
|
|
200
273
|
export const ESP32C61_SPI_MISO_DLEN_OFFS = 0x28;
|
|
201
274
|
export const ESP32C61_SPI_W0_OFFS = 0x58;
|
|
202
275
|
export const ESP32C61_UART_DATE_REG_ADDR = 0x6000007c;
|
|
203
|
-
export const ESP32C61_BOOTLOADER_FLASH_OFFSET =
|
|
276
|
+
export const ESP32C61_BOOTLOADER_FLASH_OFFSET = 0x0000;
|
|
204
277
|
|
|
205
278
|
export const ESP32H2_SPI_REG_BASE = 0x60003000;
|
|
206
279
|
export const ESP32H2_BASEFUSEADDR = 0x600b0800;
|
|
@@ -212,7 +285,20 @@ export const ESP32H2_SPI_MOSI_DLEN_OFFS = 0x24;
|
|
|
212
285
|
export const ESP32H2_SPI_MISO_DLEN_OFFS = 0x28;
|
|
213
286
|
export const ESP32H2_SPI_W0_OFFS = 0x58;
|
|
214
287
|
export const ESP32H2_UART_DATE_REG_ADDR = 0x6000007c;
|
|
215
|
-
export const ESP32H2_BOOTLOADER_FLASH_OFFSET =
|
|
288
|
+
export const ESP32H2_BOOTLOADER_FLASH_OFFSET = 0x0000;
|
|
289
|
+
// ESP32-H2 RTC Watchdog Timer registers (LP_WDT)
|
|
290
|
+
export const ESP32H2_DR_REG_LP_WDT_BASE = 0x600b1c00;
|
|
291
|
+
export const ESP32H2_RTC_CNTL_WDTWPROTECT_REG =
|
|
292
|
+
ESP32H2_DR_REG_LP_WDT_BASE + 0x001c; // LP_WDT_RWDT_WPROTECT_REG
|
|
293
|
+
export const ESP32H2_RTC_CNTL_WDTCONFIG0_REG =
|
|
294
|
+
ESP32H2_DR_REG_LP_WDT_BASE + 0x0000; // LP_WDT_RWDT_CONFIG0_REG
|
|
295
|
+
export const ESP32H2_RTC_CNTL_WDTCONFIG1_REG =
|
|
296
|
+
ESP32H2_DR_REG_LP_WDT_BASE + 0x0004; // LP_WDT_RWDT_CONFIG1_REG
|
|
297
|
+
export const ESP32H2_RTC_CNTL_WDT_WKEY = 0x50d83aa1; // LP_WDT_SWD_WKEY, same as WDT key in this case
|
|
298
|
+
export const ESP32H2_RTC_CNTL_SWD_WKEY = 0x50d83aa1; // LP_WDT_SWD_WKEY, same as WDT key in this case
|
|
299
|
+
// ESP32-H2 USB-JTAG/Serial detection
|
|
300
|
+
export const ESP32H2_UARTDEV_BUF_NO = 0x4084fefc; // Variable in ROM .bss which indicates the port in use
|
|
301
|
+
export const ESP32H2_UARTDEV_BUF_NO_USB_JTAG_SERIAL = 3; // The above var when USB-JTAG/Serial is used
|
|
216
302
|
|
|
217
303
|
export const ESP32H4_SPI_REG_BASE = 0x60099000;
|
|
218
304
|
export const ESP32H4_BASEFUSEADDR = 0x600b1800;
|
|
@@ -225,6 +311,16 @@ export const ESP32H4_SPI_MISO_DLEN_OFFS = 0x28;
|
|
|
225
311
|
export const ESP32H4_SPI_W0_OFFS = 0x58;
|
|
226
312
|
export const ESP32H4_UART_DATE_REG_ADDR = 0x60012000 + 0x7c;
|
|
227
313
|
export const ESP32H4_BOOTLOADER_FLASH_OFFSET = 0x2000;
|
|
314
|
+
// ESP32-H4 RTC Watchdog Timer registers
|
|
315
|
+
export const ESP32H4_DR_REG_LP_WDT_BASE = 0x600b5400;
|
|
316
|
+
export const ESP32H4_RTC_CNTL_WDTWPROTECT_REG =
|
|
317
|
+
ESP32H4_DR_REG_LP_WDT_BASE + 0x0018; // LP_WDT_RWDT_WPROTECT_REG
|
|
318
|
+
export const ESP32H4_RTC_CNTL_WDTCONFIG0_REG =
|
|
319
|
+
ESP32H4_DR_REG_LP_WDT_BASE + 0x0000; // LP_WDT_RWDT_CONFIG0_REG
|
|
320
|
+
export const ESP32H4_RTC_CNTL_WDTCONFIG1_REG =
|
|
321
|
+
ESP32H4_DR_REG_LP_WDT_BASE + 0x0004; // LP_WDT_RWDT_CONFIG1_REG
|
|
322
|
+
export const ESP32H4_RTC_CNTL_WDT_WKEY = 0x50d83aa1; // LP_WDT_SWD_WKEY, same as WDT key in this case
|
|
323
|
+
export const ESP32H4_RTC_CNTL_SWD_WKEY = 0x50d83aa1; // LP_WDT_SWD_WKEY, same as WDT key in this case
|
|
228
324
|
|
|
229
325
|
export const ESP32H21_SPI_REG_BASE = 0x60003000;
|
|
230
326
|
export const ESP32H21_BASEFUSEADDR = 0x600b4000;
|
|
@@ -236,7 +332,17 @@ export const ESP32H21_SPI_MOSI_DLEN_OFFS = 0x24;
|
|
|
236
332
|
export const ESP32H21_SPI_MISO_DLEN_OFFS = 0x28;
|
|
237
333
|
export const ESP32H21_SPI_W0_OFFS = 0x58;
|
|
238
334
|
export const ESP32H21_UART_DATE_REG_ADDR = 0x6000007c;
|
|
239
|
-
export const ESP32H21_BOOTLOADER_FLASH_OFFSET =
|
|
335
|
+
export const ESP32H21_BOOTLOADER_FLASH_OFFSET = 0x0000;
|
|
336
|
+
// ESP32-H21 RTC Watchdog Timer registers (LP_WDT)
|
|
337
|
+
export const ESP32H21_DR_REG_LP_WDT_BASE = 0x600b1c00;
|
|
338
|
+
export const ESP32H21_RTC_CNTL_WDTWPROTECT_REG =
|
|
339
|
+
ESP32H21_DR_REG_LP_WDT_BASE + 0x001c;
|
|
340
|
+
export const ESP32H21_RTC_CNTL_WDTCONFIG0_REG =
|
|
341
|
+
ESP32H21_DR_REG_LP_WDT_BASE + 0x0000;
|
|
342
|
+
export const ESP32H21_RTC_CNTL_WDTCONFIG1_REG =
|
|
343
|
+
ESP32H21_DR_REG_LP_WDT_BASE + 0x0004; // LP_WDT_RWDT_CONFIG1_REG
|
|
344
|
+
export const ESP32H21_RTC_CNTL_WDT_WKEY = 0x50d83aa1;
|
|
345
|
+
export const ESP32H21_RTC_CNTL_SWD_WKEY = 0x50d83aa1; // LP_WDT_SWD_WKEY, same as WDT key in this case
|
|
240
346
|
|
|
241
347
|
export const ESP32P4_SPI_REG_BASE = 0x5008d000;
|
|
242
348
|
export const ESP32P4_BASEFUSEADDR = 0x5012d000;
|
|
@@ -250,6 +356,33 @@ export const ESP32P4_SPI_MISO_DLEN_OFFS = 0x28;
|
|
|
250
356
|
export const ESP32P4_SPI_W0_OFFS = 0x58;
|
|
251
357
|
export const ESP32P4_UART_DATE_REG_ADDR = 0x500ca000 + 0x8c;
|
|
252
358
|
export const ESP32P4_BOOTLOADER_FLASH_OFFSET = 0x2000;
|
|
359
|
+
// ESP32-P4 RTC Watchdog Timer registers
|
|
360
|
+
export const ESP32P4_DR_REG_LP_WDT_BASE = 0x50116000;
|
|
361
|
+
export const ESP32P4_RTC_CNTL_WDTWPROTECT_REG =
|
|
362
|
+
ESP32P4_DR_REG_LP_WDT_BASE + 0x0018; // LP_WDT_WPROTECT_REG
|
|
363
|
+
export const ESP32P4_RTC_CNTL_WDTCONFIG0_REG =
|
|
364
|
+
ESP32P4_DR_REG_LP_WDT_BASE + 0x0000; // LP_WDT_CONFIG0_REG
|
|
365
|
+
export const ESP32P4_RTC_CNTL_WDTCONFIG1_REG =
|
|
366
|
+
ESP32P4_DR_REG_LP_WDT_BASE + 0x0004; // LP_WDT_CONFIG1_REG
|
|
367
|
+
export const ESP32P4_RTC_CNTL_WDT_WKEY = 0x50d83aa1;
|
|
368
|
+
export const ESP32P4_RTC_CNTL_SWD_CONF_REG =
|
|
369
|
+
ESP32P4_DR_REG_LP_WDT_BASE + 0x001c; // RTC_WDT_SWD_CONFIG_REG
|
|
370
|
+
export const ESP32P4_RTC_CNTL_SWD_AUTO_FEED_EN = 1 << 18;
|
|
371
|
+
export const ESP32P4_RTC_CNTL_SWD_WPROTECT_REG =
|
|
372
|
+
ESP32P4_DR_REG_LP_WDT_BASE + 0x0020; // RTC_WDT_SWD_WPROTECT_REG
|
|
373
|
+
export const ESP32P4_RTC_CNTL_SWD_WKEY = 0x50d83aa1; // RTC_WDT_SWD_WKEY, same as WDT key in this case
|
|
374
|
+
// ESP32-P4 USB-JTAG/Serial and USB-OTG detection
|
|
375
|
+
// Note: UARTDEV_BUF_NO is dynamic based on chip revision
|
|
376
|
+
// Revision < 300: 0x4FF3FEB0 + 24 = 0x4FF3FEC8
|
|
377
|
+
// Revision >= 300: 0x4FFBFEB0 + 24 = 0x4FFBFEC8
|
|
378
|
+
export const ESP32P4_UARTDEV_BUF_NO_REV0 = 0x4ff3fec8; // Variable in ROM .bss (revision < 300)
|
|
379
|
+
export const ESP32P4_UARTDEV_BUF_NO_REV300 = 0x4ffbfec8; // Variable in ROM .bss (revision >= 300)
|
|
380
|
+
export const ESP32P4_UARTDEV_BUF_NO_USB_OTG = 5; // The above var when USB-OTG is used
|
|
381
|
+
export const ESP32P4_UARTDEV_BUF_NO_USB_JTAG_SERIAL = 6; // The above var when USB-JTAG/Serial is used
|
|
382
|
+
export const ESP32P4_GPIO_STRAP_REG = 0x500e0038;
|
|
383
|
+
export const ESP32P4_GPIO_STRAP_SPI_BOOT_MASK = 0x8; // Not download mode
|
|
384
|
+
export const ESP32P4_RTC_CNTL_OPTION1_REG = 0x50110008;
|
|
385
|
+
export const ESP32P4_RTC_CNTL_FORCE_DOWNLOAD_BOOT_MASK = 0x4; // Is download mode forced over USB?
|
|
253
386
|
|
|
254
387
|
export const ESP32S31_SPI_REG_BASE = 0x20500000;
|
|
255
388
|
export const ESP32S31_BASEFUSEADDR = 0x20715000;
|