5

According to the manufacturer's link below, the default RTC timekeeping in the ESP32 is supposedly based onInternal 150 kHz RC oscillator.

Apparently, there is another option calledInternal 8.5 MHz oscillator, divided by 256 (~33 kHz) that has better stability without needing an external crystal. That link goes on to say that

To modify the RTC clock source, set CONFIG_RTC_CLK_SRC in the project configuration.

All good information but NO EXAMPLES given. Can anyone point me to an example showing

  1. how I can prove what the current clock source is, and
  2. how to set actually it?

https://docs.espressif.com/.../system/system_time.html

Rohit Gupta's user avatar
Rohit Gupta
6342 gold badges6 silver badges21 bronze badges
askedApr 11, 2023 at 3:06
Randy's user avatar
6
  • The default is 150kHz RC, seedocs.espressif.com/projects/esp-idf/en/latest/esp32/…CommentedApr 11, 2023 at 3:57
  • @hcheung Please don't answer questions with links that you have not read. I know all about the defaults and other options. The document does not show how to go about changing it.CommentedApr 12, 2023 at 5:22
  • Please don't assumed that I didn't read the document just because you don't understand it. The document is clearly said that "To modify the RTC clock source, set CONFIG_RTC_CLK_SRC in project configuration", it further provide the link to CONFIG_RTC_CLK_SRC page which again clearly indicated that the configuration is part of Component config > Hardware Settings > RTC Clock Config which you can find ithere.CommentedApr 12, 2023 at 6:14
  • In summary, you are presuming that it can be dynamically change via programming, but it is not, you need to Edit sdkconfig.defaults file, setCONFIG_ESP32_RTC_CLK_SRC_INT_8MD256=y and run idf.py to build it.CommentedApr 12, 2023 at 6:26
  • 1
    @hcheung my apologies then. Too many people post a link assuming it answer the OP question. The is no "sdkconfig.defaults" on my system,. There plenty of sdkconfig.h for each board, and there is one file "sdkconfig" file with no extender. The .h files indeed have macros defining those options. I did make the change you suggested in that file, also commenting out the default one. But I do not have an idf.py file, and would not know how to run it. Is there a document that offers all the steps and where to get the needed tools? Thanks in advance.CommentedApr 12, 2023 at 14:29

0

Know someone who can answer? Share a link to thisquestion viaemail,Twitter, orFacebook.

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.