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/ports | |
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/ports')
-rw-r--r-- | os/ports/common/ARMCMx/nvic.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/os/ports/common/ARMCMx/nvic.h b/os/ports/common/ARMCMx/nvic.h index cce2029d7..5d310c81c 100644 --- a/os/ports/common/ARMCMx/nvic.h +++ b/os/ports/common/ARMCMx/nvic.h @@ -191,6 +191,9 @@ typedef struct { #define AIRCR_PRIGROUP_MASK (0x7U << 8)
#define AIRCR_PRIGROUP(n) ((n##U) << 8)
+/**
+ * @brief Structure representing the FPU I/O space.
+ */
typedef struct {
IOREG32 unused1[1];
IOREG32 FPCCR;
@@ -225,6 +228,35 @@ typedef struct { #define FPDSCR_FZ (0x1U << 24)
#define FPDSCR_RMODE(n) ((n##U) << 22)
+/**
+ * @brief Structure representing the DWT I/O space.
+ */
+typedef struct {
+ IOREG32 CTRL;
+ IOREG32 CYCCNT;
+ IOREG32 CPICNT;
+ IOREG32 EXCCNT;
+ IOREG32 SLEEPCNT;
+ IOREG32 LSUCNT;
+ IOREG32 FOLDCNT;
+ IOREG32 PCSR;
+} CMx_DWT;
+
+/**
+ * @brief DWT peripheral base address.
+ */
+#define DWTBase ((CMx_DWT *)0xE0001000U)
+#define DWT_CTRL (DWTBase->CTRL)
+#define DWT_CYCCNT (DWTBase->CYCCNT)
+#define DWT_CPICNT (DWTBase->CPICNT)
+#define DWT_EXCCNT (DWTBase->EXCCNT)
+#define DWT_SLEEPCNT (DWTBase->SLEEPCNT)
+#define DWT_LSUCNT (DWTBase->LSUCNT)
+#define DWT_FOLDCNT (DWTBase->FOLDCNT)
+#define DWT_PCSR (DWTBase->PCSR)
+
+#define DWT_CTRL_CYCCNTENA (0x1U << 0)
+
#ifdef __cplusplus
extern "C" {
#endif
|