From c5b1b57b09ba912e19be20686b7349e4817678f9 Mon Sep 17 00:00:00 2001 From: KonstantinKondrashov Date: Mon, 30 Sep 2019 19:04:38 +0800 Subject: [PATCH] esp32: Fix UT - Check pre-read workaround DPORT and Hi-interrupt --- components/esp32/test/test_dport.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/esp32/test/test_dport.c b/components/esp32/test/test_dport.c index 013f546d9..61ce26ed8 100644 --- a/components/esp32/test/test_dport.c +++ b/components/esp32/test/test_dport.c @@ -390,8 +390,10 @@ static void accessDPORT2(void *pvParameters) TEST_ESP_OK(esp_intr_alloc(ETS_INTERNAL_TIMER2_INTR_SOURCE, ESP_INTR_FLAG_LEVEL5 | ESP_INTR_FLAG_IRAM, NULL, NULL, &inth)); + XTHAL_SET_CCOMPARE(2, XTHAL_GET_CCOUNT() + 21); + int sync = 0; while (exit_flag == false) { - XTHAL_SET_CCOMPARE(2, XTHAL_GET_CCOUNT() + 21); + ets_delay_us(++sync % 10); for (int i = 0; i < 200; ++i) { if (DPORT_REG_READ(DPORT_DATE_REG) != DPORT_REG_READ(DPORT_DATE_REG)) { dport_test_result = false;