From d694f3c8dabf000ecaab89161e35aa3c6bac9190 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 26 Sep 2024 11:31:47 +0200 Subject: [PATCH] Fix RTC frequency for now --- dts/lagarto_ox.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dts/lagarto_ox.h b/dts/lagarto_ox.h index 3491ebc..1d5df29 100644 --- a/dts/lagarto_ox.h +++ b/dts/lagarto_ox.h @@ -3,7 +3,12 @@ /* The RTC timer is clocked at the CPU frequency / 1525, so * around 32786.88 Hz */ -#define RTC_CLOCK_FREQUENCY 32786 +//#define RTC_CLOCK_FREQUENCY 32786 + +/* FIXME: The real RTC frequency is around half that, as the divider was wrongly + * configured. So for now lets use the real frequency: + * 50e6 / (1525*2) = 16393.44262295082 -> 16393 Hz */ +#define RTC_CLOCK_FREQUENCY 16393 #define UART_SPEED 115200 #define UART0_ADDR 0x40001000