ESP32C3: auto adjust voltage dbias storing in efuse and open glitch reset for ECO3

1. add some efuse api to get rtc & digital voltage
2. set dig_rtc voltage to a fix value storing in efuse no mater which cpu frequency
3. modify hardware code in bootloader to fit all c3 ECO3 version
This commit is contained in:
chaijie
2021-04-28 10:32:08 +08:00
committed by sly
parent f975329429
commit eea76d14bb
8 changed files with 187 additions and 57 deletions

View File

@@ -17,7 +17,7 @@
#include <assert.h>
#include "esp_efuse_table.h"
// md5_digest_table f9a84eb22f94a7bc083b4c6817a33a59
// md5_digest_table 61baa79d296df996c838bc2adc1837e5
// This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY.
// If you want to change some fields, you need to change esp_efuse_table.csv file
// then run `efuse_common_table` or `efuse_custom_table` command it will generate this file.
@@ -484,6 +484,30 @@ static const esp_efuse_desc_t SYS_DATA_PART2[] = {
{EFUSE_BLK10, 0, 256}, // System configuration,
};
static const esp_efuse_desc_t K_RTC_LDO[] = {
{EFUSE_BLK1, 135, 7}, // BLOCK1 K_RTC_LDO,
};
static const esp_efuse_desc_t K_DIG_LDO[] = {
{EFUSE_BLK1, 142, 7}, // BLOCK1 K_DIG_LDO,
};
static const esp_efuse_desc_t V_RTC_DBIAS20[] = {
{EFUSE_BLK1, 149, 8}, // BLOCK1 voltage of rtc dbias20,
};
static const esp_efuse_desc_t V_DIG_DBIAS20[] = {
{EFUSE_BLK1, 157, 8}, // BLOCK1 voltage of digital dbias20,
};
static const esp_efuse_desc_t DIG_DBIAS_HVT[] = {
{EFUSE_BLK1, 165, 5}, // BLOCK1 digital dbias when hvt,
};
static const esp_efuse_desc_t THRES_HVT[] = {
{EFUSE_BLK1, 170, 10}, // BLOCK1 pvt threshold when hvt,
};
@@ -1062,3 +1086,33 @@ const esp_efuse_desc_t* ESP_EFUSE_SYS_DATA_PART2[] = {
&SYS_DATA_PART2[0], // System configuration
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_K_RTC_LDO[] = {
&K_RTC_LDO[0], // BLOCK1 K_RTC_LDO
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_K_DIG_LDO[] = {
&K_DIG_LDO[0], // BLOCK1 K_DIG_LDO
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_V_RTC_DBIAS20[] = {
&V_RTC_DBIAS20[0], // BLOCK1 voltage of rtc dbias20
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_V_DIG_DBIAS20[] = {
&V_DIG_DBIAS20[0], // BLOCK1 voltage of digital dbias20
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_DIG_DBIAS_HVT[] = {
&DIG_DBIAS_HVT[0], // BLOCK1 digital dbias when hvt
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_THRES_HVT[] = {
&THRES_HVT[0], // BLOCK1 pvt threshold when hvt
NULL
};