mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(wdt): move non-auto generated wdt values to ll
This commit is contained in:
parent
b1e85404f1
commit
e3861261eb
@ -39,6 +39,7 @@
|
||||
#include "esp_efuse.h"
|
||||
#include "hal/mmu_hal.h"
|
||||
#include "hal/cache_hal.h"
|
||||
#include "hal/rwdt_ll.h"
|
||||
|
||||
static const char *TAG = "boot.esp32c2";
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "hal/mmu_hal.h"
|
||||
#include "hal/cache_hal.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "hal/rwdt_ll.h"
|
||||
|
||||
static const char *TAG = "boot.esp32c3";
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "hal/clk_tree_ll.h"
|
||||
#include "soc/lp_wdt_reg.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "hal/lpwdt_ll.h"
|
||||
#include "modem/modem_lpcon_reg.h"
|
||||
|
||||
static const char *TAG = "boot.esp32c6";
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "esp_efuse.h"
|
||||
#include "hal/mmu_hal.h"
|
||||
#include "hal/cache_hal.h"
|
||||
#include "hal/lpwdt_ll.h"
|
||||
#include "soc/lp_wdt_reg.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "modem/modem_lpcon_reg.h"
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "hal/mmu_hal.h"
|
||||
#include "hal/cache_hal.h"
|
||||
#include "hal/clk_tree_ll.h"
|
||||
#include "hal/lpwdt_ll.h"
|
||||
#include "soc/lp_wdt_reg.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "esp_efuse.h"
|
||||
#include "hal/mmu_hal.h"
|
||||
#include "hal/cache_hal.h"
|
||||
#include "hal/rwdt_ll.h"
|
||||
#include "xtensa/config/core.h"
|
||||
#include "xt_instr_macros.h"
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "rtc_wdt.h"
|
||||
#include "soc/rtc.h"
|
||||
#include "hal/efuse_ll.h"
|
||||
#include "hal/rwdt_ll.h"
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "soc/gpio_reg.h"
|
||||
#include "soc/io_mux_reg.h"
|
||||
#include "soc/interrupt_matrix_reg.h"
|
||||
#include "hal/mwdt_ll.h"
|
||||
|
||||
static __attribute__((unused)) const char *TAG = "sleep_sys_periph";
|
||||
|
||||
|
@ -70,6 +70,7 @@ Interrupt , a high-priority interrupt, is used for several things:
|
||||
#define TIMG1_WDT_STG1_HOLD_OFFSET TIMG1_REG_OFFSET(TIMG_WDTCONFIG3_REG(1))
|
||||
#define TIMG1_WDT_FEED_OFFSET TIMG1_REG_OFFSET(TIMG_WDTFEED_REG(1))
|
||||
#define UART0_DATA_REG (0x3FF40078)
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
#define ETS_TG1_WDT_LEVEL_INTR_SOURCE 20
|
||||
|
||||
.macro wdt_clr_intr_status dev
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -26,6 +26,25 @@ extern "C" {
|
||||
/* Pre-calculated prescaler to achieve 500 ticks/us (MWDT1_TICKS_PER_US) when using default clock (MWDT_CLK_SRC_DEFAULT ) */
|
||||
#define MWDT_LL_DEFAULT_CLK_PRESCALER 40000
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
/* Possible values for TIMG_WDT_CPU_RESET_LENGTH and TIMG_WDT_SYS_RESET_LENGTH */
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
//Type check wdt_stage_action_t
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -21,6 +21,19 @@ extern "C" {
|
||||
#include "esp_attr.h"
|
||||
#include "esp_assert.h"
|
||||
|
||||
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
//Type check wdt_stage_action_t
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == RTC_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -26,6 +26,25 @@ extern "C" {
|
||||
/* Pre-calculated prescaler to achieve 500 ticks/us (MWDT1_TICKS_PER_US) when using default clock (MWDT_CLK_SRC_DEFAULT ) */
|
||||
#define MWDT_LL_DEFAULT_CLK_PRESCALER 20000
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
/* Possible values for TIMG_WDT_CPU_RESET_LENGTH and TIMG_WDT_SYS_RESET_LENGTH */
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
//Type check wdt_stage_action_t
|
||||
STATIC_HAL_REG_CHECK("mwdt", WDT_STAGE_ACTION_OFF, TIMG_WDT_STG_SEL_OFF);
|
||||
STATIC_HAL_REG_CHECK("mwdt", WDT_STAGE_ACTION_INT, TIMG_WDT_STG_SEL_INT);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -21,6 +21,21 @@ extern "C" {
|
||||
#include "esp_attr.h"
|
||||
#include "esp_assert.h"
|
||||
|
||||
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
/* The value that needs to be written to RTC_CNTL_SWD_WPROTECT_REG to write-enable the wdt registers */
|
||||
#define RTC_CNTL_SWD_WKEY_VALUE 0x8F1D312A
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
//Type check wdt_stage_action_t
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == RTC_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -26,6 +26,25 @@ extern "C" {
|
||||
/* Pre-calculated prescaler to achieve 500 ticks/us (MWDT1_TICKS_PER_US) when using default clock (MWDT_CLK_SRC_DEFAULT ) */
|
||||
#define MWDT_LL_DEFAULT_CLK_PRESCALER 40000
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
/* Possible values for TIMG_WDT_CPU_RESET_LENGTH and TIMG_WDT_SYS_RESET_LENGTH */
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
//Type check wdt_stage_action_t
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -23,6 +23,21 @@ extern "C" {
|
||||
#include "esp_attr.h"
|
||||
#include "esp_assert.h"
|
||||
|
||||
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
/* The value that needs to be written to RTC_CNTL_SWD_WPROTECT_REG to write-enable the wdt registers */
|
||||
#define RTC_CNTL_SWD_WKEY_VALUE 0x8F1D312A
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
//Type check wdt_stage_action_t
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == RTC_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -24,6 +24,22 @@ extern "C" {
|
||||
|
||||
#include "esp32c6/rom/ets_sys.h"
|
||||
|
||||
// TODO: IDF-5730 (better to rename and move to wdt_types.h?)
|
||||
/* The value that needs to be written to LP_WDT_WPROTECT_REG to write-enable the wdt registers */
|
||||
#define LP_WDT_WKEY_VALUE 0x50D83AA1
|
||||
/* The value that needs to be written to LP_WDT_SWD_WPROTECT_REG to write-enable the swd registers */
|
||||
#define LP_WDT_SWD_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
// TODO: IDF-5717
|
||||
// //Type check wdt_stage_action_t
|
||||
// ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
@ -268,7 +284,7 @@ FORCE_INLINE_ATTR void lpwdt_ll_write_protect_enable(lp_wdt_dev_t *hw)
|
||||
*/
|
||||
FORCE_INLINE_ATTR void lpwdt_ll_write_protect_disable(lp_wdt_dev_t *hw)
|
||||
{
|
||||
hw->wprotect.val = RTC_CNTL_WDT_WKEY_VALUE;
|
||||
hw->wprotect.val = LP_WDT_WKEY_VALUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,6 +27,24 @@ extern "C" {
|
||||
/* Pre-calculated prescaler to achieve 500 ticks/us (MWDT1_TICKS_PER_US) when using default clock (MWDT_CLK_SRC_DEFAULT ) */
|
||||
#define MWDT_LL_DEFAULT_CLK_PRESCALER 40000
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
//Type check wdt_stage_action_t
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -23,6 +23,21 @@ extern "C" {
|
||||
|
||||
#include "esp32h2/rom/ets_sys.h"
|
||||
|
||||
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
/* The value that needs to be written to LP_WDT_SWD_WPROTECT_REG to write-enable the swd registers */
|
||||
#define LP_WDT_SWD_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
/**
|
||||
* @brief Enable the RWDT
|
||||
*
|
||||
|
@ -26,6 +26,24 @@ extern "C" {
|
||||
/* Pre-calculated prescaler to achieve 500 ticks/us (MWDT1_TICKS_PER_US) when using default clock (MWDT_CLK_SRC_DEFAULT ) */
|
||||
#define MWDT_LL_DEFAULT_CLK_PRESCALER 24000
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
//Type check wdt_stage_action_t
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -24,6 +24,24 @@ extern "C" {
|
||||
|
||||
#include "esp32p4/rom/ets_sys.h"
|
||||
|
||||
|
||||
// TODO: IDF-5730 (better to rename and move to wdt_types.h?)
|
||||
/* The value that needs to be written to LP_WDT_WPROTECT_REG to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
/* The value that needs to be written to LP_WDT_SWD_WPROTECT_REG to write-enable the swd registers */
|
||||
#define LP_WDT_SWD_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
|
||||
// TODO: IDF-7539
|
||||
// //Type check wdt_stage_action_t
|
||||
// ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -27,6 +27,23 @@ extern "C" {
|
||||
/* Pre-calculated prescaler to achieve 500 ticks/us (MWDT1_TICKS_PER_US) when using default clock (MWDT_CLK_SRC_DEFAULT ) */
|
||||
#define MWDT_LL_DEFAULT_CLK_PRESCALER 20000
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
// //Type check wdt_stage_action_t
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -26,6 +26,25 @@ extern "C" {
|
||||
/* Pre-calculated prescaler to achieve 500 ticks/us (MWDT1_TICKS_PER_US) when using default clock (MWDT_CLK_SRC_DEFAULT ) */
|
||||
#define MWDT_LL_DEFAULT_CLK_PRESCALER 40000
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
/* Possible values for TIMG_WDT_CPU_RESET_LENGTH and TIMG_WDT_SYS_RESET_LENGTH */
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
//Type check wdt_stage_action_t
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -23,6 +23,19 @@ extern "C" {
|
||||
#include "esp_attr.h"
|
||||
#include "esp_assert.h"
|
||||
|
||||
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
//Type check wdt_stage_action_t
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == RTC_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");
|
||||
|
@ -1,24 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef _SOC_RTC_CNTL_REG_H_
|
||||
#define _SOC_RTC_CNTL_REG_H_
|
||||
|
||||
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
#include "soc.h"
|
||||
#define RTC_CNTL_OPTIONS0_REG (DR_REG_RTCCNTL_BASE + 0x0)
|
||||
/* RTC_CNTL_SW_SYS_RST : WO ;bitpos:[31] ;default: 1'd0 ; */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -12,25 +12,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
/* Possible values for TIMG_WDT_CPU_RESET_LENGTH and TIMG_WDT_SYS_RESET_LENGTH */
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
#define REG_TIMG_BASE(i) (DR_REG_TIMERGROUP0_BASE + i*0x1000)
|
||||
#define TIMG_T0CONFIG_REG(i) (REG_TIMG_BASE(i) + 0x0000)
|
||||
/* TIMG_T0_EN : R/W ;bitpos:[31] ;default: 1'h0 ; */
|
||||
|
@ -1,27 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef _SOC_RTC_CNTL_REG_H_
|
||||
#define _SOC_RTC_CNTL_REG_H_
|
||||
|
||||
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
/* The value that needs to be written to RTC_CNTL_SWD_WPROTECT_REG to write-enable the wdt registers */
|
||||
#define RTC_CNTL_SWD_WKEY_VALUE 0x8F1D312A
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -13,24 +13,6 @@ extern "C" {
|
||||
|
||||
#define DR_REG_TIMG_BASE(i) REG_TIMG_BASE(i)
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
/* Possible values for TIMG_WDT_CPU_RESET_LENGTH and TIMG_WDT_SYS_RESET_LENGTH */
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
/** TIMG_T0CONFIG_REG register
|
||||
* Timer 0 configuration register
|
||||
|
@ -1,27 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef _SOC_RTC_CNTL_REG_H_
|
||||
#define _SOC_RTC_CNTL_REG_H_
|
||||
|
||||
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
/* The value that needs to be written to RTC_CNTL_SWD_WPROTECT_REG to write-enable the wdt registers */
|
||||
#define RTC_CNTL_SWD_WKEY_VALUE 0x8F1D312A
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -13,25 +13,6 @@ extern "C" {
|
||||
|
||||
#define DR_REG_TIMG_BASE(i) REG_TIMG_BASE(i)
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
/* Possible values for TIMG_WDT_CPU_RESET_LENGTH and TIMG_WDT_SYS_RESET_LENGTH */
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
/** TIMG_T0CONFIG_REG register
|
||||
* Timer 0 configuration register
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -11,22 +11,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// TODO: IDF-5730 (better to rename and move to wdt_types.h?)
|
||||
/* The value that needs to be written to LP_WDT_WPROTECT_REG to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
/* The value that needs to be written to LP_WDT_SWD_WPROTECT_REG to write-enable the swd registers */
|
||||
#define LP_WDT_SWD_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
/** LP_WDT_CONFIG0_REG register
|
||||
* need_des
|
||||
*/
|
||||
|
@ -11,23 +11,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
/** TIMG_T0CONFIG_REG register
|
||||
* Timer 0 configuration register
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -11,22 +11,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// ESP32H2-TODO: IDF-5730 better to move to wdt_types.h
|
||||
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
/* The value that needs to be written to LP_WDT_SWD_WPROTECT_REG to write-enable the swd registers */
|
||||
#define LP_WDT_SWD_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
/** LP_WDT_CONFIG0_REG register
|
||||
* need_des
|
||||
*/
|
||||
|
@ -11,23 +11,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
/** TIMG_T0CONFIG_REG register
|
||||
* Timer 0 configuration register
|
||||
|
@ -11,24 +11,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
/** TIMG_T0CONFIG_REG register
|
||||
* Timer 0 configuration register
|
||||
*/
|
||||
|
@ -1,24 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef _SOC_RTC_CNTL_REG_H_
|
||||
#define _SOC_RTC_CNTL_REG_H_
|
||||
|
||||
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for RTC_CNTL_WDT_CPU_RESET_LENGTH and RTC_CNTL_WDT_SYS_RESET_LENGTH */
|
||||
#define RTC_WDT_RESET_LENGTH_100_NS 0
|
||||
#define RTC_WDT_RESET_LENGTH_200_NS 1
|
||||
#define RTC_WDT_RESET_LENGTH_300_NS 2
|
||||
#define RTC_WDT_RESET_LENGTH_400_NS 3
|
||||
#define RTC_WDT_RESET_LENGTH_500_NS 4
|
||||
#define RTC_WDT_RESET_LENGTH_800_NS 5
|
||||
#define RTC_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define RTC_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -13,24 +13,6 @@ extern "C" {
|
||||
|
||||
#define DR_REG_TIMG_BASE(i) REG_TIMG_BASE(i)
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||
|
||||
/* Possible values for TIMG_WDT_STGx */
|
||||
#define TIMG_WDT_STG_SEL_OFF 0
|
||||
#define TIMG_WDT_STG_SEL_INT 1
|
||||
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||
|
||||
/* Possible values for TIMG_WDT_CPU_RESET_LENGTH and TIMG_WDT_SYS_RESET_LENGTH */
|
||||
#define TIMG_WDT_RESET_LENGTH_100_NS 0
|
||||
#define TIMG_WDT_RESET_LENGTH_200_NS 1
|
||||
#define TIMG_WDT_RESET_LENGTH_300_NS 2
|
||||
#define TIMG_WDT_RESET_LENGTH_400_NS 3
|
||||
#define TIMG_WDT_RESET_LENGTH_500_NS 4
|
||||
#define TIMG_WDT_RESET_LENGTH_800_NS 5
|
||||
#define TIMG_WDT_RESET_LENGTH_1600_NS 6
|
||||
#define TIMG_WDT_RESET_LENGTH_3200_NS 7
|
||||
|
||||
/** TIMG_T0CONFIG_REG register
|
||||
* Timer 0 configuration register
|
||||
|
Loading…
Reference in New Issue
Block a user