feat(gptimer): make start and stop function idempotent

Closes https://github.com/espressif/esp-idf/issues/12325
Closes https://github.com/espressif/esp-idf/issues/13486
This commit is contained in:
morris
2025-02-14 16:36:49 +08:00
parent af429c89a2
commit 509b9d9a54
7 changed files with 110 additions and 83 deletions

View File

@@ -299,7 +299,7 @@ TEST_ALARM_CALLBACK_ATTR static bool test_gptimer_alarm_normal_callback(gptimer_
* Also should account for the inaccuracy of the systick during DFS.
*/
#if CONFIG_PM_ENABLE
#define GPTIMER_ONE_SHOT_ALARM_COUNT_DELTA 15000
#define GPTIMER_ONE_SHOT_ALARM_COUNT_DELTA 50000
#else
#define GPTIMER_ONE_SHOT_ALARM_COUNT_DELTA 1000
#endif // CONFIG_PM_ENABLE

View File

@@ -23,7 +23,7 @@ static void IRAM_ATTR test_delay_post_cache_disable(void *args)
esp_rom_delay_us(1000);
}
TEST_CASE("gptimer_interrupt_iram_safe", "[gptimer]")
TEST_CASE("gptimer works with cache disabled", "[gptimer]")
{
gptimer_handle_t gptimer = NULL;
gptimer_config_t timer_config = {