diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-04 08:46:11 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-04 08:46:11 +0000 |
commit | efa92aaed21cbaa80f4bc88a0ef9bb6bbb7aa3ee (patch) | |
tree | 8289e84ce53bd72e8ef1637472430286306222ea /os/hal/platforms/STM32F4xx/hal_lld.c | |
parent | b799bdc5c5874fdcfc0e9c33cde779c774ada73f (diff) | |
download | ChibiOS-efa92aaed21cbaa80f4bc88a0ef9bb6bbb7aa3ee.tar.gz ChibiOS-efa92aaed21cbaa80f4bc88a0ef9bb6bbb7aa3ee.tar.bz2 ChibiOS-efa92aaed21cbaa80f4bc88a0ef9bb6bbb7aa3ee.zip |
Realtime counter support in the generic HAL driver and implementations for al STM32 devices, others will follow.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3723 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32F4xx/hal_lld.c')
-rw-r--r-- | os/hal/platforms/STM32F4xx/hal_lld.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32F4xx/hal_lld.c b/os/hal/platforms/STM32F4xx/hal_lld.c index 38d46177e..d9bf8374e 100644 --- a/os/hal/platforms/STM32F4xx/hal_lld.c +++ b/os/hal/platforms/STM32F4xx/hal_lld.c @@ -71,6 +71,9 @@ void hal_lld_init(void) { SysTick_CTRL_ENABLE_Msk |
SysTick_CTRL_TICKINT_Msk;
+ /* DWT cycle counter enable.*/
+ DWT_CTRL |= DWT_CTRL_CYCCNTENA;
+
#if STM32_PVD_ENABLE
/* Programmable voltage detector initialization */
PWR->CR |= PWR_CR_PVDE | (STM32_PLS & STM32_PLS_MASK);
|