mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
systimer: support etm event
This commit is contained in:
@@ -192,8 +192,10 @@ wdt_hal_is_enabled = 0x400003bc;
|
||||
***************************************/
|
||||
|
||||
/* Functions */
|
||||
systimer_hal_init = 0x400003c0;
|
||||
systimer_hal_deinit = 0x400003c4;
|
||||
/* The following ROM functions are commented out because they're patched in the esp_rom_systimer.c */
|
||||
/* systimer_hal_init = 0x400003c0; */
|
||||
/* systimer_hal_deinit = 0x400003c4; */
|
||||
|
||||
systimer_hal_set_tick_rate_ops = 0x400003c8;
|
||||
systimer_hal_get_counter_value = 0x400003cc;
|
||||
systimer_hal_get_time = 0x400003d0;
|
||||
|
||||
@@ -64,4 +64,20 @@ void systimer_hal_counter_value_advance(systimer_hal_context_t *hal, uint32_t co
|
||||
}
|
||||
#endif // CONFIG_IDF_TARGET_ESP32C2
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32C6
|
||||
void systimer_hal_init(systimer_hal_context_t *hal)
|
||||
{
|
||||
hal->dev = &SYSTIMER;
|
||||
systimer_ll_enable_clock(hal->dev, true);
|
||||
systimer_ll_enable_etm(&SYSTIMER, true);
|
||||
}
|
||||
|
||||
void systimer_hal_deinit(systimer_hal_context_t *hal)
|
||||
{
|
||||
systimer_ll_enable_etm(&SYSTIMER, false);
|
||||
systimer_ll_enable_clock(hal->dev, false);
|
||||
hal->dev = NULL;
|
||||
}
|
||||
#endif // CONFIG_IDF_TARGET_ESP32C6
|
||||
|
||||
#endif // CONFIG_HAL_SYSTIMER_USE_ROM_IMPL
|
||||
|
||||
Reference in New Issue
Block a user