mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(test): deley some time to ensure gptimer is stopped
This commit is contained in:
@@ -157,13 +157,16 @@ TEST_CASE("analog_comparator_etm_event", "[etm]")
|
||||
esp_rom_delay_us(TEST_TIME_US);
|
||||
gpio_set_level(src_gpio, 1);
|
||||
|
||||
// the gptimer should already stopped, so delay any time here is ok
|
||||
vTaskDelay(10);
|
||||
|
||||
uint64_t cnt_us = 0;
|
||||
TEST_ESP_OK(gptimer_get_raw_count(gptimer, &cnt_us));
|
||||
printf("Count: %" PRIu64 "\n", cnt_us);
|
||||
// gptimer timer should stopped
|
||||
uint64_t cnt_us_again = 0;
|
||||
TEST_ESP_OK(gptimer_get_raw_count(gptimer, &cnt_us_again));
|
||||
TEST_ASSERT(cnt_us_again == cnt_us);
|
||||
TEST_ASSERT_EQUAL(cnt_us, cnt_us_again);
|
||||
|
||||
test_ana_cmpr_deinit_etm(handles);
|
||||
test_ana_cmpr_deinit(cmpr);
|
||||
|
||||
Reference in New Issue
Block a user