-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
interrupt_controller: intc_esp32c3: added intc driver #38372
Conversation
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
Hi folks, any considerations there? |
3ca0fe3
to
e36e92f
Compare
15333f2
to
562bb6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We are in the stabilization period for v2.7.0 atm, so if the PR does not fix a bug it will not be merged for 2.7.0 unless it has TSC approval. @uLipe - are there many other additions required for supporting the esp32c3 devkit? |
@cfriedt , for the initial devkitm support is there the WIFI support which is internal tests which may not arrive in the next days. |
I have a couple of those boards on the way, so I'm looking forward to trying them out :-) |
@uLipe - please rebase and resolve conflicts |
562bb6a
to
087de08
Compare
For esp32c3 and replaces the hardcoded interrupt attaching procedures with this new driver. Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
interrupt controller, also places its relevant peripheral sources allowing drivers to use the DT macros instead of espressif headers. Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
Allowing cleaner debug experience and preventing unwanted outputs during debug. Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
087de08
to
ac2e7f6
Compare
Hi folks, can we move on with this PR? |
For esp32c3 and replaces the hardcoded interrupt
attaching procedures with this new driver.
The allocation strategy reuses the common riscv software isr table infrastructure provided
by zephyr:
It multiplexes each IRQ with 2 interrupt sources, special cases may have more or less IRQ lines
attached to different sources;
After an IRQ is selected, it is routed to the interrupt matrix as usual and the IRQ is enabled if it was not previously;
The ISR + argument is installed directly into zephyr´s software ISR table entry, the peripheral source number is used directly as table index;
When an ISR occurs, the zephyr platform specific __soc_handle_irq was modified and it is called, and instead of returning the mcause in a0, it returns the source of the peripheral in a0, and this value is used to fetch the proper ISR entry from sw ISR table;
If further interrupts are pending the irq wrapper calls __soc_handle_irq, and from lowest to highest source number, one by one gets checked and placed in a0 for next ISR handle until all pending interrupts get addressed;
When a peripheral source is not needed to interrupt anymore, it is just routed to an inactive IRQ line which is kept permanently disabled preventing it to fire, IRQ line 31 is used by this purpose.