Page 1 of 1

Internal 8 MHz clock as CPU source

Posted: Wed Jul 04, 2018 11:42 am
by michprev
I am trying to use internal 8 MHz clock as source for CPU.
I know that ESP-IDF does not support this option so I used technical reference manual.

Steps performed:

Code: Select all

    extern uint32_t g_ticks_per_us_pro;
    g_ticks_per_us_pro = 40;

    RTC.clk_conf.enb_ck8m = 0;
    RTC.timer1.ck8m_wait = 1;

    RTC.clk_conf.ck8m_dfreq = 172;
    RTC.clk_conf.ck8m_div_sel = 0;

    ROM_ets_delay_us(50);
    
    APB.sysclk_conf.pre_div_cnt = 0;
    RTC.clk_conf.soc_clk_sel = 2;

    g_ticks_per_us_pro = 8;

    while (true)
    {
        ROM_ets_printf("fjeigr\n");
        ROM_ets_delay_us(1000000);
    }
But nothing is getting printed out. CPU is probably frozen. I am also unable to attach GDB.