Time Stamps On Log Messages Are Wrong

ken2004
Posts: 7
Joined: Thu Jun 15, 2017 1:11 am

Time Stamps On Log Messages Are Wrong

Postby ken2004 » Wed Jul 19, 2017 3:36 am

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 .

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Time Stamps On Log Messages Are Wrong

Postby ESP_igrr » Wed Jul 19, 2017 4:02 am

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.

ken2004
Posts: 7
Joined: Thu Jun 15, 2017 1:11 am

Re: Time Stamps On Log Messages Are Wrong

Postby ken2004 » Thu Jul 20, 2017 4:31 am

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.

Who is online

Users browsing this forum: No registered users and 103 guests