mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-07 17:08:49 +00:00
esp32s3: Remove APB frequency RTC register
Usage of this register changed between ESP32-S3 beta2 and the final chip.
This commit is contained in:
@@ -22,6 +22,13 @@
|
||||
|
||||
static const char *TAG = "fpga";
|
||||
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
#include "esp32/rom/rtc.h"
|
||||
#endif
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32S2
|
||||
#include "esp32s2/rom/rtc.h"
|
||||
#endif
|
||||
|
||||
extern void ets_update_cpu_frequency(uint32_t ticks_per_us);
|
||||
|
||||
static void s_warn(void)
|
||||
@@ -41,7 +48,9 @@ void bootloader_clock_configure(void)
|
||||
uint32_t apb_freq_hz = 40000000;
|
||||
#endif // CONFIG_IDF_TARGET_ESP32S2
|
||||
ets_update_cpu_frequency(apb_freq_hz / 1000000);
|
||||
REG_WRITE(RTC_CNTL_STORE5_REG, (apb_freq_hz >> 12) | ((apb_freq_hz >> 12) << 16));
|
||||
#ifdef RTC_APB_FREQ_REG
|
||||
REG_WRITE(RTC_APB_FREQ_REG, (apb_freq_hz >> 12) | ((apb_freq_hz >> 12) << 16));
|
||||
#endif
|
||||
REG_WRITE(RTC_CNTL_STORE4_REG, (xtal_freq_mhz) | ((xtal_freq_mhz) << 16));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user