diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2015-09-01 08:58:14 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2015-09-01 08:58:14 +0000 |
commit | ebde485b9efa736792b0c436e7a8a31c47eeb4b6 (patch) | |
tree | 52be73399b9f09deede5902ba12a3c071508b07e /os/nil | |
parent | c83eac2f289ffe50b7910c383e081fd461e688d1 (diff) | |
download | ChibiOS-ebde485b9efa736792b0c436e7a8a31c47eeb4b6.tar.gz ChibiOS-ebde485b9efa736792b0c436e7a8a31c47eeb4b6.tar.bz2 ChibiOS-ebde485b9efa736792b0c436e7a8a31c47eeb4b6.zip |
Fixed DWT unlock on CM7 ports.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8264 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/nil')
-rw-r--r-- | os/nil/ports/ARMCMx/nilcore_v7m.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/os/nil/ports/ARMCMx/nilcore_v7m.h b/os/nil/ports/ARMCMx/nilcore_v7m.h index 4ae692d7d..41c038fcc 100644 --- a/os/nil/ports/ARMCMx/nilcore_v7m.h +++ b/os/nil/ports/ARMCMx/nilcore_v7m.h @@ -389,6 +389,9 @@ static inline void port_init(void) { /* DWT cycle counter enable.*/
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
+#if CORTEX_MODEL == 7
+ DWT->LAR = 0xC5ACCE55;
+#endif
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
/* Initialization of the system vectors used by the port.*/
|