Kconfig RTC_CLK_SRC changes overwritten

hyp3rbolo
Posts: 1
Joined: Tue Jun 15, 2021 7:05 pm

Kconfig RTC_CLK_SRC changes overwritten

Postby hyp3rbolo » Tue Jun 15, 2021 7:16 pm

Hello there, I am somewhat new to esp-idf.

I am currently working on a project where I need to use an external crystal source while in deep sleep mode. Thus, I would like to change the ESP32_RTC_CLK_SRC_EXT_CRYS configuration setting to be true.

My Kconfig.projbuild has:

Code: Select all

menu "Configuration"
    config ESP32_RTC_CLK_SRC_INT_RC
        bool 
        default n
    config ESP32_RTC_CLK_SRC_EXT_CRYS
        bool 
        default y
...
After rebuilding my sdkconfig file shows

Code: Select all

...
#
# Configuration
#
CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y
# CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set
...

I can tell that other values that I am setting in Kconfig such as pin numbers are being changed correctly and show up in sdkconfig as expected, but it seems this clock setting is either being overwritten OR I am missing a step. Any help/advice on how to debug would be greatly appreciated :)

ESP_Sprite
Posts: 9040
Joined: Thu Nov 26, 2015 4:08 am

Re: Kconfig RTC_CLK_SRC changes overwritten

Postby ESP_Sprite » Wed Jun 16, 2021 2:16 am

That's not the way to set a value like that... you're effectively defining a duplicate symbol, I'm surprised Menuconfig doesn't throw an error at you. The way is to use menuconfig (or another config tool) to set this to the correct value. If you don't want to depend on the existence of a sdkconfig in your repo, you can also define it in a file called sdkconfig.defaults.

Who is online

Users browsing this forum: Google [Bot], MicroController and 155 guests