drivers: counter: systimer: esp32c2: Fix clock parameters

Fix clock source frequency for systimer and GP timer.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
This commit is contained in:
Raffael Rostagno 2024-10-12 16:51:40 -03:00 committed by David Leach
commit 4be1897519
2 changed files with 18 additions and 7 deletions

View file

@ -21,9 +21,13 @@ config ISR_STACK_SIZE
config ATOMIC_OPERATIONS_C
default y
config XTAL_FREQ_HZ
int
default $(dt_node_int_prop_int,/cpus/cpu@0,xtal-freq)
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 12000000 if SOC_SERIES_ESP32C2
default 16000000 if SOC_SERIES_ESP32C3 || SOC_SERIES_ESP32C6
default 10400000 if XTAL_FREQ_HZ = 26000000
default 16000000 if XTAL_FREQ_HZ = 40000000
config SYS_CLOCK_TICKS_PER_SEC
default 1000