Page 1 of 1

Time Stamps On Log Messages Are Wrong

Posted: Wed Jul 19, 2017 3:36 am
by ken2004
The time stamps on log messages increase too fast during boot. This error remains as an offset in time stamps on log messages after boot. The error occurs because the wrong CPU frequency is used as a clock divider during second stage boot. For more detail see https://github.com/espressif/esp-idf/is ... -316258237 .

In my view, rather than correcting the CPU frequency value, a better solution is to use the REF_TICK clock that maintains a constant frequency regardless of CPU frequency as the clock source for log message time stamps. See 3.2.4.2 REF_TICK Source in https://espressif.com/sites/default/fil ... ual_en.pdf .

Re: Time Stamps On Log Messages Are Wrong

Posted: Wed Jul 19, 2017 4:02 am
by ESP_igrr
ken2004 wrote:use the REF_TICK clock that maintains a constant frequency regardless of CPU frequency as the clock source for log message time stamps
Unfortunately, REF_TICK can be used as clock source only by 3 peripherals: UART, RMT, and LED PWM. We would need to connect it to a timer in order to produce timestamps.

Re: Time Stamps On Log Messages Are Wrong

Posted: Thu Jul 20, 2017 4:31 am
by ken2004
ESP_igrr wrote: Unfortunately, REF_TICK can be used as clock source only by 3 peripherals: UART, RMT, and LED PWM. We would need to connect it to a timer in order to produce timestamps.
Thanks for the explanation as to why the suggestion will not work. Hopefully then, the second stage boot loader will be modified to use the correct CPU frequency as a divider.