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

drivers: interrupt_controller: esp32c6: reserve IRQ 1 for WiFi #83213

Merged

Conversation

martinjaeger
Copy link
Member

IRQ 1 is reserved for WiFi in ESP-IDF, which is used as the basis for the Espressif HAL in Zephyr.

If IRQ 1 is used by Zephyr and too many other peripherals (e.g. multiple UARTs) are enabled, WiFi stops working.

Marking IRQ 1 as "not available" seems to fix the issue.

Fixes #82874

IRQ 1 is reserved for WiFi in ESP-IDF, which is used as the basis
for the Espressif HAL in Zephyr.

If IRQ 1 is used by Zephyr and too many other peripherals (e.g.
multiple UARTs) are enabled, WiFi stops working.

Marking IRQ 1 as "not available" seems to fix the issue.

Fixes zephyrproject-rtos#82874

Signed-off-by: Martin Jäger <[email protected]>
@martinjaeger
Copy link
Member Author

Here is the link to the relevant code in ESP-IDF: https://github.com/espressif/esp-idf/blob/master/components/esp_hw_support/port/esp32c6/esp_cpu_intr.c

We are not totally sure if IRQ 1 is actually used for WiFi in Zephyr as well. The WiFi driver does not use the Zephyr interrupt controller, but allocates its ISRs independently (inside the HAL repo). So we assumed it could be the same IRQ as used by ESP-IDF.

Espressif experts, please double-check if this is correct.

@sylvioalves
Copy link
Collaborator

@martinjaeger Hey, great you fixed this. BTW, I have been updating C3/C6 interrupt controller to improve it. It means this change might go away in a couple of days. Anyway, LGTM.

@sylvioalves
Copy link
Collaborator

Here is the link to the relevant code in ESP-IDF: https://github.com/espressif/esp-idf/blob/master/components/esp_hw_support/port/esp32c6/esp_cpu_intr.c

We are not totally sure if IRQ 1 is actually used for WiFi in Zephyr as well. The WiFi driver does not use the Zephyr interrupt controller, but allocates its ISRs independently (inside the HAL repo). So we assumed it could be the same IRQ as used by ESP-IDF.

Espressif experts, please double-check if this is correct.

Exactly, that is part of the changes I've been adding to C3/C6 (riscv) interrupt allocator.

Copy link
Collaborator

@uLipe uLipe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here we go again, missing a true vectored interrupt controller so no shared vectors issues like this would go away 😬

@kartben kartben merged commit e5e8fb5 into zephyrproject-rtos:main Dec 23, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WiFi doesn't seem to work on ESP32-C6
8 participants