mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-18 23:54:39 +00:00
efuse: Validates data after burning and re-burnes it if necessary
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ESP_EFUSE_BLOCK_ERROR_BITS(error_reg, block) ((error_reg) & (0x0F << (4 * (block))))
|
||||
|
||||
// Always inline these functions even no gcc optimization is applied.
|
||||
|
||||
/******************* eFuse fields *************************/
|
||||
@@ -151,6 +153,15 @@ __attribute__((always_inline)) static inline uint32_t efuse_ll_get_adc2_tp_high(
|
||||
return REG_GET_FIELD(EFUSE_BLK3_RDATA3_REG, EFUSE_RD_ADC2_TP_HIGH);
|
||||
}
|
||||
|
||||
__attribute__((always_inline)) static inline bool efuse_ll_get_dec_warnings(unsigned block)
|
||||
{
|
||||
if (block == 0 || block > 4) {
|
||||
return false;
|
||||
}
|
||||
uint32_t error_reg = REG_GET_FIELD(EFUSE_DEC_STATUS_REG, EFUSE_DEC_WARNINGS);
|
||||
return ESP_EFUSE_BLOCK_ERROR_BITS(error_reg, block - 1) != 0;
|
||||
}
|
||||
|
||||
/******************* eFuse control functions *************************/
|
||||
|
||||
__attribute__((always_inline)) static inline bool efuse_ll_get_cmd(void)
|
||||
|
Reference in New Issue
Block a user