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

Add DMA_COPY and CRYPTO_DMA interrupts for ESP32-S2 #313

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
paths-ignore:
- "**/README.md"
push:
branches-ignore:
- "gh-readonly-queue/**"
- "main"
merge_group:
workflow_dispatch:

Expand Down
2 changes: 2 additions & 0 deletions esp32s2/device.x
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ PROVIDE(PMS_DMA_APB_I_ILG = DefaultHandler);
PROVIDE(PMS_DMA_RX_I_ILG = DefaultHandler);
PROVIDE(PMS_DMA_TX_I_ILG = DefaultHandler);
PROVIDE(SPI0_REJECT_CACHE = DefaultHandler);
PROVIDE(DMA_COPY = DefaultHandler);
PROVIDE(SPI4_DMA = DefaultHandler);
PROVIDE(SPI4 = DefaultHandler);
PROVIDE(ICACHE_PRELOAD = DefaultHandler);
PROVIDE(DCACHE_PRELOAD = DefaultHandler);
PROVIDE(APB_ADC = DefaultHandler);
PROVIDE(CRYPTO_DMA = DefaultHandler);
PROVIDE(CPU_PERI_ERR = DefaultHandler);
PROVIDE(APB_PERI_ERR = DefaultHandler);
PROVIDE(DCACHE_SYNC = DefaultHandler);
Expand Down
14 changes: 12 additions & 2 deletions esp32s2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ extern "C" {
fn PMS_DMA_RX_I_ILG();
fn PMS_DMA_TX_I_ILG();
fn SPI0_REJECT_CACHE();
fn DMA_COPY();
fn SPI4_DMA();
fn SPI4();
fn ICACHE_PRELOAD();
fn DCACHE_PRELOAD();
fn APB_ADC();
fn CRYPTO_DMA();
fn CPU_PERI_ERR();
fn APB_PERI_ERR();
fn DCACHE_SYNC();
Expand Down Expand Up @@ -272,7 +274,7 @@ pub static __INTERRUPTS: [Vector; 95] = [
Vector {
_handler: SPI0_REJECT_CACHE,
},
Vector { _reserved: 0 },
Vector { _handler: DMA_COPY },
Vector { _handler: SPI4_DMA },
Vector { _handler: SPI4 },
Vector {
Expand All @@ -282,7 +284,9 @@ pub static __INTERRUPTS: [Vector; 95] = [
_handler: DCACHE_PRELOAD,
},
Vector { _handler: APB_ADC },
Vector { _reserved: 0 },
Vector {
_handler: CRYPTO_DMA,
},
Vector {
_handler: CPU_PERI_ERR,
},
Expand Down Expand Up @@ -459,6 +463,8 @@ pub enum Interrupt {
PMS_DMA_TX_I_ILG = 82,
#[doc = "83 - SPI0_REJECT_CACHE"]
SPI0_REJECT_CACHE = 83,
#[doc = "84 - DMA_COPY"]
DMA_COPY = 84,
#[doc = "85 - SPI4_DMA"]
SPI4_DMA = 85,
#[doc = "86 - SPI4"]
Expand All @@ -469,6 +475,8 @@ pub enum Interrupt {
DCACHE_PRELOAD = 88,
#[doc = "89 - APB_ADC"]
APB_ADC = 89,
#[doc = "90 - CRYPTO_DMA"]
CRYPTO_DMA = 90,
#[doc = "91 - CPU_PERI_ERR"]
CPU_PERI_ERR = 91,
#[doc = "92 - APB_PERI_ERR"]
Expand Down Expand Up @@ -566,11 +574,13 @@ impl Interrupt {
81 => Ok(Interrupt::PMS_DMA_RX_I_ILG),
82 => Ok(Interrupt::PMS_DMA_TX_I_ILG),
83 => Ok(Interrupt::SPI0_REJECT_CACHE),
84 => Ok(Interrupt::DMA_COPY),
85 => Ok(Interrupt::SPI4_DMA),
86 => Ok(Interrupt::SPI4),
87 => Ok(Interrupt::ICACHE_PRELOAD),
88 => Ok(Interrupt::DCACHE_PRELOAD),
89 => Ok(Interrupt::APB_ADC),
90 => Ok(Interrupt::CRYPTO_DMA),
91 => Ok(Interrupt::CPU_PERI_ERR),
92 => Ok(Interrupt::APB_PERI_ERR),
93 => Ok(Interrupt::DCACHE_SYNC),
Expand Down
8 changes: 8 additions & 0 deletions esp32s2/svd/patches/esp32s2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ _add:
- offset: 0x0
size: 0x100
usage: "Registers"
interrupts:
DMA_COPY:
description: DMA_COPY
value: 84
registers:
INT_RAW:
description: "Raw interrupt status"
Expand Down Expand Up @@ -423,6 +427,10 @@ _add:
- offset: 0x0
size: 0x60
usage: "Registers"
interrupts:
CRYPTO_DMA:
description: CRYPTO_DMA
value: 90
registers:
CONF:
description: "DMA configuration register"
Expand Down