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

arch/esp32s3_wdt: ESP32-S3 WDT1 clock init #15434

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nuttxs
Copy link
Contributor

@nuttxs nuttxs commented Jan 6, 2025

Summary

arch/esp32s3_wdt: ESP32-S3 WDT & TIMER adds clock enable and reset operations in the initial section

Impact

Only esp32s3 TIMERGROUP0 & 1

Testing

Enable esp32s3 wdt & timer

@github-actions github-actions bot added Arch: xtensa Issues related to the Xtensa architecture Size: XS The size of the change in this PR is very small labels Jan 6, 2025
@tmedicci
Copy link
Contributor

tmedicci commented Jan 6, 2025

Hi @nuttxs , we have been testing watchdog operation on our internal CI without any issues. Can you please describe what problem you are trying to solve?

@eren-terzioglu , can you follow this discussion, please?

and reset operations in the initial section
@nuttxs
Copy link
Contributor Author

nuttxs commented Jan 7, 2025

Hi @nuttxs , we have been testing watchdog operation on our internal CI without any issues. Can you please describe what problem you are trying to solve?

@eren-terzioglu , can you follow this discussion, please?
Hi @tmedicci
This commit refers to PR#5616, “Enable Timer Groups clocks on timer initialization.” In our internal test cases, when using WDT1, we occasionally encounter a crash similar to the following:
image
The refined PR has been updated; please help review. Thank you.

@nuttxs nuttxs force-pushed the feature/esp32s3_wdt1_clock_enable branch from 74b0916 to 0945bc0 Compare January 7, 2025 02:52
@github-actions github-actions bot added Size: S The size of the change in this PR is small and removed Size: XS The size of the change in this PR is very small labels Jan 7, 2025
@eren-terzioglu
Copy link
Contributor

Hi @nuttxs , we have been testing watchdog operation on our internal CI without any issues. Can you please describe what problem you are trying to solve?
@eren-terzioglu , can you follow this discussion, please?
Hi @tmedicci
This commit refers to PR#5616, “Enable Timer Groups clocks on timer initialization.” In our internal test cases, when using WDT1, we occasionally encounter a crash similar to the following:
image
The refined PR has been updated; please help review. Thank you.

Hi,

Could you give some information about your tests to reproduce the issue? We can test it for other chips to have better support about WDTs.

@nuttxs
Copy link
Contributor Author

nuttxs commented Jan 8, 2025

Could you give some information about your tests to reproduce the issue? We can test it for other chips to have better support about WDTs.

Hi @eren-terzioglu
We internally tested a part by referring to the timer implementation, enabling both wdt0 & wdt1 and setting them to bind to different CPUs. One is set to trigger at a slightly earlier time point to generate an interrupt, and the other is set to trigger at a more delayed time point to produce a WDT reset. The issue can be reproduced with the esp32s3-devkit:timer, and the attachment (
timer.log
)contains the complete log.

@eren-terzioglu
Copy link
Contributor

Could you give some information about your tests to reproduce the issue? We can test it for other chips to have better support about WDTs.

Hi @eren-terzioglu We internally tested a part by referring to the timer implementation, enabling both wdt0 & wdt1 and setting them to bind to different CPUs. One is set to trigger at a slightly earlier time point to generate an interrupt, and the other is set to trigger at a more delayed time point to produce a WDT reset. The issue can be reproduced with the esp32s3-devkit:timer, and the attachment ( timer.log )contains the complete log.

I will test it as soon as possible, thanks for informing.

@eren-terzioglu
Copy link
Contributor

Hello,

I tested but couldn't reproduce it properly. I used esp32s3-devkit:timer configuration with enabling ESP32S3_MWDT0 and ESP32S3_MWDT1 and then run timer -d /dev/timer1 for multiple times but seems it is working fine.
Also you are trying to enable TIMER_GROUP1 peripheral which should be enabled for CONFIG_ESP32S3_TIMER2 and CONFIG_ESP32S3_TIMER3 according to technical reference manual

Last but not least, seems the code you are doing was already implemented there. The code in esp32s3_tim.c is enabling TIMER_GROUP1 in TIMER_GROUP0 peripheral timer which should not make sense in action (in theory).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: xtensa Issues related to the Xtensa architecture Size: S The size of the change in this PR is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants