Răsfoiți Sursa

esp_rom: patch systimer_hal_init/deinit for esp32h2 rom

jiangguangming 3 ani în urmă
părinte
comite
7db7269a92

+ 4 - 2
components/esp_rom/esp32h2/ld/esp32h2.rom.ld

@@ -183,8 +183,10 @@ wdt_hal_is_enabled = 0x400003b4;
  ***************************************/
 
 /* Functions */
-systimer_hal_init = 0x400003b8;
-systimer_hal_deinit = 0x400003bc;
+/* The following ROM functions are commented out because they're patched in the esp_rom_systimer.c */
+/* systimer_hal_init = 0x400003b8; */
+/* systimer_hal_deinit = 0x400003bc; */
+
 systimer_hal_set_tick_rate_ops = 0x400003c0;
 systimer_hal_get_counter_value = 0x400003c4;
 systimer_hal_get_time = 0x400003c8;

+ 1 - 1
components/esp_rom/patches/esp_rom_systimer.c

@@ -64,7 +64,7 @@ void systimer_hal_counter_value_advance(systimer_hal_context_t *hal, uint32_t co
 }
 #endif // CONFIG_IDF_TARGET_ESP32C2
 
-#if CONFIG_IDF_TARGET_ESP32C6
+#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2
 void systimer_hal_init(systimer_hal_context_t *hal)
 {
     hal->dev = &SYSTIMER;