Skip to content
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

No free Interrupt Inputs for Matter OTA (IDFGH-14334) #15124

Open
3 tasks done
emesamwong opened this issue Jan 2, 2025 · 6 comments
Open
3 tasks done

No free Interrupt Inputs for Matter OTA (IDFGH-14334) #15124

emesamwong opened this issue Jan 2, 2025 · 6 comments
Assignees
Labels
Status: Opened Issue is new

Comments

@emesamwong
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

When trying to execute the Matter OTA test, the DUT would reset due to 'No free interrupt inputs for RSA interrupt (flags 0xE)"
I found the Error Log message location and printed the list of interrupts. When the error occurred, there were still 9 interrupts available.

Here is the Debug Log:
Screenshot from 2025-01-02 18-47-16
Screenshot from 2025-01-02 18-47-44

What is the "interrupt input" representing?

Any Solution for the unstable interrupt resource?

Manually using Interrupt:
UART*2 with Shared
I2C with Shared
I2C with ESP_INTR_FLAG_LOWMED
GPIO
Timer0
LEDC & LCD_CAM (seem installed by the esp _lcd driver, i80_Control example)

Environment:
MCU: ESP32-S3-WROOM-1 (MCN16R8)
Development OS: Linux
Development Environment: VS Code
ESP-IDF version: Tag v5.2.2 (commit hash #3b8741b)
ESP-Matter: release/v1.3 (commit hash #b5a23374)
connectedhomeip: commit hash #82748b9f
LVGL version: v8.3.11 (ESP Component Registry)
LCM: ST7789P3 (240*240 pixels)
Touch: CST816D

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 2, 2025
@github-actions github-actions bot changed the title No free Interrupt Inputs for Matter OTA No free Interrupt Inputs for Matter OTA (IDFGH-14334) Jan 2, 2025
@espressif-bot espressif-bot assigned zwx1995esp and chshu and unassigned zwx1995esp Jan 2, 2025
@chshu
Copy link
Collaborator

chshu commented Jan 3, 2025

@emesamwong The interrupt inputs on Core 0 are indeed fully utilized. When a task on Core 0 attempts to initialize the RSA driver, it encounters this issue.

You can refer to: troubleshooting-interrupt-allocation for possible solutions.

A quick way to try out: use xTaskCreatePinnedToCore() to pin some tasks to Core1.

@emesamwong
Copy link
Author

@chshu Thank you for your suggestion.
I will try to free more Core 0 resources by using the xTaskCreatePinnedToCore() function.
For the RSA driver, should it be installed by the Matter?

esp_intr_dump() function only list out the interrupt instead of interrupt inputs (troubleshooting-interrupt-allocation)
How could I check the interrupt inputs resources?

@chshu
Copy link
Collaborator

chshu commented Jan 3, 2025

Matter itself doesn't use RSA, please check if any other tasks are using RSA.

esp_intr_dump() function only list out the interrupt instead of interrupt inputs (troubleshooting-interrupt-allocation)
How could I check the interrupt inputs resources?

I'm not entirely sure I understand the question. The esp_intr_dump() function lists the interrupts (or interrupt inputs), 32x available per core. However, there are more interrupt sources than available interrupts, so they should be allocated properly in the application.

@emesamwong
Copy link
Author

I would try to find the task that installed the RSA interrupt.

I am confused about the Error Message "No free interrupt inputs for "X" interrupt" and there are free interrupts in the interrupt list. It means the interrupt list could not represent interrupt inputs. Hence, I would like to keep checking the interrupt sources (instead of the interrupt list) usage which leads to the Error Message occurring.

For this statement, Any configuration should I set to enable it?

However, there are more interrupt sources than available interrupts, so they should be allocated properly in the application.

@chshu
Copy link
Collaborator

chshu commented Jan 3, 2025

As mentioned in my initial comment: #15124 (comment), there are no free interrupts on Core 0, which caused the failure to allocate an additional interrupt on Core 0. Therefore, we recommended switching some tasks to Core 1.

Interrupts are allocated on the core where the task is running.

Refer to a similar issue: #13610 (comment)

@emesamwong
Copy link
Author

@chshu Thank you for your support. I disabled the CONFIG_MBEDTLS_HARDWARE_MPI config, and tested 20 times OTA, no more Errors occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

4 participants