1. open glitch reset for c3 ECO3;

2. set digital & rtc voltage to about 1.15v which storing in efuse.
This commit is contained in:
chaijie
2021-04-28 21:51:22 +08:00
committed by sly
parent a4a7e7b3e9
commit 6d2bdfc5f5
8 changed files with 186 additions and 55 deletions

View File

@@ -274,10 +274,15 @@ static inline void bootloader_hardware_init(void)
static inline void bootloader_glitch_reset_disable(void)
{
/*
For origin chip & ECO1: only support swt reset;
For ECO2: fix brownout reset bug, support swt & brownout reset;
For ECO3: fix clock glitch reset bug, support all reset, include: swt & brownout & clock glitch reset.
*/
uint8_t chip_version = bootloader_common_get_chip_revision();
if (chip_version < 2) {
REG_SET_FIELD(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_SEL, RTC_CNTL_FIB_SUPER_WDT_RST);
} else {
} else if (chip_version == 2) {
REG_SET_FIELD(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_SEL, RTC_CNTL_FIB_SUPER_WDT_RST | RTC_CNTL_FIB_BOR_RST);
}
}