diff --git a/CHANGELOG.md b/CHANGELOG.md index 58a8c533934..847ce50b990 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - ESP32-H2: Fix used RAM (#1003) - Fix SPI slave DMA dma\_read and dma\_write (#1013) - ESP32-C6/H2: Fix disabling of interrupts (#1040) +- ESP32/ESP32-S3: Fix stack-top calculation for app-core (#1081) ### Removed diff --git a/esp-hal-common/src/soc/esp32/cpu_control.rs b/esp-hal-common/src/soc/esp32/cpu_control.rs index 975544a1c30..f48d5063c83 100644 --- a/esp-hal-common/src/soc/esp32/cpu_control.rs +++ b/esp-hal-common/src/soc/esp32/cpu_control.rs @@ -98,7 +98,7 @@ impl Stack { } pub fn top(&mut self) -> *mut u32 { - unsafe { self.bottom().add(SIZE) } + unsafe { self.bottom().add(SIZE / 4) } } } diff --git a/esp-hal-common/src/soc/esp32s3/cpu_control.rs b/esp-hal-common/src/soc/esp32s3/cpu_control.rs index 0153a9d7ac3..12ef9223797 100644 --- a/esp-hal-common/src/soc/esp32s3/cpu_control.rs +++ b/esp-hal-common/src/soc/esp32s3/cpu_control.rs @@ -98,7 +98,7 @@ impl Stack { } pub fn top(&mut self) -> *mut u32 { - unsafe { self.bottom().add(SIZE) } + unsafe { self.bottom().add(SIZE / 4) } } }