fix(startup): Fix initialize clock error when CPU starts up

This commit is contained in:
Dong Heng
2020-08-07 16:41:28 +08:00
parent 1366f6dd68
commit cb0213c8f9
2 changed files with 2 additions and 2 deletions

View File

@ -394,6 +394,7 @@ void esp_phy_init_clk(void)
#else
const uint32_t uart_baudrate = 74880; // ROM default baudrate
#endif
extern int rtc_init(void);
init_data = esp_phy_get_init_data();
if (init_data == NULL) {
@ -408,6 +409,7 @@ void esp_phy_init_clk(void)
uart_tx_wait_idle(1);
uart_div_modify(1, UART_CLK_FREQ / uart_baudrate);
rtc_init();
rtc_init_clk(buf);
esp_phy_release_init_data(init_data);

View File

@ -42,7 +42,6 @@
extern esp_err_t esp_pthread_init(void);
extern void chip_boot(void);
extern int base_gpio_init(void);
extern int rtc_init(void);
static inline int should_load(uint32_t load_addr)
{
@ -71,7 +70,6 @@ static void user_init_entry(void *param)
for (func = &__init_array_start; func < &__init_array_end; func++)
func[0]();
rtc_init();
esp_phy_init_clk();
assert(base_gpio_init() == 0);