diff --git a/components/driver/ledc.c b/components/driver/ledc.c index 6be0169c8..e084908e8 100644 --- a/components/driver/ledc.c +++ b/components/driver/ledc.c @@ -565,6 +565,9 @@ void IRAM_ATTR ledc_fade_isr(void* arg) uint32_t intr_status = 0; for (speed_mode = 0; speed_mode < LEDC_SPEED_MODE_MAX; speed_mode++) { + if (p_ledc_obj[speed_mode] == NULL) { + continue; + } ledc_hal_get_fade_end_intr_status(&(p_ledc_obj[speed_mode]->ledc_hal), &intr_status); while(intr_status) { ledc_calc_fade_end_channel(&intr_status, &channel); diff --git a/components/driver/test/test_ledc.c b/components/driver/test/test_ledc.c index 4624d03aa..7d7ff27cb 100644 --- a/components/driver/test/test_ledc.c +++ b/components/driver/test/test_ledc.c @@ -400,8 +400,12 @@ TEST_CASE("LEDC timer pause and resume", "[ledc][test_env=UT_T1_LEDC]") TEST_ASSERT_UINT32_WITHIN(5, count, 5000); } -TEST_CASE("LEDC fade with time(logic analyzer)", "[ledc][ignore]") +TEST_CASE("LEDC fade with time(logic analyzer)", "[ledc][test_env=UT_T1_LEDC]") { +#ifdef CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE + return; +#endif + #ifdef CONFIG_IDF_TARGET_ESP32 const ledc_mode_t test_speed_mode = LEDC_HIGH_SPEED_MODE; #elif defined CONFIG_IDF_TARGET_ESP32S2BETA @@ -444,8 +448,12 @@ TEST_CASE("LEDC fade with time(logic analyzer)", "[ledc][ignore]") ledc_fade_func_uninstall(); } -TEST_CASE("LEDC fade with step(logic analyzer)", "[ledc][ignore]") +TEST_CASE("LEDC fade with step(logic analyzer)", "[ledc][test_env=UT_T1_LEDC]") { +#ifdef CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE + return; +#endif + #ifdef CONFIG_IDF_TARGET_ESP32 const ledc_mode_t test_speed_mode = LEDC_HIGH_SPEED_MODE; #elif defined CONFIG_IDF_TARGET_ESP32S2BETA