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 <msp.h>
23 #include <stdint.h>
24 
25 //*****************************************************************************
26 //
27 // Control specific variables
28 //
29 //*****************************************************************************
30 #define RESET_KEY 0x6900
31 #define RESET_HARD_RESET RSTCTL_RESET_REQ_HARD_REQ
32 #define RESET_SOFT_RESET RSTCTL_RESET_REQ_SOFT_REQ
33 
34 #define RESET_SRC_0 RSTCTL_HARDRESET_CLR_SRC0
35 #define RESET_SRC_1 RSTCTL_HARDRESET_CLR_SRC1
36 #define RESET_SRC_2 RSTCTL_HARDRESET_CLR_SRC2
37 #define RESET_SRC_3 RSTCTL_HARDRESET_CLR_SRC3
38 #define RESET_SRC_4 RSTCTL_HARDRESET_CLR_SRC4
39 #define RESET_SRC_5 RSTCTL_HARDRESET_CLR_SRC5
40 #define RESET_SRC_6 RSTCTL_HARDRESET_CLR_SRC6
41 #define RESET_SRC_7 RSTCTL_HARDRESET_CLR_SRC7
42 #define RESET_SRC_8 RSTCTL_HARDRESET_CLR_SRC8
43 #define RESET_SRC_9 RSTCTL_HARDRESET_CLR_SRC9
44 #define RESET_SRC_10 RSTCTL_HARDRESET_CLR_SRC10
45 #define RESET_SRC_11 RSTCTL_HARDRESET_CLR_SRC11
46 #define RESET_SRC_12 RSTCTL_HARDRESET_CLR_SRC12
47 #define RESET_SRC_13 RSTCTL_HARDRESET_CLR_SRC13
48 #define RESET_SRC_14 RSTCTL_HARDRESET_CLR_SRC14
49 #define RESET_SRC_15 RSTCTL_HARDRESET_CLR_SRC15
50 
51 #define RESET_VCCDET RSTCTL_PSSRESET_CLR_BGREF
52 #define RESET_SVSH_TRIP RSTCTL_PSSRESET_CLR_SVSMH
53 #define RESET_BGREF_BAD RSTCTL_PSSRESET_CLR_BGREF
54 
55 #define RESET_LPM35 RSTCTL_PCMRESET_CLR_LPM35
56 #define RESET_LPM45 RSTCTL_PCMRESET_CLR_LPM45
57 
58 //*****************************************************************************
59 //
60 // Prototypes for the APIs.
61 //
62 //*****************************************************************************
63 
64 //*****************************************************************************
65 //
69 //
70 //*****************************************************************************
71 extern void ResetCtl_initiateSoftReset(void);
72 
73 //*****************************************************************************
74 //
97 //
98 //*****************************************************************************
99 extern void ResetCtl_initiateSoftResetWithSource(uint32_t source);
100 
101 //*****************************************************************************
102 //
125 //
126 //*****************************************************************************
127 extern uint32_t ResetCtl_getSoftResetSource(void);
128 
129 //*****************************************************************************
130 //
152 //
153 //*****************************************************************************
154 extern void ResetCtl_clearSoftResetSource(uint32_t mask);
155 
156 //*****************************************************************************
157 //
161 //
162 //*****************************************************************************
163 extern void ResetCtl_initiateHardReset(void);
164 
165 //*****************************************************************************
166 //
188 //
189 //*****************************************************************************
190 extern void ResetCtl_initiateHardResetWithSource(uint32_t source);
191 
192 //*****************************************************************************
193 //
216 //
217 //*****************************************************************************
218 extern uint32_t ResetCtl_getHardResetSource(void);
219 
220 //*****************************************************************************
221 //
243 //
244 //*****************************************************************************
245 extern void ResetCtl_clearHardResetSource(uint32_t mask);
246 
247 //*****************************************************************************
248 //
258 //
259 //*****************************************************************************
260 extern uint32_t ResetCtl_getPSSSource(void);
261 
262 //*****************************************************************************
263 //
267 //
268 //*****************************************************************************
269 extern void ResetCtl_clearPSSFlags(void);
270 
271 //*****************************************************************************
272 //
278 //
279 //*****************************************************************************
280 extern uint32_t ResetCtl_getPCMSource(void);
281 
282 //*****************************************************************************
283 //
287 //
288 //*****************************************************************************
289 extern void ResetCtl_clearPCMFlags(void);
290 
291 //*****************************************************************************
292 //
293 // Mark the end of the C bindings section for C++ compilers.
294 //
295 //*****************************************************************************
296 #ifdef __cplusplus
297 }
298 #endif
299 
300 //*****************************************************************************
301 //
302 // Close the Doxygen group.
304 //
305 //*****************************************************************************
306 
307 #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 2016, Texas Instruments Incorporated