mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'fix/remove_rwdt_workaround_for_p4_rev3.2' into 'master'
change(esp_rom): remove wdt_hal_config_stage API workaround for P4 ECO7 Closes PM-687 See merge request espressif/esp-idf!47094
This commit is contained in:
@@ -5,8 +5,11 @@
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include "hal/config.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/chip_revision.h"
|
||||
#include "esp_rom_caps.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "hal/mwdt_periph.h"
|
||||
#include "hal/wdt_hal.h"
|
||||
|
||||
@@ -114,13 +117,13 @@ void wdt_hal_deinit(wdt_hal_context_t *hal)
|
||||
hal->mwdt_dev = NULL;
|
||||
}
|
||||
|
||||
#if SOC_IS(ESP32P4)
|
||||
#if SOC_IS(ESP32P4) && (HAL_CONFIG(CHIP_SUPPORT_MIN_REV) <= 301)
|
||||
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) {
|
||||
if ((hal->inst == WDT_RWDT && stage == WDT_STAGE0) && !ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 302)) {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user