LEDC interrupt for fade --> how it is working?
Posted: Sun Oct 29, 2017 4:19 pm
Hello,
I tried to create an interrupt function to check the fade action done.
where the ledc_isr_fnc looks like only for cheking it is done:
I got a nice error in the log:
I (730) cpu_start: Starting scheduler on APP CPU.
1. LEDC fade up to duty = 4000
abort() was called at PC 0x40081fb9 on core 0
Backtrace: 0x40085fd8:0x3ffb0500 0x400860d7:0x3ffb0520 0x40081fb9:0x3ffb0540 0x400820d9:0x3ffb0570 0x400d215e:0x3ffb0590 0x400d21b9:0x3ffb05d0 0x40081e06:0x3ffb05f0 0x40081922:0x3ffb0610
Rebooting...
ets Jun 8 2016 00:22:57
I hope somebody is able to help to me to debug where I amde the mistake. I tried many ways, I think I do not understand the basic concept, I am in the beggining of the learning curve...
Thank you very much in advance!
I tried to create an interrupt function to check the fade action done.
Code: Select all
ledc_fade_func_install(0);
ledc_isr_register(&ledc_isr_fnc, NULL, ESP_INTR_FLAG_IRAM , NULL);
while (1) {
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);
}
vTaskDelay(LEDC_TEST_FADE_TIME / portTICK_PERIOD_MS);
}
Code: Select all
void IRAM_ATTR ledc_isr_fnc( void * arg) {
printf("OMG, it is works \n");
}
I got a nice error in the log:
I (730) cpu_start: Starting scheduler on APP CPU.
1. LEDC fade up to duty = 4000
abort() was called at PC 0x40081fb9 on core 0
Backtrace: 0x40085fd8:0x3ffb0500 0x400860d7:0x3ffb0520 0x40081fb9:0x3ffb0540 0x400820d9:0x3ffb0570 0x400d215e:0x3ffb0590 0x400d21b9:0x3ffb05d0 0x40081e06:0x3ffb05f0 0x40081922:0x3ffb0610
Rebooting...
ets Jun 8 2016 00:22:57
I hope somebody is able to help to me to debug where I amde the mistake. I tried many ways, I think I do not understand the basic concept, I am in the beggining of the learning curve...
Thank you very much in advance!