summaryrefslogtreecommitdiff
path: root/ucoo/arch/rcc.stm32f1.hh
diff options
context:
space:
mode:
authorNicolas Schodet2016-07-29 10:43:48 +0200
committerNicolas Schodet2019-10-09 23:05:50 +0200
commit23950b079fa441e7ace347a82898f45ef10b0578 (patch)
tree541b603320604fcae4988501cb422a6d28ab2b4b /ucoo/arch/rcc.stm32f1.hh
parent4695b47da68a5b2f75270bea21e15b8f1b9fd6ff (diff)
ucoo/arch/rcc: read back register to make a delay
Diffstat (limited to 'ucoo/arch/rcc.stm32f1.hh')
-rw-r--r--ucoo/arch/rcc.stm32f1.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/ucoo/arch/rcc.stm32f1.hh b/ucoo/arch/rcc.stm32f1.hh
index 3896752..6a2d574 100644
--- a/ucoo/arch/rcc.stm32f1.hh
+++ b/ucoo/arch/rcc.stm32f1.hh
@@ -96,7 +96,7 @@ rcc_peripheral_clock_enable (Rcc rcc)
int bus_index = static_cast<uint32_t> (rcc) >> 5;
int bit_index = static_cast<uint32_t> (rcc) & 0x1f;
(&reg::RCC->AHBENR)[bus_index] |= 1 << bit_index;
- arch_dsb ();
+ (&reg::RCC->AHBENR)[bus_index];
}
/// Disable clock for given peripheral.
@@ -106,7 +106,7 @@ rcc_peripheral_clock_disable (Rcc rcc)
int bus_index = static_cast<uint32_t> (rcc) >> 5;
int bit_index = static_cast<uint32_t> (rcc) & 0x1f;
(&reg::RCC->AHBENR)[bus_index] &= ~(1 << bit_index);
- arch_dsb ();
+ (&reg::RCC->AHBENR)[bus_index];
}
/// Frequency of the main system clock.