I am a new in the ESP32 world. My goal is to understnad the basics and I would like to use only the ESP-IDF API.
I have been read the LED Controller part, and I would like to use the end interrupt of a fade effect.
Channel is configured according to the demo
Code: Select all
ledc_fade_func_install(0);
ledc_isr_register(&ledc_isr_fnc, NULL, ESP_INTR_FLAG_IRAM , NULL);
Code: Select all
void IRAM_ATTR ledc_isr_fnc( void * arg) {
printf("OMG, it is works \n");
}
Code: Select all
printf("1. LEDC fade up to duty = %d\n", LEDC_TEST_DUTY);
for (ch = 0; ch < LEDC_TEST_CH_NUM; ch++) {
ledc_set_fade_with_time(ledc_channel[ch].speed_mode,
ledc_channel[ch].channel, LEDC_TEST_DUTY, LEDC_TEST_FADE_TIME);
ledc_fade_start(ledc_channel[ch].speed_mode,
ledc_channel[ch].channel, LEDC_FADE_NO_WAIT);
}
I got a nice error message:
abort() was called at PC 0x40081fb9 on core 0
Unfortunatelly I have not found too much info what I have to do for working.
Please help to me.