Internal 8 MHz clock as CPU source

michprev
Posts: 92
Joined: Fri Aug 04, 2017 8:57 pm

Internal 8 MHz clock as CPU source

Postby michprev » Wed Jul 04, 2018 11:42 am

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.

Who is online

Users browsing this forum: No registered users and 106 guests