2 \defgroup pmu8_functions PMU Functions for Armv8.1-M
3 \brief Functions that relate to the Performance Monitoring Unit.
5 The following functions support the Performance Monitoring Unit (PMU) that is available on the Cortex-M55 processor.
7 The PMU is used to monitor events that occur during run-time of an application.
18 \defgroup pmu8_events_armv81 PMU Events for Armv8.1-M
19 \ingroup pmu8_functions
20 \brief IDs for Armv8.1-M architecture defined events.
22 These events are available on all Armv8.1-M devices including a PMU.
26 #define ARM_PMU_SW_INCR 0x0000 /*!< \brief Software update to the PMU_SWINC register, architecturally executed and condition code check pass */
27 #define ARM_PMU_L1I_CACHE_REFILL 0x0001 /*!< \brief L1 I-Cache refill */
28 #define ARM_PMU_L1D_CACHE_REFILL 0x0003 /*!< \brief L1 D-Cache refill */
29 #define ARM_PMU_L1D_CACHE 0x0004 /*!< \brief L1 D-Cache access */
30 #define ARM_PMU_LD_RETIRED 0x0006 /*!< \brief Memory-reading instruction architecturally executed and condition code check pass */
31 #define ARM_PMU_ST_RETIRED 0x0007 /*!< \brief Memory-writing instruction architecturally executed and condition code check pass */
32 #define ARM_PMU_INST_RETIRED 0x0008 /*!< \brief Instruction architecturally executed */
33 #define ARM_PMU_EXC_TAKEN 0x0009 /*!< \brief Exception entry */
34 #define ARM_PMU_EXC_RETURN 0x000A /*!< \brief Exception return instruction architecturally executed and the condition code check pass */
35 #define ARM_PMU_PC_WRITE_RETIRED 0x000C /*!< \brief Software change to the Program Counter (PC). Instruction is architecturally executed and condition code check pass */
36 #define ARM_PMU_BR_IMMED_RETIRED 0x000D /*!< \brief Immediate branch architecturally executed */
37 #define ARM_PMU_BR_RETURN_RETIRED 0x000E /*!< \brief Function return instruction architecturally executed and the condition code check pass */
38 #define ARM_PMU_UNALIGNED_LDST_RETIRED 0x000F /*!< \brief Unaligned memory memory-reading or memory-writing instruction architecturally executed and condition code check pass */
39 #define ARM_PMU_BR_MIS_PRED 0x0010 /*!< \brief Mispredicted or not predicted branch speculatively executed */
40 #define ARM_PMU_CPU_CYCLES 0x0011 /*!< \brief Cycle */
41 #define ARM_PMU_BR_PRED 0x0012 /*!< \brief Predictable branch speculatively executed */
42 #define ARM_PMU_MEM_ACCESS 0x0013 /*!< \brief Data memory access */
43 #define ARM_PMU_L1I_CACHE 0x0014 /*!< \brief Level 1 instruction cache access */
44 #define ARM_PMU_L1D_CACHE_WB 0x0015 /*!< \brief Level 1 data cache write-back */
45 #define ARM_PMU_L2D_CACHE 0x0016 /*!< \brief Level 2 data cache access */
46 #define ARM_PMU_L2D_CACHE_REFILL 0x0017 /*!< \brief Level 2 data cache refill */
47 #define ARM_PMU_L2D_CACHE_WB 0x0018 /*!< \brief Level 2 data cache write-back */
48 #define ARM_PMU_BUS_ACCESS 0x0019 /*!< \brief Bus access */
49 #define ARM_PMU_MEMORY_ERROR 0x001A /*!< \brief Local memory error */
50 #define ARM_PMU_INST_SPEC 0x001B /*!< \brief Instruction speculatively executed */
51 #define ARM_PMU_BUS_CYCLES 0x001D /*!< \brief Bus cycles */
52 #define ARM_PMU_CHAIN 0x001E /*!< \brief For an odd numbered counter, increment when an overflow occurs on the preceding even-numbered counter on the same PE */
53 #define ARM_PMU_L1D_CACHE_ALLOCATE 0x001F /*!< \brief Level 1 data cache allocation without refill */
54 #define ARM_PMU_L2D_CACHE_ALLOCATE 0x0020 /*!< \brief Level 2 data cache allocation without refill */
55 #define ARM_PMU_BR_RETIRED 0x0021 /*!< \brief Branch instruction architecturally executed */
56 #define ARM_PMU_BR_MIS_PRED_RETIRED 0x0022 /*!< \brief Mispredicted branch instruction architecturally executed */
57 #define ARM_PMU_STALL_FRONTEND 0x0023 /*!< \brief No operation issued because of the frontend */
58 #define ARM_PMU_STALL_BACKEND 0x0024 /*!< \brief No operation issued because of the backend */
59 #define ARM_PMU_L2I_CACHE 0x0027 /*!< \brief Level 2 instruction cache access */
60 #define ARM_PMU_L2I_CACHE_REFILL 0x0028 /*!< \brief Level 2 instruction cache refill */
61 #define ARM_PMU_L3D_CACHE_ALLOCATE 0x0029 /*!< \brief Level 3 data cache allocation without refill */
62 #define ARM_PMU_L3D_CACHE_REFILL 0x002A /*!< \brief Level 3 data cache refill */
63 #define ARM_PMU_L3D_CACHE 0x002B /*!< \brief Level 3 data cache access */
64 #define ARM_PMU_L3D_CACHE_WB 0x002C /*!< \brief Level 3 data cache write-back */
65 #define ARM_PMU_LL_CACHE_RD 0x0036 /*!< \brief Last level data cache read */
66 #define ARM_PMU_LL_CACHE_MISS_RD 0x0037 /*!< \brief Last level data cache read miss */
67 #define ARM_PMU_L1D_CACHE_MISS_RD 0x0039 /*!< \brief Level 1 data cache read miss */
68 #define ARM_PMU_OP_COMPLETE 0x003A /*!< \brief Operation retired */
69 #define ARM_PMU_OP_SPEC 0x003B /*!< \brief Operation speculatively executed */
70 #define ARM_PMU_STALL 0x003C /*!< \brief Stall cycle for instruction or operation not sent for execution */
71 #define ARM_PMU_STALL_OP_BACKEND 0x003D /*!< \brief Stall cycle for instruction or operation not sent for execution due to pipeline backend */
72 #define ARM_PMU_STALL_OP_FRONTEND 0x003E /*!< \brief Stall cycle for instruction or operation not sent for execution due to pipeline frontend */
73 #define ARM_PMU_STALL_OP 0x003F /*!< \brief Instruction or operation slots not occupied each cycle */
74 #define ARM_PMU_L1D_CACHE_RD 0x0040 /*!< \brief Level 1 data cache read */
75 #define ARM_PMU_LE_RETIRED 0x0100 /*!< \brief Loop end instruction executed */
76 #define ARM_PMU_LE_SPEC 0x0101 /*!< \brief Loop end instruction speculatively executed */
77 #define ARM_PMU_BF_RETIRED 0x0104 /*!< \brief Branch future instruction architecturally executed and condition code check pass */
78 #define ARM_PMU_BF_SPEC 0x0105 /*!< \brief Branch future instruction speculatively executed and condition code check pass */
79 #define ARM_PMU_LE_CANCEL 0x0108 /*!< \brief Loop end instruction not taken */
80 #define ARM_PMU_BF_CANCEL 0x0109 /*!< \brief Branch future instruction not taken */
81 #define ARM_PMU_SE_CALL_S 0x0114 /*!< \brief Call to secure function, resulting in Security state change */
82 #define ARM_PMU_SE_CALL_NS 0x0115 /*!< \brief Call to non-secure function, resulting in Security state change */
83 #define ARM_PMU_DWT_CMPMATCH0 0x0118 /*!< \brief DWT comparator 0 match */
84 #define ARM_PMU_DWT_CMPMATCH1 0x0119 /*!< \brief DWT comparator 1 match */
85 #define ARM_PMU_DWT_CMPMATCH2 0x011A /*!< \brief DWT comparator 2 match */
86 #define ARM_PMU_DWT_CMPMATCH3 0x011B /*!< \brief DWT comparator 3 match */
87 #define ARM_PMU_MVE_INST_RETIRED 0x0200 /*!< \brief MVE instruction architecturally executed */
88 #define ARM_PMU_MVE_INST_SPEC 0x0201 /*!< \brief MVE instruction speculatively executed */
89 #define ARM_PMU_MVE_FP_RETIRED 0x0204 /*!< \brief MVE floating-point instruction architecturally executed */
90 #define ARM_PMU_MVE_FP_SPEC 0x0205 /*!< \brief MVE floating-point instruction speculatively executed */
91 #define ARM_PMU_MVE_FP_HP_RETIRED 0x0208 /*!< \brief MVE half-precision floating-point instruction architecturally executed */
92 #define ARM_PMU_MVE_FP_HP_SPEC 0x0209 /*!< \brief MVE half-precision floating-point instruction speculatively executed */
93 #define ARM_PMU_MVE_FP_SP_RETIRED 0x020C /*!< \brief MVE single-precision floating-point instruction architecturally executed */
94 #define ARM_PMU_MVE_FP_SP_SPEC 0x020D /*!< \brief MVE single-precision floating-point instruction speculatively executed */
95 #define ARM_PMU_MVE_FP_MAC_RETIRED 0x0214 /*!< \brief MVE floating-point multiply or multiply-accumulate instruction architecturally executed */
96 #define ARM_PMU_MVE_FP_MAC_SPEC 0x0215 /*!< \brief MVE floating-point multiply or multiply-accumulate instruction speculatively executed */
97 #define ARM_PMU_MVE_INT_RETIRED 0x0224 /*!< \brief MVE integer instruction architecturally executed */
98 #define ARM_PMU_MVE_INT_SPEC 0x0225 /*!< \brief MVE integer instruction speculatively executed */
99 #define ARM_PMU_MVE_INT_MAC_RETIRED 0x0228 /*!< \brief MVE multiply or multiply-accumulate instruction architecturally executed */
100 #define ARM_PMU_MVE_INT_MAC_SPEC 0x0229 /*!< \brief MVE multiply or multiply-accumulate instruction speculatively executed */
101 #define ARM_PMU_MVE_LDST_RETIRED 0x0238 /*!< \brief MVE load or store instruction architecturally executed */
102 #define ARM_PMU_MVE_LDST_SPEC 0x0239 /*!< \brief MVE load or store instruction speculatively executed */
103 #define ARM_PMU_MVE_LD_RETIRED 0x023C /*!< \brief MVE load instruction architecturally executed */
104 #define ARM_PMU_MVE_LD_SPEC 0x023D /*!< \brief MVE load instruction speculatively executed */
105 #define ARM_PMU_MVE_ST_RETIRED 0x0240 /*!< \brief MVE store instruction architecturally executed */
106 #define ARM_PMU_MVE_ST_SPEC 0x0241 /*!< \brief MVE store instruction speculatively executed */
107 #define ARM_PMU_MVE_LDST_CONTIG_RETIRED 0x0244 /*!< \brief MVE contiguous load or store instruction architecturally executed */
108 #define ARM_PMU_MVE_LDST_CONTIG_SPEC 0x0245 /*!< \brief MVE contiguous load or store instruction speculatively executed */
109 #define ARM_PMU_MVE_LD_CONTIG_RETIRED 0x0248 /*!< \brief MVE contiguous load instruction architecturally executed */
110 #define ARM_PMU_MVE_LD_CONTIG_SPEC 0x0249 /*!< \brief MVE contiguous load instruction speculatively executed */
111 #define ARM_PMU_MVE_ST_CONTIG_RETIRED 0x024C /*!< \brief MVE contiguous store instruction architecturally executed */
112 #define ARM_PMU_MVE_ST_CONTIG_SPEC 0x024D /*!< \brief MVE contiguous store instruction speculatively executed */
113 #define ARM_PMU_MVE_LDST_NONCONTIG_RETIRED 0x0250 /*!< \brief MVE non-contiguous load or store instruction architecturally executed */
114 #define ARM_PMU_MVE_LDST_NONCONTIG_SPEC 0x0251 /*!< \brief MVE non-contiguous load or store instruction speculatively executed */
115 #define ARM_PMU_MVE_LD_NONCONTIG_RETIRED 0x0254 /*!< \brief MVE non-contiguous load instruction architecturally executed */
116 #define ARM_PMU_MVE_LD_NONCONTIG_SPEC 0x0255 /*!< \brief MVE non-contiguous load instruction speculatively executed */
117 #define ARM_PMU_MVE_ST_NONCONTIG_RETIRED 0x0258 /*!< \brief MVE non-contiguous store instruction architecturally executed */
118 #define ARM_PMU_MVE_ST_NONCONTIG_SPEC 0x0259 /*!< \brief MVE non-contiguous store instruction speculatively executed */
119 #define ARM_PMU_MVE_LDST_MULTI_RETIRED 0x025C /*!< \brief MVE memory instruction targeting multiple registers architecturally executed */
120 #define ARM_PMU_MVE_LDST_MULTI_SPEC 0x025D /*!< \brief MVE memory instruction targeting multiple registers speculatively executed */
121 #define ARM_PMU_MVE_LD_MULTI_RETIRED 0x0260 /*!< \brief MVE memory load instruction targeting multiple registers architecturally executed */
122 #define ARM_PMU_MVE_LD_MULTI_SPEC 0x0261 /*!< \brief MVE memory load instruction targeting multiple registers speculatively executed */
123 #define ARM_PMU_MVE_ST_MULTI_RETIRED 0x0261 /*!< \brief MVE memory store instruction targeting multiple registers architecturally executed */
124 #define ARM_PMU_MVE_ST_MULTI_SPEC 0x0265 /*!< \brief MVE memory store instruction targeting multiple registers speculatively executed */
125 #define ARM_PMU_MVE_LDST_UNALIGNED_RETIRED 0x028C /*!< \brief MVE unaligned memory load or store instruction architecturally executed */
126 #define ARM_PMU_MVE_LDST_UNALIGNED_SPEC 0x028D /*!< \brief MVE unaligned memory load or store instruction speculatively executed */
127 #define ARM_PMU_MVE_LD_UNALIGNED_RETIRED 0x0290 /*!< \brief MVE unaligned load instruction architecturally executed */
128 #define ARM_PMU_MVE_LD_UNALIGNED_SPEC 0x0291 /*!< \brief MVE unaligned load instruction speculatively executed */
129 #define ARM_PMU_MVE_ST_UNALIGNED_RETIRED 0x0294 /*!< \brief MVE unaligned store instruction architecturally executed */
130 #define ARM_PMU_MVE_ST_UNALIGNED_SPEC 0x0295 /*!< \brief MVE unaligned store instruction speculatively executed */
131 #define ARM_PMU_MVE_LDST_UNALIGNED_NONCONTIG_RETIRED 0x0298 /*!< \brief MVE unaligned noncontiguous load or store instruction architecturally executed */
132 #define ARM_PMU_MVE_LDST_UNALIGNED_NONCONTIG_SPEC 0x0299 /*!< \brief MVE unaligned noncontiguous load or store instruction speculatively executed */
133 #define ARM_PMU_MVE_VREDUCE_RETIRED 0x02A0 /*!< \brief MVE vector reduction instruction architecturally executed */
134 #define ARM_PMU_MVE_VREDUCE_SPEC 0x02A1 /*!< \brief MVE vector reduction instruction speculatively executed */
135 #define ARM_PMU_MVE_VREDUCE_FP_RETIRED 0x02A4 /*!< \brief MVE floating-point vector reduction instruction architecturally executed */
136 #define ARM_PMU_MVE_VREDUCE_FP_SPEC 0x02A5 /*!< \brief MVE floating-point vector reduction instruction speculatively executed */
137 #define ARM_PMU_MVE_VREDUCE_INT_RETIRED 0x02A8 /*!< \brief MVE integer vector reduction instruction architecturally executed */
138 #define ARM_PMU_MVE_VREDUCE_INT_SPEC 0x02A9 /*!< \brief MVE integer vector reduction instruction speculatively executed */
139 #define ARM_PMU_MVE_PRED 0x02B8 /*!< \brief Cycles where one or more predicated beats architecturally executed */
140 #define ARM_PMU_MVE_STALL 0x02CC /*!< \brief Stall cycles caused by an MVE instruction */
141 #define ARM_PMU_MVE_STALL_RESOURCE 0x02CD /*!< \brief Stall cycles caused by an MVE instruction because of resource conflicts */
142 #define ARM_PMU_MVE_STALL_RESOURCE_MEM 0x02CE /*!< \brief Stall cycles caused by an MVE instruction because of memory resource conflicts */
143 #define ARM_PMU_MVE_STALL_RESOURCE_FP 0x02CF /*!< \brief Stall cycles caused by an MVE instruction because of floating-point resource conflicts */
144 #define ARM_PMU_MVE_STALL_RESOURCE_INT 0x02D0 /*!< \brief Stall cycles caused by an MVE instruction because of integer resource conflicts */
145 #define ARM_PMU_MVE_STALL_BREAK 0x02D3 /*!< \brief Stall cycles caused by an MVE chain break */
146 #define ARM_PMU_MVE_STALL_DEPENDENCY 0x02D4 /*!< \brief Stall cycles caused by MVE register dependency */
147 #define ARM_PMU_ITCM_ACCESS 0x4007 /*!< \brief Instruction TCM access */
148 #define ARM_PMU_DTCM_ACCESS 0x4008 /*!< \brief Data TCM access */
149 #define ARM_PMU_TRCEXTOUT0 0x4010 /*!< \brief ETM external output 0 */
150 #define ARM_PMU_TRCEXTOUT1 0x4011 /*!< \brief ETM external output 1 */
151 #define ARM_PMU_TRCEXTOUT2 0x4012 /*!< \brief ETM external output 2 */
152 #define ARM_PMU_TRCEXTOUT3 0x4013 /*!< \brief ETM external output 3 */
153 #define ARM_PMU_CTI_TRIGOUT4 0x4018 /*!< \brief Cross-trigger Interface output trigger 4 */
154 #define ARM_PMU_CTI_TRIGOUT5 0x4019 /*!< \brief Cross-trigger Interface output trigger 5 */
155 #define ARM_PMU_CTI_TRIGOUT6 0x401A /*!< \brief Cross-trigger Interface output trigger 6 */
156 #define ARM_PMU_CTI_TRIGOUT7 0x401B /*!< \brief Cross-trigger Interface output trigger 7 */
161 \defgroup pmu8_events_armcm55 PMU Events for Cortex-M55
162 \ingroup pmu8_functions
163 \brief IDs for additional events defined for Cortex-M55.
165 These events are available on a Cortex-M55 device including a PMU.
169 #define ARMCM55_PMU_ECC_ERR 0xC000 /*!< \brief Any ECC error */
170 #define ARMCM55_PMU_ECC_ERR_FATAL 0xC001 /*!< \brief Any fatal ECC error */
171 #define ARMCM55_PMU_ECC_ERR_DCACHE 0xC010 /*!< \brief Any ECC error in the data cache */
172 #define ARMCM55_PMU_ECC_ERR_ICACHE 0xC011 /*!< \brief Any ECC error in the instruction cache */
173 #define ARMCM55_PMU_ECC_ERR_FATAL_DCACHE 0xC012 /*!< \brief Any fatal ECC error in the data cache */
174 #define ARMCM55_PMU_ECC_ERR_FATAL_ICACHE 0xC013 /*!< \brief Any fatal ECC error in the instruction cache*/
175 #define ARMCM55_PMU_ECC_ERR_DTCM 0xC020 /*!< \brief Any ECC error in the DTCM */
176 #define ARMCM55_PMU_ECC_ERR_ITCM 0xC021 /*!< \brief Any ECC error in the ITCM */
177 #define ARMCM55_PMU_ECC_ERR_FATAL_DTCM 0xC022 /*!< \brief Any fatal ECC error in the DTCM */
178 #define ARMCM55_PMU_ECC_ERR_FATAL_ITCM 0xC023 /*!< \brief Any fatal ECC error in the ITCM */
179 #define ARMCM55_PMU_PF_LINEFILL 0xC100 /*!< \brief A prefetcher starts a line-fill */
180 #define ARMCM55_PMU_PF_CANCEL 0xC101 /*!< \brief A prefetcher stops prefetching */
181 #define ARMCM55_PMU_PF_DROP_LINEFILL 0xC102 /*!< \brief A linefill triggered by a prefetcher has been dropped because of lack of buffering */
182 #define ARMCM55_PMU_NWAMODE_ENTER 0xC200 /*!< \brief No write-allocate mode entry */
183 #define ARMCM55_PMU_NWAMODE 0xC201 /*!< \brief Write-allocate store is not allocated into the data cache due to no-write-allocate mode */
184 #define ARMCM55_PMU_SAHB_ACCESS 0xC300 /*!< \brief Read or write access on the S-AHB interface to the TCM */
185 #define ARMCM55_PMU_DOSTIMEOUT_DOUBLE 0xC400 /*!< \brief Denial of Service timeout has fired twice and caused buffers to drain to allow forward progress */
186 #define ARMCM55_PMU_DOSTIMEOUT_TRIPLE 0xC401 /*!< \brief Denial of Service timeout has fired three times and blocked the LSU to force forward progress */
191 \brief Structure type to access the Performance Monitoring Unit (PMU).
195 __IOM uint32_t EVCNTR[__PMU_NUM_EVENTCNT]; /*!< Offset: 0x0 (R/W) \brief PMU Event Counter Registers \details Two up to 31 event counters, see device specific \ref __PMU_NUM_EVENTCNT */
196 // uint32_t RESERVED0[31U-__PMU_NUM_EVENTCNT];
197 __IOM uint32_t CCNTR; /*!< Offset: 0x7C (R/W) \brief PMU Cycle Counter Register */
198 // uint32_t RESERVED1[224];
199 __IOM uint32_t EVTYPER[__PMU_NUM_EVENTCNT]; /*!< Offset: 0x400 (R/W) \brief PMU Event Type and Filter Registers \details Two up to 31 event counters, see device specific \ref __PMU_NUM_EVENTCNT */
200 // uint32_t RESERVED2[31U-__PMU_NUM_EVENTCNT];
201 __IOM uint32_t CCFILTR; /*!< Offset: 0x47C (R/W) \brief PMU Cycle Counter Filter Register */
202 // uint32_t RESERVED3[480];
203 __IOM uint32_t CNTENSET; /*!< Offset: 0xC00 (R/W) \brief PMU Count Enable Set Register */
204 // uint32_t RESERVED4[7];
205 __IOM uint32_t CNTENCLR; /*!< Offset: 0xC20 (R/W) \brief PMU Count Enable Clear Register */
206 // uint32_t RESERVED5[7];
207 __IOM uint32_t INTENSET; /*!< Offset: 0xC40 (R/W) \brief PMU Interrupt Enable Set Register */
208 // uint32_t RESERVED6[7];
209 __IOM uint32_t INTENCLR; /*!< Offset: 0xC60 (R/W) \brief PMU Interrupt Enable Clear Register */
210 // uint32_t RESERVED7[7];
211 __IOM uint32_t OVSCLR; /*!< Offset: 0xC80 (R/W) \brief PMU Overflow Flag Status Clear Register */
212 // uint32_t RESERVED8[7];
213 __IOM uint32_t SWINC; /*!< Offset: 0xCA0 (R/W) \brief PMU Software Increment Register */
214 // uint32_t RESERVED9[7];
215 __IOM uint32_t OVSSET; /*!< Offset: 0xCC0 (R/W) \brief PMU Overflow Flag Status Set Register */
216 // uint32_t RESERVED10[79];
217 __IOM uint32_t TYPE; /*!< Offset: 0xE00 (R/W) \brief PMU Type Register */
218 __IOM uint32_t CTRL; /*!< Offset: 0xE04 (R/W) \brief PMU Control Register */
219 // uint32_t RESERVED11[108];
220 __IOM uint32_t AUTHSTATUS; /*!< Offset: 0xFB8 (R/W) \brief PMU Authentication Status Register */
221 __IOM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/W) \brief PMU Device Architecture Register */
222 // uint32_t RESERVED12[4];
223 __IOM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/W) \brief PMU Device Type Register */
224 __IOM uint32_t PIDR4; /*!< Offset: 0xFD0 (R/W) \brief PMU Peripheral Identification Register 4 */
225 // uint32_t RESERVED13[3];
226 __IOM uint32_t PIDR0; /*!< Offset: 0xFE0 (R/W) \brief PMU Peripheral Identification Register 0 */
227 __IOM uint32_t PIDR1; /*!< Offset: 0xFE4 (R/W) \brief PMU Peripheral Identification Register 1 */
228 __IOM uint32_t PIDR2; /*!< Offset: 0xFE8 (R/W) \brief PMU Peripheral Identification Register 2 */
229 __IOM uint32_t PIDR3; /*!< Offset: 0xFEC (R/W) \brief PMU Peripheral Identification Register 3 */
230 // uint32_t RESERVED14[3];
231 __IOM uint32_t CIDR0; /*!< Offset: 0xFF0 (R/W) \brief PMU Component Identification Register 0 */
232 __IOM uint32_t CIDR1; /*!< Offset: 0xFF4 (R/W) \brief PMU Component Identification Register 1 */
233 __IOM uint32_t CIDR2; /*!< Offset: 0xFF8 (R/W) \brief PMU Component Identification Register 2 */
234 __IOM uint32_t CIDR3; /*!< Offset: 0xFFC (R/W) \brief PMU Component Identification Register 3 */
238 \brief PMU configuration struct
240 This macro can be used to access the PMU registers, directly. For the common tasks
241 one should prefer using the control functions.
246 PMU->CTRL |= PMU_CTRL_ENABLE_Msk; // Enable PMU
252 \brief Enable the PMU
254 __STATIC_INLINE void ARM_PMU_Enable(void);
257 \brief Disable the PMU
259 __STATIC_INLINE void ARM_PMU_Disable(void);
262 \brief Set event to count for PMU event counter
263 \param [in] num Event counter (0-30) to configure
264 \param [in] type Event to count
266 __STATIC_INLINE void ARM_PMU_Set_EVTYPER(uint32_t num, uint32_t type);
269 \brief Reset cycle counter
271 __STATIC_INLINE void ARM_PMU_CYCCNT_Reset(void);
274 \brief Reset all event counters
276 __STATIC_INLINE void ARM_PMU_EVCNTR_ALL_Reset(void);
279 \brief Enable counters
280 \param [in] mask Counters to enable
281 \note Enables one or more of the following:
282 - event counters (0-30)
285 __STATIC_INLINE void ARM_PMU_CNTR_Enable(uint32_t mask);
288 \brief Disable counters
289 \param [in] mask Counters to enable
290 \note Disables one or more of the following:
291 - event counters (0-30)
294 __STATIC_INLINE void ARM_PMU_CNTR_Disable(uint32_t mask);
297 \brief Read cycle counter
300 __STATIC_INLINE uint32_t ARM_PMU_Get_CCNTR(void);
303 \brief Read event counter
304 \param [in] num Event counter (0-30) to read
307 __STATIC_INLINE uint32_t ARM_PMU_Get_EVCNTR(uint32_t num);
310 \brief Read counter overflow status
311 \return Counter overflow status bits for the following:
312 - event counters (0-30)
315 __STATIC_INLINE uint32_t ARM_PMU_Get_CNTR_OVS(void);
318 \brief Clear counter overflow status
319 \param [in] mask Counter overflow status bits to clear
320 \note Clears overflow status bits for one or more of the following:
321 - event counters (0-30)
324 __STATIC_INLINE void ARM_PMU_Set_CNTR_OVS(uint32_t mask);
327 \brief Enable counter overflow interrupt request
328 \param [in] mask Counter overflow interrupt request bits to set
329 \note Sets overflow interrupt request bits for one or more of the following:
330 - event counters (0-30)
333 __STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Enable(uint32_t mask);
336 \brief Disable counter overflow interrupt request
337 \param [in] mask Counter overflow interrupt request bits to clear
338 \note Clears overflow interrupt request bits for one or more of the following:
339 - event counters (0-30)
342 __STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Disable(uint32_t mask);
345 \brief Software increment event counter
346 \param [in] mask Counters to increment
347 \note Software increment bits for one or more event counters (0-30)
349 __STATIC_INLINE void ARM_PMU_CNTR_Increment(uint32_t mask);