Skip to content

Commit 30c6b84

Browse files
committed
Merge branch 'fix/anacmpr_etm_test_v5.5' into 'release/v5.5'
fix(test): deley some time to ensure gptimer is stopped (v5.5) See merge request espressif/esp-idf!42892
2 parents db87284 + 1cfe6ab commit 30c6b84

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/esp_driver_ana_cmpr/test_apps/analog_comparator/main/test_ana_cmpr_etm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,16 @@ TEST_CASE("ana_cmpr etm event", "[ana_cmpr][etm]")
140140
esp_rom_delay_us(TEST_TIME_US);
141141
gpio_set_level(src_gpio, 1);
142142

143+
// the gptimer should already stopped, so delay any time here is ok
144+
vTaskDelay(10);
145+
143146
uint64_t cnt_us = 0;
144147
TEST_ESP_OK(gptimer_get_raw_count(gptimer, &cnt_us));
145148
printf("Count: %" PRIu64 "\n", cnt_us);
146149
// gptimer timer should stopped
147150
uint64_t cnt_us_again = 0;
148151
TEST_ESP_OK(gptimer_get_raw_count(gptimer, &cnt_us_again));
149-
TEST_ASSERT(cnt_us_again == cnt_us);
152+
TEST_ASSERT_EQUAL(cnt_us, cnt_us_again);
150153

151154
test_ana_cmpr_deinit_etm(handles);
152155
test_ana_cmpr_deinit(cmpr);

0 commit comments

Comments
 (0)