Pico Core
Loading...
Searching...
No Matches
arm_regs.h
Go to the documentation of this file.
1#ifndef ARM_REGS_H
2#define ARM_REGS_H
3
4
5
6// Note: PPB_BASE defines the start of the Cortex M0+ internal peripherals.
7// It is defined elsewhere.
8
9// More info on SYSTICK.
10// https://developer.arm.com/documentation/dui0552/a/cortex-m3-peripherals/system-timer--systick?lang=en
11
12// Bitfield implementation for easy access to register fields.
13// SYSTICK
15{
16 unsigned ENABLE : 1;
17 unsigned TICKINT : 1;
18 unsigned CLKSOURCE : 1;
19 unsigned : 12;
20 unsigned COUNTFLAG : 1;
21 unsigned : 16;
22};
23#define SYST_CSRbits (*(volatile syst_csrbits*) (PPB_BASE + 0xe010))
24#define SYST_CSR (*(volatile uint32_t*)(PPB_BASE + 0xe010))
25
27{
28 unsigned RELOAD : 24;
29 unsigned : 8;
30};
31#define SYST_RVRbits (*(volatile syst_rvrbits*) (PPB_BASE + 0xe014))
32#define SYST_RVR (*(volatile uint32_t*)(PPB_BASE + 0xe014))
33
34
36{
37 unsigned CURRENT : 24;
38 unsigned : 8;
39};
40#define SYST_CVRbits (*(volatile syst_cvrbits*) (PPB_BASE + 0xe018))
41#define SYST_CVR (*(volatile uint32_t*)(PPB_BASE + 0xe018))
42
43#endif // ARM_REGS_H
Definition arm_regs.h:15
unsigned TICKINT
Definition arm_regs.h:17
unsigned ENABLE
Definition arm_regs.h:16
unsigned CLKSOURCE
Definition arm_regs.h:18
unsigned COUNTFLAG
Definition arm_regs.h:20
Definition arm_regs.h:36
unsigned CURRENT
Definition arm_regs.h:37
Definition arm_regs.h:27
unsigned RELOAD
Definition arm_regs.h:28