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

cpu/esp32: use ESP-IDF timer HAL for system timer and watchdog #18267

Merged
merged 4 commits into from
Jul 10, 2022

Conversation

gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Jun 27, 2022

Contribution description

This PR is a split-off from PR #17841. It contains the changes to use the ESP-IDF timer HAL for the system timer and the watchdog.

Testing procedure

  1. Green CI
  2. Compile and check any simple test app, for example:
    BOARD=esp32-wroom-32 make -j8 -C tests/shell flash term
    

Issues/PRs references

Split-off from PR #17841

@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports Platform: ESP Platform: This PR/issue effects ESP-based platforms labels Jun 27, 2022
@gschorcht gschorcht requested a review from benpicco June 27, 2022 15:33
@gschorcht gschorcht changed the title cpu/esp32: use ESP-IDF timer HAL cpu/esp32: use ESP-IDF timer HAL for system timer and watchdog Jun 27, 2022
@gschorcht gschorcht added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jun 27, 2022
__func__, TIMERG0.wdt_config0.val, TIMERG0.wdt_config1.val,
TIMERG0.wdt_config2);
/* initialize and disable boot watchdogs MWDT and RWDT */
wdt_hal_init(&mwdt, WDT_MWDT0, 80, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 80? - better keep the previous comment.

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a rebase, just re-add the comment explaining the watchdog prescaler choice

@gschorcht gschorcht force-pushed the cpu/esp32/periph_hal_esp32_timer branch from 457af42 to ef7c83b Compare June 28, 2022 15:20
@gschorcht
Copy link
Contributor Author

Needs a rebase, just re-add the comment explaining the watchdog prescaler choice

Rebased and comment added. May I squash?

@benpicco
Copy link
Contributor

Sure, squash away!

@gschorcht gschorcht force-pushed the cpu/esp32/periph_hal_esp32_timer branch from b93ef91 to 79638e3 Compare June 28, 2022 15:26
@benpicco
Copy link
Contributor

Needs a rebase, but if everything still works with the latest changes feel free to hit the merge button - I'll be back in 1½ weeks.

@gschorcht gschorcht force-pushed the cpu/esp32/periph_hal_esp32_timer branch from 79638e3 to ae48cfc Compare June 29, 2022 06:37
@gschorcht
Copy link
Contributor Author

Since the compilation in Murdock failed only because of the hash problem, which definitely has nothing to do with this PR, I re-run Murdock without compilation test.

-- running on worker riotbuild-7 thread 1, build number 155248.
make: Entering directory '/tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/tests/pkg_utensor'
rm -rf /tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/build/pkg-build/utensor
make: Leaving directory '/tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/tests/pkg_utensor'
make: Entering directory '/tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/tests/pkg_utensor'
git-cache: cloning from cache. tag=commitb22aa5cbc1ef1b3dd42a899b393a9b999afd1305-47597
Building application "tests_pkg_utensor" for "nucleo-l552ze-q" with MCU "stm32".

git-cache: cloning from cache. tag=commitfcf61cd086e02c7a1cf7535ffe30622d1f5d36aa-47536
sha1sum /tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/tests/pkg_utensor/tests/01-run.py /tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/build/tests_pkg_utensor.bin > /tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/build/test-input-hash.sha1
   text	   data	    bss	    dec	    hex	filename
 174352	    140	   2404	 176896	  2b300	/tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/build/tests_pkg_utensor.elf
make: Leaving directory '/tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/tests/pkg_utensor'
make: Entering directory '/tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/tests/pkg_utensor'
rm -rf /tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/build/pkg-build/utensor
make: Leaving directory '/tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/tests/pkg_utensor'
make: Entering directory '/tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/tests/pkg_utensor'
Building application "tests_pkg_utensor" for "nucleo-l552ze-q" with MCU "stm32".

git-cache: cloning from cache. tag=commitb22aa5cbc1ef1b3dd42a899b393a9b999afd1305-51254
git-cache: cloning from cache. tag=commitfcf61cd086e02c7a1cf7535ffe30622d1f5d36aa-51195
sha1sum /tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/tests/pkg_utensor/tests/01-run.py /tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/build/tests_pkg_utensor.bin > /tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/build/test-input-hash.sha1
   text	   data	    bss	    dec	    hex	filename
 174064	    140	   2404	 176608	  2b1e0	/tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/build/tests_pkg_utensor.elf
make: Leaving directory '/tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/tests/pkg_utensor'
Hashes of binaries with and without Kconfig mismatch for tests/pkg_utensor with nucleo-l552ze-q
Please check that all used modules are modelled in Kconfig and enabled
rm -rf /tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/build/pkg-build/utensor
rm -rf /tmp/dwq.0.0838336874055341/132c09bf2b686c490f044e15a1e18fe3/build/pkg-build/utensor
{"build/": 112}

@gschorcht gschorcht added CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jun 30, 2022
@benpicco benpicco merged commit ba37e93 into RIOT-OS:master Jul 10, 2022
@gschorcht
Copy link
Contributor Author

@benpicco Thanks for reviewing and mergindg.

@gschorcht gschorcht deleted the cpu/esp32/periph_hal_esp32_timer branch July 16, 2022 14:45
@chrysn chrysn added this to the Release 2022.07 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants