fix(rom): fixed systimer hal implementation from ROM always being used on P4

This commit is contained in:
Marius Vikhammer
2025-11-26 11:40:01 +05:30
committed by Sudeep Mohanty
parent dde1b3d791
commit 7a0173dfac
3 changed files with 45 additions and 37 deletions
@@ -0,0 +1,28 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/***************************************
Group hal_systimer
***************************************/
/* Functions */
/* The following ROM functions are commented out because they're patched in the esp_rom_systimer.c */
/* systimer_hal_init = 0x4000039c; */
/* systimer_hal_deinit = 0x400003a0; */
systimer_hal_set_tick_rate_ops = 0x400003a4;
systimer_hal_get_counter_value = 0x400003a8;
systimer_hal_get_time = 0x400003ac;
systimer_hal_set_alarm_target = 0x400003b0;
systimer_hal_set_alarm_period = 0x400003b4;
systimer_hal_get_alarm_value = 0x400003b8;
systimer_hal_enable_alarm_int = 0x400003bc;
systimer_hal_on_apb_freq_update = 0x400003c0;
systimer_hal_counter_value_advance = 0x400003c4;
systimer_hal_enable_counter = 0x400003c8;
systimer_hal_select_alarm_mode = 0x400003cc;
systimer_hal_connect_alarm_counter = 0x400003d0;
systimer_hal_counter_can_stall_by_cpu = 0x400003d4;
@@ -9,18 +9,20 @@
***************************************/
/* Functions */
systimer_hal_init = 0x4000039c;
systimer_hal_deinit = 0x400003a0;
systimer_hal_set_tick_rate_ops = 0x400003a4;
systimer_hal_get_counter_value = 0x400003a8;
systimer_hal_get_time = 0x400003ac;
systimer_hal_set_alarm_target = 0x400003b0;
systimer_hal_set_alarm_period = 0x400003b4;
systimer_hal_get_alarm_value = 0x400003b8;
systimer_hal_enable_alarm_int = 0x400003bc;
systimer_hal_on_apb_freq_update = 0x400003c0;
systimer_hal_counter_value_advance = 0x400003c4;
systimer_hal_enable_counter = 0x400003c8;
systimer_hal_select_alarm_mode = 0x400003cc;
systimer_hal_connect_alarm_counter = 0x400003d0;
systimer_hal_counter_can_stall_by_cpu = 0x400003d4;
/* The following ROM functions are commented out because they're patched in the esp_rom_systimer.c */
/* systimer_hal_init = 0x4000036c; */
/* systimer_hal_deinit = 0x40000370; */
systimer_hal_set_tick_rate_ops = 0x40000374;
systimer_hal_get_counter_value = 0x40000378;
systimer_hal_get_time = 0x4000037c;
systimer_hal_set_alarm_target = 0x40000380;
systimer_hal_set_alarm_period = 0x40000384;
systimer_hal_get_alarm_value = 0x40000388;
systimer_hal_enable_alarm_int = 0x4000038c;
systimer_hal_on_apb_freq_update = 0x40000390;
systimer_hal_counter_value_advance = 0x40000394;
systimer_hal_enable_counter = 0x40000398;
systimer_hal_select_alarm_mode = 0x4000039c;
systimer_hal_connect_alarm_counter = 0x400003a0;
systimer_hal_counter_can_stall_by_cpu = 0x400003a4;
@@ -170,28 +170,6 @@ rom_spiflash_legacy_data = 0x4ffbffe8;
g_flash_guard_ops = 0x4ffbfff0;
/***************************************
Group hal_systimer
***************************************/
/* Functions */
systimer_hal_init = 0x4fc00228;
systimer_hal_deinit = 0x4fc0022c;
systimer_hal_set_tick_rate_ops = 0x4fc00230;
systimer_hal_get_counter_value = 0x4fc00234;
systimer_hal_get_time = 0x4fc00238;
systimer_hal_set_alarm_target = 0x4fc0023c;
systimer_hal_set_alarm_period = 0x4fc00240;
systimer_hal_get_alarm_value = 0x4fc00244;
systimer_hal_enable_alarm_int = 0x4fc00248;
systimer_hal_on_apb_freq_update = 0x4fc0024c;
systimer_hal_counter_value_advance = 0x4fc00250;
systimer_hal_enable_counter = 0x4fc00254;
systimer_hal_select_alarm_mode = 0x4fc00258;
systimer_hal_connect_alarm_counter = 0x4fc0025c;
systimer_hal_counter_can_stall_by_cpu = 0x4fc00260;
/***************************************
Group cache
***************************************/