Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esp32-C6 API for disabling RTC watchdog (IDFGH-11913) #12995

Closed
3 tasks done
txf- opened this issue Jan 17, 2024 · 2 comments
Closed
3 tasks done

Esp32-C6 API for disabling RTC watchdog (IDFGH-11913) #12995

txf- opened this issue Jan 17, 2024 · 2 comments
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally

Comments

@txf-
Copy link

txf- commented Jan 17, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

As per the C6 feature support thread, I am now posting this as a general issue and whilst in my case it applies to C6, I think it may also be a problem on anything other than the ESP32 and S2.

image

On menuconfig, there is is option to allow disabling the watchdog in user code. I can't actually find any documentation related to this for anything other than the above mentioned microcontrollers.

As far as I can tell there rtc_wdt_disable() and rtc_wdt_feed(), do not apply to anything but the ESP32 and ESP32-S2 as those functions seem to be guarded by ifdefs for those devices.

Do equivalent functions exist for other devices?

I am currently using the 5.2 release branch

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 17, 2024
@github-actions github-actions bot changed the title Esp32-C6 API for disabling RTC watchdog Esp32-C6 API for disabling RTC watchdog (IDFGH-11913) Jan 17, 2024
@KonstantinKondrashov
Copy link
Collaborator

Hi @txf-!
Thanks for noticing that.
Yes, these functions do exist only for ESP32 and S2. The API is obsolete so you need to use a new one (wdt_hal) which is available for all chips.

    if(CONFIG_IDF_TARGET_ESP32 OR CONFIG_IDF_TARGET_ESP32S2)
        list(APPEND srcs "rtc_wdt.c")
    endif()

I will update the Kconfig description to mention to use these APIs instead.

wdt_hal_context_t rtc_wdt_ctx = RWDT_HAL_CONTEXT_DEFAULT();
wdt_hal_write_protect_disable(&rtc_wdt_ctx);
wdt_hal_disable(&rtc_wdt_ctx);
wdt_hal_write_protect_enable(&rtc_wdt_ctx);

There is a comment about this option in the doc - https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/bootloader.html#watchdog

@txf-
Copy link
Author

txf- commented Jan 18, 2024

Thanks, comment in the doc also needs to be changed, because it is talking about the same functions as the Kconfig.

Also in the docs , the section in System API -> watchdogs. Has no mention of this API, it doesn't really talk about the RTC watchdog.

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: In Progress Work is in progress labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants