mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
test(esp_timer): Restrict LAC-timer alarm test to ESP32 only
The "set timer < now_time" test targets the ESP32 LAC timer (magic constant 0xefffffff/80 and a tick-based tolerance) and is not valid on systimer-based targets, where it fails under the ISR-dispatch configs. On master it is already guarded with CONFIG_IDF_TARGET_ESP32; this guard was not backported to v6.1. Add the same guard here.
This commit is contained in:
@@ -875,6 +875,7 @@ TEST_CASE("esp_timer_impl_set_alarm and using start_once do not lead that the Sy
|
|||||||
|
|
||||||
#endif // !defined(CONFIG_FREERTOS_UNICORE) && SOC_DPORT_WORKAROUND
|
#endif // !defined(CONFIG_FREERTOS_UNICORE) && SOC_DPORT_WORKAROUND
|
||||||
|
|
||||||
|
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||||
TEST_CASE("Test case when esp_timer_impl_set_alarm needs set timer < now_time", "[esp_timer]")
|
TEST_CASE("Test case when esp_timer_impl_set_alarm needs set timer < now_time", "[esp_timer]")
|
||||||
{
|
{
|
||||||
esp_timer_impl_advance(50331648); // 0xefffffff/80 = 50331647
|
esp_timer_impl_advance(50331648); // 0xefffffff/80 = 50331647
|
||||||
@@ -892,6 +893,7 @@ TEST_CASE("Test case when esp_timer_impl_set_alarm needs set timer < now_time",
|
|||||||
printf("alarm_reg = 0x%llx, count_reg 0x%llx\n", alarm_reg, count_reg);
|
printf("alarm_reg = 0x%llx, count_reg 0x%llx\n", alarm_reg, count_reg);
|
||||||
TEST_ASSERT(alarm_reg <= (count_reg + offset));
|
TEST_ASSERT(alarm_reg <= (count_reg + offset));
|
||||||
}
|
}
|
||||||
|
#endif // CONFIG_IDF_TARGET_ESP32
|
||||||
|
|
||||||
static void timer_callback5(void* arg)
|
static void timer_callback5(void* arg)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user