mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-16 04:22:22 +00:00
efuse(es32c2): Supports 26MHz XTAL
This commit is contained in:
committed by
Michael (XIAO Xufeng)
parent
0d5f3081ac
commit
f2adee8b28
@@ -10,6 +10,7 @@
|
||||
#include "hal/assert.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "hal/efuse_ll.h"
|
||||
#include "hal/clk_tree_ll.h"
|
||||
|
||||
#define ESP_EFUSE_BLOCK_ERROR_BITS(error_reg, block) ((error_reg) & (0x0F << (4 * (block))))
|
||||
|
||||
@@ -29,6 +30,11 @@ void efuse_hal_set_timing(uint32_t apb_freq_hz)
|
||||
{
|
||||
(void) apb_freq_hz;
|
||||
efuse_ll_set_pwr_off_num(0x190);
|
||||
int xtal = clk_ll_xtal_load_freq_mhz();
|
||||
HAL_ASSERT(xtal == 40 || xtal == 26);
|
||||
// for the XTAL = 40 MHz we use the default value = 200.
|
||||
// XTAL = 26 MHz the value = 130.
|
||||
efuse_ll_set_tpgm_inactive(xtal * 5);
|
||||
}
|
||||
|
||||
void efuse_hal_read(void)
|
||||
|
||||
Reference in New Issue
Block a user