Skip to content

Commit

Permalink
Fix stack-top calculation for app-core (#1081)
Browse files Browse the repository at this point in the history
* Fix stack-top calculation for app-core

* CHANGELOG.md entry
  • Loading branch information
bjoernQ authored Jan 15, 2024
1 parent 0f9e246 commit a23d6a0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion esp-hal-common/src/soc/esp32/cpu_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl<const SIZE: usize> Stack<SIZE> {
}

pub fn top(&mut self) -> *mut u32 {
unsafe { self.bottom().add(SIZE) }
unsafe { self.bottom().add(SIZE / 4) }
}
}

Expand Down
2 changes: 1 addition & 1 deletion esp-hal-common/src/soc/esp32s3/cpu_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl<const SIZE: usize> Stack<SIZE> {
}

pub fn top(&mut self) -> *mut u32 {
unsafe { self.bottom().add(SIZE) }
unsafe { self.bottom().add(SIZE / 4) }
}
}

Expand Down

0 comments on commit a23d6a0

Please sign in to comment.