summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2016-07-29 10:43:48 +0200
committerNicolas Schodet2019-10-09 23:05:50 +0200
commit23950b079fa441e7ace347a82898f45ef10b0578 (patch)
tree541b603320604fcae4988501cb422a6d28ab2b4b
parent4695b47da68a5b2f75270bea21e15b8f1b9fd6ff (diff)
ucoo/arch/rcc: read back register to make a delay
-rw-r--r--ucoo/arch/rcc.stm32f1.hh4
-rw-r--r--ucoo/arch/rcc.stm32f4.hh4
2 files changed, 4 insertions, 4 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.
diff --git a/ucoo/arch/rcc.stm32f4.hh b/ucoo/arch/rcc.stm32f4.hh
index 64c46b5..9e49277 100644
--- a/ucoo/arch/rcc.stm32f4.hh
+++ b/ucoo/arch/rcc.stm32f4.hh
@@ -146,7 +146,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->AHB1ENR)[bus_index] |= 1 << bit_index;
- arch_dsb ();
+ (&reg::RCC->AHB1ENR)[bus_index];
}
/// Disable clock for given peripheral.
@@ -156,7 +156,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->AHB1ENR)[bus_index] &= ~(1 << bit_index);
- arch_dsb ();
+ (&reg::RCC->AHB1ENR)[bus_index];
}
/// Frequency of the main system clock.