-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
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.
Thanks for submitting this! Just a nits to sort out. Will happily merge after.
svd/patches/_interrupts.yaml
Outdated
# * should SLC be split into SLC0 and SLC1? | ||
# * the comments on the two I2C controllers seem reversed | ||
# * unclear where TIMER1 and TIMER2 should live | ||
# * group all the cpu specific interrupts under one root peripheral? |
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.
In cortex-m land, they put the processor interrupts (or exceptions as they called them) in side the runtime crate: https://github.com/rust-embedded/cortex-m-rt/blob/b265e3ec1fbdde531cdbefff82fcc6e9fec16166/src/lib.rs#L698, I think so that it was generic across vendors, maybe we should implement those inside xtensa-rt?
svd/patches/_interrupts.yaml
Outdated
|
||
# Open issues: | ||
# * should SLC be split into SLC0 and SLC1? | ||
# * the comments on the two I2C controllers seem reversed |
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.
In the IDF source?
svd/patches/_interrupts.yaml
Outdated
# Open issues: | ||
# * should SLC be split into SLC0 and SLC1? | ||
# * the comments on the two I2C controllers seem reversed | ||
# * unclear where TIMER1 and TIMER2 should live |
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.
TIMER1 & TIMER2 are the xtensa built in peripherals right? So probably xtensa crate (currently empty in esp-rs)
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.
No, they aren't. These are two timers outside of the CPU (i.e., peripherals).
svd/patches/_interrupts.yaml
Outdated
@@ -0,0 +1,490 @@ | |||
# Draft attempt at adding interrupt mappings to peripherals. |
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.
This whole project is WIP 😂 , may as well remove this As I'm sure we'll make changes in the future
svd/patches/_interrupts.yaml
Outdated
_add: | ||
_interrupts: | ||
CACHE_IA_INTR: | ||
description: "interrupt of Cache Invalied Access, LEVEL" |
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.
s/Invalied /Invalid
svd/patches/_interrupts.yaml
Outdated
value: 1 | ||
|
||
WIFI_BB_INTR: | ||
description: "interrupt of WiFi BB, level, we can do some calibartion" |
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.
s/calibartion/calibration
… errors and comments
Group CPU exceptions/interrupts under XTENSA, correct typos, errors & comments
I've grouped the CPU exceptions and the two CPU timers (TIMER0/TIMER1) under an XTENSA peripheral - perhaps these will be removed entirely when xtensa-rt crate is ready. Also corrected the typos and adjusted comments. Fixes #12 |
Sounds like a good idea for now. Thanks again for taking the time on this! (and thanks for the sponsor :)) |
Sorry, have not reviewed when this PR was submitted. One correction: none of the interrupts listed in the table are from the Xtensa CPU, all are peripheral interrupts. Each interrupt signal listed here goes into the interrupt matrix, which allows mapping interrupt signals to the external interrupt inputs of the Xtensa CPU. I.e. every CPU interrupt of type "external" in this table can receive one or more peripheral interrupt signals. This connection is done using the interrupt matrix peripheral. |
@igrr thanks for that clarification. Would it be better to use the original strategy of taking the prefix of the interrupt name as the name of the originating peripheral? As an example, If just keeping the same prefixes as the |
Yes, I think aside from a few inconsistencies between interrupt signal names and peripheral register names, this should work. Notable exceptions:
Also one other observation about the changes in this PR. It seems that unlike other repeating peripherals, I2S interrupts didn't get split into two peripheral instances (there is I2C0, I2C1, but only one I2S with 2 interrupts inside). |
Draft attempt at an interrupt map, with a few issues.Interrupt map with issues sorted.