| ISF 2.2 rev 5 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

isf_systick_defs.h
Go to the documentation of this file.
1 /*!
2 *
3 * Copyright (c) 2015, Freescale Semiconductor, Inc.
4 *
5 */
6
7 /*!
8 * @file isf_systick_defs.h
9 *
10 * @brief Register definitions for accessing the standard ARM SYSTICK-related registers
11 *
12 */
13
14 #ifndef _ISF_SYSTICK_DEFS_H_
15 #define ISF_SYSTICK_DEFS_H_
16
17 #ifndef SYST_CSR
18
19 #include "isf_types.h"
20
21 #ifdef __cplusplus
22 #define __I volatile /*!< Defines 'read only' permissions */
23 #else
24 #define __I volatile const /*!< Defines 'read only' permissions */
25 #endif
26 #define __O volatile /*!< Defines 'write only' permissions */
27 #define __IO volatile /*!< Defines 'read / write' permissions */
28
29 /** \brief Structure type to access the System Timer (SysTick).
30 */
31 typedef struct
32 {
33 __IO uint32 CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */
34 __IO uint32 LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */
35 __IO uint32 VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */
36 __I uint32 CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */
37 } SysTick_t;
38
39 #define SCS_BASE_ADDR (0xE000E000UL) /*!< System Control Space Base Address */
40 #define SysTick_BASE_ADDR (SCS_BASE_ADDR + 0x0010UL)
41 #define SysTick ((SysTick_t *) SysTick_BASE_ADDR ) /*!< SysTick configuration struct */
42
43 /** Peripheral SysTick base pointer */
44 #define SysTick_BASE_PTR (SysTick)
45
46 /* ----------------------------------------------------------------------------
47 -- SysTick - Register accessor macros
48 ---------------------------------------------------------------------------- */
49
50 /* SysTick - Register accessors */
51 #define SysTick_CSR_REG(base) ((base)->CTRL)
52 #define SysTick_RVR_REG(base) ((base)->LOAD)
53 #define SysTick_CVR_REG(base) ((base)->VAL)
54 #define SysTick_CALIB_REG(base) ((base)->CALIB)
55
56 /* SysTick - Register instance definitions */
57 /* SysTick */
58 #define SYST_CSR SysTick_CSR_REG(SysTick_BASE_PTR)
59 #define SYST_RVR SysTick_RVR_REG(SysTick_BASE_PTR)
60 #define SYST_CVR SysTick_CVR_REG(SysTick_BASE_PTR)
61 #define SYST_CALIB SysTick_CALIB_REG(SysTick_BASE_PTR)
62
63 #endif /* ifndef SYST_CSR */
64 #endif /* ISF_SYSTICK_DEFS_H_ */
65
__I
#define __I
Definition: isf_systick_defs.h:24
SysTick_t
Structure type to access the System Timer (SysTick).
Definition: isf_systick_defs.h:31
isf_types.h
The isf_types.h file contains the ISF data type definitions and some of the globally used macros...
SysTick_t::CALIB
__I uint32 CALIB
Definition: isf_systick_defs.h:36
SysTick_t::VAL
__IO uint32 VAL
Definition: isf_systick_defs.h:35
SysTick_t::LOAD
__IO uint32 LOAD
Definition: isf_systick_defs.h:34
SysTick_t::CTRL
__IO uint32 CTRL
Definition: isf_systick_defs.h:33
uint32
unsigned long int uint32
Definition: isf_types.h:78
__IO
#define __IO
Definition: isf_systick_defs.h:27
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.