reset.h
Go to the documentation of this file.
1 #ifndef __RESET_H__
2 #define __RESET_H__
3 
4 //*****************************************************************************
5 //
8 //
9 //*****************************************************************************
10 
11 //*****************************************************************************
12 //
13 // If building with a C++ compiler, make all of the definitions in this header
14 // have a C binding.
15 //
16 //*****************************************************************************
17 #ifdef __cplusplus
18 extern "C"
19 {
20 #endif
21 
22 #include <msp432.h>
23 #include <stdint.h>
24 #include "register_remap.h"
25 
26 //*****************************************************************************
27 //
28 // Control specific variables
29 //
30 //*****************************************************************************
31 #define RESET_KEY 0x6900
32 #define RESET_HARD_RESET RSTCTL_RESETREQ_HRD_REQ
33 #define RESET_SOFT_RESET RSTCTL_RESETREQ_SFT_REQ
34 
35 #define RESET_SRC_0 RSTCTL_HRDRESETSTAT_SRC0
36 #define RESET_SRC_1 RSTCTL_HRDRESETSTAT_SRC1
37 #define RESET_SRC_2 RSTCTL_HRDRESETSTAT_SRC2
38 #define RESET_SRC_3 RSTCTL_HRDRESETSTAT_SRC3
39 #define RESET_SRC_4 RSTCTL_HRDRESETSTAT_SRC4
40 #define RESET_SRC_5 RSTCTL_HRDRESETSTAT_SRC5
41 #define RESET_SRC_6 RSTCTL_HRDRESETSTAT_SRC6
42 #define RESET_SRC_7 RSTCTL_HRDRESETSTAT_SRC7
43 #define RESET_SRC_8 RSTCTL_HRDRESETSTAT_SRC8
44 #define RESET_SRC_9 RSTCTL_HRDRESETSTAT_SRC9
45 #define RESET_SRC_10 RSTCTL_HRDRESETSTAT_SRC10
46 #define RESET_SRC_11 RSTCTL_HRDRESETSTAT_SRC11
47 #define RESET_SRC_12 RSTCTL_HRDRESETSTAT_SRC12
48 #define RESET_SRC_13 RSTCTL_HRDRESETSTAT_SRC13
49 #define RESET_SRC_14 RSTCTL_HRDRESETSTAT_SRC14
50 #define RESET_SRC_15 RSTCTL_HRDRESETSTAT_SRC15
51 
52 #define RESET_VCCDET RSTCTL_PSSRSTSTAT_BGREF
53 #define RESET_SVSH_TRIP RSTCTL_PSSRSTSTAT_SVSH
54 #define RESET_SVSL_TRIP RSTCTL_PSSRSTSTAT_SVSL
55 #define RESET_BGREF_BAD RSTCTL_PSSRSTSTAT_BGREF
56 
57 #define RESET_SD0 RSTCTL_PCMRSTSTAT_LPM35
58 #define RESET_SD1 RSTCTL_PCMRSTSTAT_LPM45
59 
60 //*****************************************************************************
61 //
62 // Prototypes for the APIs.
63 //
64 //*****************************************************************************
65 
66 //*****************************************************************************
67 //
71 //
72 //*****************************************************************************
73 extern void ResetCtl_initiateSoftReset(void);
74 
75 //*****************************************************************************
76 //
99 //
100 //*****************************************************************************
101 extern void ResetCtl_initiateSoftResetWithSource(uint32_t source);
102 
103 //*****************************************************************************
104 //
127 //
128 //*****************************************************************************
129 extern uint32_t ResetCtl_getSoftResetSource(void);
130 
131 //*****************************************************************************
132 //
154 //
155 //*****************************************************************************
156 extern void ResetCtl_clearSoftResetSource(uint32_t mask);
157 
158 //*****************************************************************************
159 //
163 //
164 //*****************************************************************************
165 extern void ResetCtl_initiateHardReset(void);
166 
167 //*****************************************************************************
168 //
190 //
191 //*****************************************************************************
192 extern void ResetCtl_initiateHardResetWithSource(uint32_t source);
193 
194 //*****************************************************************************
195 //
218 //
219 //*****************************************************************************
220 extern uint32_t ResetCtl_getHardResetSource(void);
221 
222 //*****************************************************************************
223 //
245 //
246 //*****************************************************************************
247 extern void ResetCtl_clearHardResetSource(uint32_t mask);
248 
249 //*****************************************************************************
250 //
261 //
262 //*****************************************************************************
263 extern uint32_t ResetCtl_getPSSSource(void);
264 
265 //*****************************************************************************
266 //
270 //
271 //*****************************************************************************
272 extern void ResetCtl_clearPSSFlags(void);
273 
274 //*****************************************************************************
275 //
281 //
282 //*****************************************************************************
283 extern uint32_t ResetCtl_getPCMSource(void);
284 
285 //*****************************************************************************
286 //
290 //
291 //*****************************************************************************
292 extern void ResetCtl_clearPCMFlags(void);
293 
294 //*****************************************************************************
295 //
296 // Mark the end of the C bindings section for C++ compilers.
297 //
298 //*****************************************************************************
299 #ifdef __cplusplus
300 }
301 #endif
302 
303 //*****************************************************************************
304 //
305 // Close the Doxygen group.
307 //
308 //*****************************************************************************
309 
310 #endif // __RESET_H__
void ResetCtl_clearSoftResetSource(uint32_t mask)
Definition: reset.c:19
void ResetCtl_clearHardResetSource(uint32_t mask)
Definition: reset.c:39
uint32_t ResetCtl_getHardResetSource(void)
Definition: reset.c:34
void ResetCtl_initiateSoftResetWithSource(uint32_t source)
Definition: reset.c:9
void ResetCtl_initiateHardReset(void)
Definition: reset.c:24
uint32_t ResetCtl_getPCMSource(void)
Definition: reset.c:54
uint32_t ResetCtl_getSoftResetSource(void)
Definition: reset.c:14
void ResetCtl_initiateHardResetWithSource(uint32_t source)
Definition: reset.c:29
void ResetCtl_clearPSSFlags(void)
Definition: reset.c:49
void ResetCtl_initiateSoftReset(void)
Definition: reset.c:4
uint32_t ResetCtl_getPSSSource(void)
Definition: reset.c:44
void ResetCtl_clearPCMFlags(void)
Definition: reset.c:59

Copyright 2014, Texas Instruments Incorporated