]> begriffs open source - freertos/blob - FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/freedom-e-sdk/include/sifive/devices/aon.h
Add a starting point for a Freedom Studio Risc V project.
[freertos] / FreeRTOS / Demo / RISC-V-Qemu-sifive_e-FreedomStudio / freedom-e-sdk / include / sifive / devices / aon.h
1 // See LICENSE for license details.\r
2 \r
3 #ifndef _SIFIVE_AON_H\r
4 #define _SIFIVE_AON_H\r
5 \r
6 /* Register offsets */\r
7 \r
8 #define AON_WDOGCFG     0x000\r
9 #define AON_WDOGCOUNT   0x008\r
10 #define AON_WDOGS       0x010\r
11 #define AON_WDOGFEED    0x018\r
12 #define AON_WDOGKEY     0x01C\r
13 #define AON_WDOGCMP     0x020\r
14 \r
15 #define AON_RTCCFG      0x040\r
16 #define AON_RTCLO       0x048\r
17 #define AON_RTCHI       0x04C\r
18 #define AON_RTCS        0x050\r
19 #define AON_RTCCMP      0x060\r
20 \r
21 #define AON_BACKUP0     0x080\r
22 #define AON_BACKUP1     0x084\r
23 #define AON_BACKUP2     0x088\r
24 #define AON_BACKUP3     0x08C\r
25 #define AON_BACKUP4     0x090\r
26 #define AON_BACKUP5     0x094\r
27 #define AON_BACKUP6     0x098\r
28 #define AON_BACKUP7     0x09C\r
29 #define AON_BACKUP8     0x0A0\r
30 #define AON_BACKUP9     0x0A4\r
31 #define AON_BACKUP10    0x0A8\r
32 #define AON_BACKUP11    0x0AC\r
33 #define AON_BACKUP12    0x0B0\r
34 #define AON_BACKUP13    0x0B4\r
35 #define AON_BACKUP14    0x0B8\r
36 #define AON_BACKUP15    0x0BC\r
37 \r
38 #define AON_PMUWAKEUPI0 0x100\r
39 #define AON_PMUWAKEUPI1 0x104\r
40 #define AON_PMUWAKEUPI2 0x108\r
41 #define AON_PMUWAKEUPI3 0x10C\r
42 #define AON_PMUWAKEUPI4 0x110\r
43 #define AON_PMUWAKEUPI5 0x114\r
44 #define AON_PMUWAKEUPI6 0x118\r
45 #define AON_PMUWAKEUPI7 0x11C\r
46 #define AON_PMUSLEEPI0  0x120\r
47 #define AON_PMUSLEEPI1  0x124\r
48 #define AON_PMUSLEEPI2  0x128\r
49 #define AON_PMUSLEEPI3  0x12C\r
50 #define AON_PMUSLEEPI4  0x130\r
51 #define AON_PMUSLEEPI5  0x134\r
52 #define AON_PMUSLEEPI6  0x138\r
53 #define AON_PMUSLEEPI7  0x13C\r
54 #define AON_PMUIE       0x140\r
55 #define AON_PMUCAUSE    0x144\r
56 #define AON_PMUSLEEP    0x148\r
57 #define AON_PMUKEY      0x14C\r
58 \r
59 #define AON_LFROSC      0x070\r
60 /* Constants */\r
61 \r
62 #define AON_WDOGKEY_VALUE  0x51F15E\r
63 #define AON_WDOGFEED_VALUE 0xD09F00D\r
64 \r
65 #define AON_WDOGCFG_SCALE       0x0000000F\r
66 #define AON_WDOGCFG_RSTEN       0x00000100\r
67 #define AON_WDOGCFG_ZEROCMP     0x00000200\r
68 #define AON_WDOGCFG_ENALWAYS    0x00001000\r
69 #define AON_WDOGCFG_ENCOREAWAKE 0x00002000\r
70 #define AON_WDOGCFG_CMPIP       0x10000000\r
71 \r
72 #define AON_RTCCFG_SCALE     0x0000000F\r
73 #define AON_RTCCFG_ENALWAYS  0x00001000\r
74 #define AON_RTCCFG_CMPIP     0x10000000\r
75 \r
76 #define AON_WAKEUPCAUSE_RESET   0x00\r
77 #define AON_WAKEUPCAUSE_RTC     0x01\r
78 #define AON_WAKEUPCAUSE_DWAKEUP 0x02\r
79 #define AON_WAKEUPCAUSE_AWAKEUP 0x03\r
80 \r
81 #define AON_RESETCAUSE_POWERON  0x0000\r
82 #define AON_RESETCAUSE_EXTERNAL 0x0100\r
83 #define AON_RESETCAUSE_WATCHDOG 0x0200\r
84 \r
85 #define AON_PMUCAUSE_WAKEUPCAUSE 0x00FF\r
86 #define AON_PMUCAUSE_RESETCAUSE  0xFF00\r
87 \r
88 #endif /* _SIFIVE_AON_H */\r