Using Multiple interrupts in esp32
-
- Posts: 9761
- Joined: Thu Nov 26, 2015 4:08 am
Re: Using Multiple interrupts in esp32
Btw, core migration shouldn't happen if you pin a task to a core using e.g. xTaskCreatePinnedToCore. Given that in all this, the core configuration is pretty important, I suggest you make 100% sure everything is pinned correctly.
-
- Posts: 47
- Joined: Sun Jan 13, 2019 5:39 pm
Re: Using Multiple interrupts in esp32
Hello ESP_Sprite,
I also suspected the GPIO interrupt issue which you described in your last post.
I will check again if the tasks are pinned correctly and will post any issues here.
At this stage I want to ask if "esp_intr_alloc(...)" is capable of registering a Level-5 interrupt?
Means, can I replace:
by
The docs about Highlevel-Interrupt says, esp_intr_alloc(..) can be used for registering Highlevel-Interrupts. Now, independently of the ethernet GPIO interrupt issue we discussed here, when I use the esp_intr_alloc(...) instead intr_matrix_set(...) for registering the Level5-Interrupt the ADC interrupt is not working.... Maybe here is another mistake hidden, which causes the other issues...
opcode_x64
I also suspected the GPIO interrupt issue which you described in your last post.
I will check again if the tasks are pinned correctly and will post any issues here.
At this stage I want to ask if "esp_intr_alloc(...)" is capable of registering a Level-5 interrupt?
Means, can I replace:
Code: Select all
ESP_INTR_DISABLE(31);
intr_matrix_set(1, ETS_GPIO_INTR_SOURCE, 31);
ESP_INTR_ENABLE(31);
Code: Select all
ESP_ERROR_CHECK(esp_intr_alloc(ETS_GPIO_INTR_SOURCE, ESP_INTR_FLAG_LEVEL5 | ESP_INTR_FLAG_IRAM, NULL, NULL, &adc_drdy_intr_handle));
opcode_x64
-
- Posts: 1
- Joined: Wed Jan 26, 2022 6:37 am
Re: Using Multiple interrupts in esp32
I am having the same problem. I am trying to use a hardware external interrupt (two GPIO input pins). The first interrupt works perfectly fine, but the second interrupt is simply not being serviced. I have scoured the forums and literature to no avail. There are many examples of one GPIO pin being used as an external trigger, but I haven't been able to find an example of more than one GPIO pin being setup for ISR.
The reason why I am trying to establish two interrupts is to create a quadrature encoder reader to read the position of a motor. Quadrature encoders require reading two signals (A and B) at highspeed. Here's a link to encoders in general: https://en.wikipedia.org/wiki/Increment ... 20movement.
I will appreciate any advice to help me move forward. Many thanks,
-Werner
The reason why I am trying to establish two interrupts is to create a quadrature encoder reader to read the position of a motor. Quadrature encoders require reading two signals (A and B) at highspeed. Here's a link to encoders in general: https://en.wikipedia.org/wiki/Increment ... 20movement.
I will appreciate any advice to help me move forward. Many thanks,
-Werner
I am a systems engineer working in the Life-Science field.
Who is online
Users browsing this forum: Bing [Bot] and 131 guests