fix(esp_hal_wdt): replace the erroneous RWDT timeout config in ROM with the code in ram
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
/* Functions */
|
/* Functions */
|
||||||
wdt_hal_init = 0x4fc001fc;
|
wdt_hal_init = 0x4fc001fc;
|
||||||
wdt_hal_deinit = 0x4fc00200;
|
wdt_hal_deinit = 0x4fc00200;
|
||||||
wdt_hal_config_stage = 0x4fc00204;
|
rom_wdt_hal_config_stage = 0x4fc00204;
|
||||||
wdt_hal_write_protect_disable = 0x4fc00208;
|
wdt_hal_write_protect_disable = 0x4fc00208;
|
||||||
wdt_hal_write_protect_enable = 0x4fc0020c;
|
wdt_hal_write_protect_enable = 0x4fc0020c;
|
||||||
wdt_hal_enable = 0x4fc00210;
|
wdt_hal_enable = 0x4fc00210;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -118,6 +118,19 @@ void wdt_hal_deinit(wdt_hal_context_t *hal)
|
|||||||
//Deinit HAL context
|
//Deinit HAL context
|
||||||
hal->mwdt_dev = NULL;
|
hal->mwdt_dev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32P4
|
||||||
|
extern void rom_wdt_hal_config_stage(wdt_hal_context_t *hal, wdt_stage_t stage, uint32_t timeout, wdt_stage_action_t behavior);
|
||||||
|
|
||||||
|
/* rwdt_ll_config_stage is implemented erroneously in ESP32P4 rom code, TODO: PM-654*/
|
||||||
|
void wdt_hal_config_stage(wdt_hal_context_t *hal, wdt_stage_t stage, uint32_t timeout_ticks, wdt_stage_action_t behavior)
|
||||||
|
{
|
||||||
|
if (hal->inst == WDT_RWDT && stage == WDT_STAGE0) {
|
||||||
|
timeout_ticks = timeout_ticks >> (1 + REG_GET_FIELD(EFUSE_RD_REPEAT_DATA1_REG, EFUSE_WDT_DELAY_SEL));
|
||||||
|
}
|
||||||
|
rom_wdt_hal_config_stage(hal, stage, timeout_ticks, behavior);
|
||||||
|
}
|
||||||
|
#endif // CONFIG_IDF_TARGET_ESP32P4
|
||||||
#endif // ESP_ROM_WDT_INIT_PATCH
|
#endif // ESP_ROM_WDT_INIT_PATCH
|
||||||
|
|
||||||
#endif // CONFIG_HAL_WDT_USE_ROM_IMPL
|
#endif // CONFIG_HAL_WDT_USE_ROM_IMPL
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user