2 * -------------------------------------------
3 * MSP432 DriverLib - v3_10_00_09
4 * -------------------------------------------
6 * --COPYRIGHT--,BSD,BSD
7 * Copyright (c) 2014, Texas Instruments Incorporated
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
14 * * Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
17 * * Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
21 * * Neither the name of Texas Instruments Incorporated nor the names of
22 * its contributors may be used to endorse or promote products derived
23 * from this software without specific prior written permission.
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
27 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
29 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 //*****************************************************************************
42 //! \addtogroup pss_api
45 //*****************************************************************************
47 //*****************************************************************************
49 // If building with a C++ compiler, make all of the definitions in this header
52 //*****************************************************************************
62 //*****************************************************************************
64 // Control specific variables
66 //*****************************************************************************
67 #define PSS_KEY_VALUE PSS_KEY_KEY_VAL
69 #define PSS_SVSMH PSS_IE_SVSMHIE
71 #define PSS_FULL_PERFORMANCE_MODE 0x01
72 #define PSS_NORMAL_PERFORMANCE_MODE 0x00
74 //*****************************************************************************
76 // Prototypes for the APIs.
78 //*****************************************************************************
80 //*****************************************************************************
82 //! Enables output of the High Side interrupt flag on the device \b SVMHOUT pin
84 //! \param activeLow True if the signal should be logic low when SVSMHIFG
85 //! is set. False if signal should be high when \b SVSMHIFG is set.
89 //*****************************************************************************
90 extern void PSS_enableHighSidePinToggle(bool activeLow);
92 //*****************************************************************************
94 //! Disables output of the High Side interrupt flag on the device \b SVMHOUT pin
98 //*****************************************************************************
99 extern void PSS_disableHighSidePinToggle(void);
101 //*****************************************************************************
103 //! Enables high side voltage supervisor/monitor.
107 //*****************************************************************************
108 extern void PSS_enableHighSide(void);
110 //*****************************************************************************
112 //! Disables high side voltage supervisor/monitor.
116 //*****************************************************************************
117 extern void PSS_disableHighSide(void);
119 //*****************************************************************************
121 //! Sets the performance mode of the high side regulator. Full performance
122 //! mode allows for the best response times while normal performance mode is
123 //! optimized for the lowest possible current consumption.
125 //! \param powerMode is the performance mode to set. Valid values are one of
127 //! - \b PSS_FULL_PERFORMANCE_MODE,
128 //! - \b PSS_NORMAL_PERFORMANCE_MODE
132 //*****************************************************************************
133 extern void PSS_setHighSidePerformanceMode(uint_fast8_t powerMode);
135 //*****************************************************************************
137 //! Gets the performance mode of the high side voltage regulator. Refer to the
138 //! user's guide for specific information about information about the different
139 //! performance modes.
141 //! \return Performance mode of the voltage regulator
143 //*****************************************************************************
144 extern uint_fast8_t PSS_getHighSidePerformanceMode(void);
146 //*****************************************************************************
148 //! Sets the high side voltage supervisor to monitor mode
152 //*****************************************************************************
153 extern void PSS_enableHighSideMonitor(void);
155 //*****************************************************************************
157 //! Switches the high side of the power supply system to be a supervisor instead
162 //*****************************************************************************
163 extern void PSS_disableHighSideMonitor(void);
165 //*****************************************************************************
167 //! Sets the voltage level at which the high side of the device voltage
168 //! regulator triggers a reset. This value is represented as an unsigned eight
169 //! bit integer where only the lowest three bits are most significant.
171 //! \param triggerVoltage Voltage level in which high side supervisor/monitor
172 //! triggers a reset. See the device specific data sheet for details
173 //! on these voltage levels.
175 //! Typical values will vary from part to part (so it is very important to
176 //! check the SVSH section of the data sheet. For reference only, the typical
177 //! MSP432 101 values are listed below:
189 //*****************************************************************************
190 extern void PSS_setHighSideVoltageTrigger(uint_fast8_t triggerVoltage);
192 //*****************************************************************************
194 //! Returns the voltage level at which the high side of the device voltage
195 //! regulator triggers a reset.
197 //! \return The voltage level that the high side voltage supervisor/monitor
198 //! triggers a reset. This value is represented as an unsigned eight
199 //! bit integer where only the lowest three bits are most significant.
200 //! See \link PSS_setHighSideVoltageTrigger \endlink for information regarding
203 //*****************************************************************************
204 extern uint_fast8_t PSS_getHighSideVoltageTrigger(void);
206 //*****************************************************************************
208 //! Enables the power supply system interrupt source.
212 //*****************************************************************************
213 extern void PSS_enableInterrupt(void);
215 //*****************************************************************************
217 //! Disables the power supply system interrupt source.
221 //*****************************************************************************
222 extern void PSS_disableInterrupt(void);
224 //*****************************************************************************
226 //! Gets the current interrupt status.
228 //! \return The current interrupt status ( \b PSS_SVSMH )
230 //*****************************************************************************
231 extern uint32_t PSS_getInterruptStatus(void);
233 //*****************************************************************************
235 //! Clears power supply system interrupt source.
239 //*****************************************************************************
240 extern void PSS_clearInterruptFlag(void);
243 //*****************************************************************************
245 //! Enables the "forced" mode of the DCDC regulator. In this mode, the fail
246 //! safe mechanism that disables the regulator to LDO mode when the supply
247 //! voltage falls below the minimum supply voltage required for DCDC operation
252 //*****************************************************************************
253 extern void PSS_enableForcedDCDCOperation(void);
256 //*****************************************************************************
258 //! Disables the "forced" mode of the DCDC regulator. In this mode, the fail
259 //! safe mechanism that disables the regulator to LDO mode when the supply
260 //! voltage falls below the minimum supply voltage required for DCDC operation
265 //*****************************************************************************
266 extern void PSS_disableForcedDCDCOperation(void);
268 //*****************************************************************************
270 //! Registers an interrupt handler for the power supply system interrupt.
272 //! \param intHandler is a pointer to the function to be called when the power
273 //! supply system interrupt occurs.
275 //! This function registers the handler to be called when a power supply system
276 //! interrupt occurs. This function enables the global interrupt in the
277 //! interrupt controller; specific PSS interrupts must be enabled
278 //! via PSS_enableInterrupt(). It is the interrupt handler's responsibility to
279 //! clear the interrupt source via PSS_clearInterruptFlag().
281 //! \sa Interrupt_registerInterrupt() for important information about
282 //! registering interrupt handlers.
286 //*****************************************************************************
287 extern void PSS_registerInterrupt(void (*intHandler)(void));
289 //*****************************************************************************
291 //! Unregisters the interrupt handler for the power supply system
293 //! This function unregisters the handler to be called when a power supply
294 //! system interrupt occurs. This function also masks off the interrupt in the
295 //! interrupt controller so that the interrupt handler no longer is called.
297 //! \sa Interrupt_registerInterrupt() for important information about
298 //! registering interrupt handlers.
302 //*****************************************************************************
303 extern void PSS_unregisterInterrupt(void);
305 //*****************************************************************************
307 // Mark the end of the C bindings section for C++ compilers.
309 //*****************************************************************************
314 //*****************************************************************************
316 // Close the Doxygen group.
319 //*****************************************************************************