aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarun <[email protected]>2024-04-02 16:24:31 -0400
committerKarun <[email protected]>2024-04-02 16:24:31 -0400
commit66a7b629097cca89895e8557cf31aba50f5a1982 (patch)
treebc2558e1400621097385df7d7144ad27e643173d
parent166c95be6c2917e5133fa361ee88d845a6f4ef73 (diff)
Add octospi version dependency for max transfer support
-rw-r--r--embassy-stm32/src/ospi/mod.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/embassy-stm32/src/ospi/mod.rs b/embassy-stm32/src/ospi/mod.rs
index f85f07fc4..84d1ac284 100644
--- a/embassy-stm32/src/ospi/mod.rs
+++ b/embassy-stm32/src/ospi/mod.rs
@@ -519,7 +519,10 @@ impl<'d, T: Instance, Dma> Ospi<'d, T, Dma> {
519 519
520 T::REGS.dcr3().modify(|w| { 520 T::REGS.dcr3().modify(|w| {
521 w.set_csbound(config.chip_select_boundary); 521 w.set_csbound(config.chip_select_boundary);
522 w.set_maxtran(config.max_transfer); 522 #[cfg(octospi_v1)]
523 {
524 w.set_maxtran(config.max_transfer);
525 }
523 }); 526 });
524 527
525 T::REGS.dcr4().modify(|w| { 528 T::REGS.dcr4().modify(|w| {
@@ -911,7 +914,10 @@ impl<'d, T: Instance, Dma> Ospi<'d, T, Dma> {
911 914
912 T::REGS.dcr3().modify(|w| { 915 T::REGS.dcr3().modify(|w| {
913 w.set_csbound(config.chip_select_boundary); 916 w.set_csbound(config.chip_select_boundary);
914 w.set_maxtran(config.max_transfer); 917 #[cfg(octospi_v1)]
918 {
919 w.set_maxtran(config.max_transfer);
920 }
915 }); 921 });
916 922
917 T::REGS.dcr4().modify(|w| { 923 T::REGS.dcr4().modify(|w| {