aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32F1xx/hal_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32F1xx/hal_lld.c')
-rw-r--r--os/hal/platforms/STM32F1xx/hal_lld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32F1xx/hal_lld.c b/os/hal/platforms/STM32F1xx/hal_lld.c
index bc2b8b0f2..53bafb1b5 100644
--- a/os/hal/platforms/STM32F1xx/hal_lld.c
+++ b/os/hal/platforms/STM32F1xx/hal_lld.c
@@ -105,7 +105,8 @@ void hal_lld_init(void) {
SysTick_CTRL_TICKINT_Msk;
/* DWT cycle counter enable.*/
- DWT_CTRL |= DWT_CTRL_CYCCNTENA;
+ SCS_DEMCR |= SCS_DEMCR_TRCENA;
+ DWT_CTRL |= DWT_CTRL_CYCCNTENA;
/* PWR and BD clocks enabled.*/
rccEnablePWRInterface(FALSE);