Skip to content

nordic: grtc: add clear at init #89664

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions drivers/timer/Kconfig.nrf_grtc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ config NRF_GRTC_ALWAYS_ON
help
Always keep the SYSCOUNTER active even if the CPU is in sleep mode.

config NRF_GRTC_CLEAR_AT_INIT
bool "Clear the GRTC on driver init."
help
Clear the GRTC counter on initialization.
Copy link
Contributor

Choose a reason for hiding this comment

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

Since in #89147 (comment) you say that clearing the GRTC is not something we want to do, this should probably mention the consequences of doing so.

Copy link
Member

Choose a reason for hiding this comment

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

@adamkondraciuk could you follow-up on this review comment?


config NRF_GRTC_TIMER_APP_DEFINED_INIT
bool "Application defines GRTC initialization"
help
Expand Down
3 changes: 3 additions & 0 deletions modules/hal_nordic/nrfx/nrfx_kconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@
#ifdef CONFIG_NRF_GRTC_START_SYSCOUNTER
#define NRFX_GRTC_CONFIG_AUTOSTART 1
#endif
#ifdef CONFIG_NRF_GRTC_CLEAR_AT_INIT
#define NRFX_GRTC_CONFIG_CLEAR_AT_INIT 1
#endif

#ifdef CONFIG_NRFX_GPIOTE
#define NRFX_GPIOTE_ENABLED 1
Expand Down