Skip to content

Commit 5360e78

Browse files
authored
fix SPI detection on s3 by using the right base address (#917)
1 parent c35728a commit 5360e78

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

espflash/src/target/mod.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -844,12 +844,7 @@ impl Chip {
844844
mosi_length_offset: Some(0x28),
845845
miso_length_offset: Some(0x2c),
846846
},
847-
Chip::Esp32c2
848-
| Chip::Esp32c3
849-
| Chip::Esp32c5
850-
| Chip::Esp32c6
851-
| Chip::Esp32h2
852-
| Chip::Esp32s3 => SpiRegisters {
847+
Chip::Esp32c5 | Chip::Esp32c6 | Chip::Esp32h2 => SpiRegisters {
853848
base: 0x6000_3000,
854849
usr_offset: 0x18,
855850
usr1_offset: 0x1c,
@@ -858,6 +853,15 @@ impl Chip {
858853
mosi_length_offset: Some(0x24),
859854
miso_length_offset: Some(0x28),
860855
},
856+
Chip::Esp32c2 | Chip::Esp32c3 | Chip::Esp32s3 => SpiRegisters {
857+
base: 0x6000_2000,
858+
usr_offset: 0x18,
859+
usr1_offset: 0x1c,
860+
usr2_offset: 0x20,
861+
w0_offset: 0x58,
862+
mosi_length_offset: Some(0x24),
863+
miso_length_offset: Some(0x28),
864+
},
861865
Chip::Esp32p4 => SpiRegisters {
862866
base: 0x5008_D000,
863867
usr_offset: 0x18,

0 commit comments

Comments
 (0)