aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src
diff options
context:
space:
mode:
authorBrian Schwind <[email protected]>2025-10-04 13:13:16 +0900
committerBrian Schwind <[email protected]>2025-10-04 16:52:20 +0900
commit5220a76e5f71c4e44c1e2f023df5ea7feb4d4370 (patch)
tree0d2cdd56da94ca8906964c985042057238c73769 /embassy-stm32/src
parent5e89631367c88e636899ddc3b3d333c92d0a983e (diff)
ospi: properly respect the max DMA transfer size when writing
Diffstat (limited to 'embassy-stm32/src')
-rw-r--r--embassy-stm32/src/ospi/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/ospi/mod.rs b/embassy-stm32/src/ospi/mod.rs
index a1f3c8b03..2e4943a1b 100644
--- a/embassy-stm32/src/ospi/mod.rs
+++ b/embassy-stm32/src/ospi/mod.rs
@@ -1203,7 +1203,7 @@ impl<'d, T: Instance> Ospi<'d, T, Async> {
1203 .modify(|v| v.set_fmode(vals::FunctionalMode::INDIRECT_WRITE)); 1203 .modify(|v| v.set_fmode(vals::FunctionalMode::INDIRECT_WRITE));
1204 1204
1205 // TODO: implement this using a LinkedList DMA to offload the whole transfer off the CPU. 1205 // TODO: implement this using a LinkedList DMA to offload the whole transfer off the CPU.
1206 for chunk in buf.chunks(0xFFFF) { 1206 for chunk in buf.chunks(0xFFFF / W::size().bytes()) {
1207 let transfer = unsafe { 1207 let transfer = unsafe {
1208 self.dma 1208 self.dma
1209 .as_mut() 1209 .as_mut()
@@ -1278,7 +1278,7 @@ impl<'d, T: Instance> Ospi<'d, T, Async> {
1278 .modify(|v| v.set_fmode(vals::FunctionalMode::INDIRECT_WRITE)); 1278 .modify(|v| v.set_fmode(vals::FunctionalMode::INDIRECT_WRITE));
1279 1279
1280 // TODO: implement this using a LinkedList DMA to offload the whole transfer off the CPU. 1280 // TODO: implement this using a LinkedList DMA to offload the whole transfer off the CPU.
1281 for chunk in buf.chunks(0xFFFF) { 1281 for chunk in buf.chunks(0xFFFF / W::size().bytes()) {
1282 let transfer = unsafe { 1282 let transfer = unsafe {
1283 self.dma 1283 self.dma
1284 .as_mut() 1284 .as_mut()