-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32S3 GPIO interrupts don't work if gpio_install_isr_service() executes on APP CPU (IDFGH-6211) #7885
Comments
I have the same issue. GPIO interrupts are working only on GPIO 0. Also I tried GPIO 6, 8, 9, 47 and 21 (random). None of them worked with interrupts on any core. Is there some secret table with interrupt capable GPIOs? |
@alexander-sorokin please read my issue description, as probably you have an issue which is not related to my ticket. GPIO interrupts work correctly for me regardless of the GPIO number on the ESP32S3 if the GPIO ISR service is started on the PRO CPU (core0). The issue is that they don't work if the ISR service is started on the APP CPU (core1). The example code should work for you in case the main task's affinity is set to core0. |
Any follow ups? |
…on ESP32S3 Add a test case for checking the interrupt on other cores. Closes espressif#7885
…on ESP32S3 Add a test case for checking the interrupt on other cores. Closes espressif#7885
Problem Description
GPIO interrupts don't work if
gpio_install_isr_service()
executes on APP CPU. They work correctly if GPIO interrupts are handled on the PRO CPU. This issue is unrelated to #7594 as that is for the ESP32 (not the S3).By comparing the SOC
gpio_struct.h
header files between ESP32 (esp-idf/components/soc/esp32/include/soc/gpio_struct.h
) and ESP32S3 (esp-idf/components/soc/esp32s3/include/soc/gpio_struct.h
), it seems that the ESP32S3 does not have theacpu_int
struct.I can also find the relevant separate core0/core1 registers in
esp-idf/components/soc/esp32s3/include/soc/interrupt_core0_reg.h
andesp-idf/components/soc/esp32s3/include/soc/interrupt_core1_reg.h
, which should indicate that the APP CPU should be able to handle GPIO interrupts:Expected Behavior
It should be possible to handle GPIO interrupts on the APP CPU (core 1).
Actual Behavior
GPIO interrupts can only be handled on the PRO CPU (core 0).
Steps to reproduce
Compile and run the source code below. It prints lines containing
0
every 500ms, and a line with1
if a GPIO interrupt has received on GPIO0.If the main task affinity in the
sdkconfig
is changed to core1 (setCONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=n
andCONFIG_ESP_MAIN_TASK_AFFINITY_CPU1=y
) then the program will only display zeroes because the interrupt handler won't be triggered.Code to reproduce this issue
Other items if possible
The text was updated successfully, but these errors were encountered: