]> granicus.if.org Git - esp-idf/commit
soc/rtc_clk: fix loss of precision in estimation of XTAL frequency
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 8 Jan 2018 15:31:21 +0000 (23:31 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Mon, 8 Jan 2018 15:31:21 +0000 (23:31 +0800)
commit7c584e80b0bcddab7b06f8695f38141a465e251a
tree1cbc492297983af680229cb259b02e4a31d7bd57
parent0cd97cecb2153088f8c4f3448719e47685acaa30
soc/rtc_clk: fix loss of precision in estimation of XTAL frequency

RTC_FAST_CLK_FREQ_APPROX is defined as 8500000, so 0.5MHz part was lost
when dividing by MHZ. Since cal_val is 64-bit the parens can be removed.

With 40MHz XTAL for a nominal ESP32 chip, this fixes estimated XTAL
frequency from 38 to 40MHz.
components/soc/esp32/rtc_clk.c