aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Miller <[email protected]>2021-12-06 14:57:53 -0600
committerGrant Miller <[email protected]>2021-12-06 14:57:53 -0600
commit75374ce7e853143fdc16bd194342e6ef8bcac513 (patch)
tree7b67cf1fdecb97cd25c608d8352c36901869aae8
parente1cccc83912b1139738300690fbf82f44341f456 (diff)
Fix ssoe in v1
-rw-r--r--embassy-stm32/src/spi/v1.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/embassy-stm32/src/spi/v1.rs b/embassy-stm32/src/spi/v1.rs
index d7075dc43..1b870c2dc 100644
--- a/embassy-stm32/src/spi/v1.rs
+++ b/embassy-stm32/src/spi/v1.rs
@@ -52,18 +52,15 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> {
52 miso.as_ref().map(|x| x.set_as_af(miso_af, AFType::Input)); 52 miso.as_ref().map(|x| x.set_as_af(miso_af, AFType::Input));
53 } 53 }
54 54
55 unsafe {
56 T::regs().cr2().modify(|w| {
57 w.set_ssoe(false);
58 });
59 }
60
61 let pclk = T::frequency(); 55 let pclk = T::frequency();
62 let br = Self::compute_baud_rate(pclk, freq.into()); 56 let br = Self::compute_baud_rate(pclk, freq.into());
63 57
64 unsafe { 58 unsafe {
65 T::enable(); 59 T::enable();
66 T::reset(); 60 T::reset();
61 T::regs().cr2().modify(|w| {
62 w.set_ssoe(false);
63 });
67 T::regs().cr1().modify(|w| { 64 T::regs().cr1().modify(|w| {
68 w.set_cpha( 65 w.set_cpha(
69 match config.mode.phase == Phase::CaptureOnSecondTransition { 66 match config.mode.phase == Phase::CaptureOnSecondTransition {