![]() |
![]() |
MSPM0C110X Driver Library
2.05.01.00
|
System Control (SysCtl)
#include <stdbool.h>
#include <stdint.h>
#include <ti/devices/msp/msp.h>
#include <ti/driverlib/dl_common.h>
#include <ti/driverlib/m0p/dl_factoryregion.h>
Go to the source code of this file.
Macros | |
#define | DL_SYSCTL_RESET_SYSRST (SYSCTL_RESETLEVEL_LEVEL_CPU) |
Perform a SYSRST. More... | |
#define | DL_SYSCTL_RESET_CPU (DL_SYSCTL_RESET_SYSRST) |
#define | DL_SYSCTL_RESET_BOOT (SYSCTL_RESETLEVEL_LEVEL_BOOT) |
Perform a Boot reset. More... | |
#define | DL_SYSCTL_RESET_POR (SYSCTL_RESETLEVEL_LEVEL_POR) |
Perform a POR reset. More... | |
#define | DL_SYSCTL_RESET_BOOTLOADER_EXIT (SYSCTL_RESETLEVEL_LEVEL_BOOTLOADEREXIT) |
Perform system reset and exit bootloader to the application. | |
#define | DL_SYSCTL_RESET_BOOTLOADER_ENTRY (SYSCTL_RESETLEVEL_LEVEL_BOOTLOADERENTRY) |
Perform system reset and run bootloader. | |
#define | DL_SYSCTL_INTERRUPT_LFOSC_GOOD (SYSCTL_IMASK_LFOSCGOOD_ENABLE) |
Low Frequency Oscillator is stabilized and ready to use. | |
#define | DL_SYSCTL_INTERRUPT_ANALOG_CLOCK_ERROR (SYSCTL_IMASK_ANACLKERR_ENABLE) |
Analog clocking consistency error. | |
#define | DL_SYSCTL_NMI_WWDT0_FAULT (SYSCTL_NMIISET_WWDT0_SET) |
Non-maskable interrupt for Watchdog 0 Fault. | |
#define | DL_SYSCTL_NMI_BORLVL (SYSCTL_NMIISET_BORLVL_SET) |
Non-maskable interrupt for early BOR. | |
#define | DL_SYSCTL_CLK_STATUS_FCL_ON (SYSCTL_CLKSTATUS_FCLMODE_ENABLED) |
SYSOSC Frequency Correcting Loop Mode ON. | |
#define | DL_SYSCTL_CLK_STATUS_LFOSC_GOOD (SYSCTL_CLKSTATUS_LFOSCGOOD_TRUE) |
LFOSC is Valid. | |
#define | DL_SYSCTL_CLK_STATUS_MCLK_SOURCE_LFCLK (SYSCTL_CLKSTATUS_CURMCLKSEL_LFCLK) |
MCLK now sourced from LFCLK. | |
#define | DL_SYSCTL_CLK_STATUS_MCLK_SOURCE_HSCLK (SYSCTL_CLKSTATUS_HSCLKMUX_HSCLK) |
MCLK now sourced from HSCLK, otherwise SYSOSC. | |
#define | DL_SYSCTL_CLK_STATUS_ANALOG_CLOCK_ERROR (SYSCTL_CLKSTATUS_ANACLKERR_TRUE) |
Analog clocking error. | |
#define | DL_SYSCTL_CLK_STATUS_FCC_DONE (SYSCTL_CLKSTATUS_FCCDONE_DONE) |
Frequency Clock Counter (FCC) done. | |
#define | DL_SYSCTL_CLK_STATUS_LFCLK_SOURCE_EXLF (SYSCTL_CLKSTATUS_LFCLKMUX_EXLF) |
= LFCLK sourced from LFCLK_IN (external digital clock input) | |
#define | DL_SYSCTL_CLK_STATUS_SYSOSC_4MHZ (SYSCTL_CLKSTATUS_SYSOSCFREQ_SYSOSC4M) |
= SYSOSC is at low frequency (4MHz) | |
#define | DL_SYSCTL_CLK_STATUS_SYSOSC_USERTRIM_FREQ (SYSCTL_CLKSTATUS_SYSOSCFREQ_SYSOSCUSER) |
= SYSOSC is at the user-trimmed frequency (16 or 24MHz) | |
#define | DL_SYSCTL_STATUS_SHUTDOWN_IO_LOCK_TRUE (SYSCTL_SYSSTATUS_SHDNIOLOCK_TRUE) |
IO is locked due to SHUTDOWN. | |
#define | DL_SYSCTL_STATUS_EXT_RESET_PIN_DISABLED (SYSCTL_SYSSTATUS_EXTRSTPINDIS_TRUE) |
User has disabled external reset pin. | |
#define | DL_SYSCTL_STATUS_SWD_DISABLED (SYSCTL_SYSSTATUS_SWDCFGDIS_TRUE) |
User has disabled SWD port. | |
#define | DL_SYSCTL_STATUS_PMU_IFREF_GOOD (SYSCTL_SYSSTATUS_PMUIREFGOOD_TRUE) |
PMU IFREF good. | |
#define | DL_SYSCTL_STATUS_VBOOST_GOOD (SYSCTL_SYSSTATUS_ANACPUMPGOOD_TRUE) |
VBOOST (Analog Charge Pump) started up properly. | |
#define | DL_SYSCTL_STATUS_BOR_EVENT (SYSCTL_SYSSTATUS_BORLVL_TRUE) |
Brown Out Reset event status indicator. | |
#define | DL_SYSCTL_STATUS_BOR_LEVEL0 (SYSCTL_SYSSTATUS_BORCURTHRESHOLD_BORMIN) |
Current Brown Out Reset minimum level. | |
#define | DL_SYSCTL_STATUS_BOR_LEVEL1 (SYSCTL_SYSSTATUS_BORCURTHRESHOLD_BORLEVEL1) |
Current Brown Out Reset level 1. | |
#define | DL_SYSCTL_STATUS_BOR_LEVEL2 (SYSCTL_SYSSTATUS_BORCURTHRESHOLD_BORLEVEL2) |
Current Brown Out Reset level 2. | |
#define | DL_SYSCTL_STATUS_BOR_LEVEL3 (SYSCTL_SYSSTATUS_BORCURTHRESHOLD_BORLEVEL3) |
Current Brown Out Reset level 3. | |
#define | DL_SYSCTL_setMCLKSource(current, next, ...) DL_SYSCTL_switchMCLKfrom##current##to##next(__VA_ARGS__); |
Change MCLK source. More... | |
Functions | |
__STATIC_INLINE void | DL_SYSCTL_enableSleepOnExit (void) |
Enable sleep on exit. More... | |
__STATIC_INLINE void | DL_SYSCTL_disableSleepOnExit (void) |
Disable sleep on exit. More... | |
__STATIC_INLINE bool | DL_SYSCTL_isSleepOnExitEnabled (void) |
Check if sleep on exit is enabled. | |
__STATIC_INLINE void | DL_SYSCTL_enableEventOnPend (void) |
Enable send event on pending bit. More... | |
__STATIC_INLINE void | DL_SYSCTL_disableEventOnPend (void) |
Disable send event on pending bit. More... | |
__STATIC_INLINE bool | DL_SYSCTL_isEventOnPendEnabled (void) |
Check if send event on pending bit is enabled. More... | |
void | DL_SYSCTL_switchMCLKfromSYSOSCtoLFCLK (bool disableSYSOSC) |
Change MCLK source from SYSOSC to LFCLK. More... | |
void | DL_SYSCTL_switchMCLKfromLFCLKtoSYSOSC (void) |
Change MCLK source from LFCLK to SYSOSC. More... | |
void | DL_SYSCTL_switchMCLKfromSYSOSCtoHSCLK (void) |
Change MCLK source from SYSOSC to HSCLK. More... | |
void | DL_SYSCTL_switchMCLKfromHSCLKtoSYSOSC (void) |
Change MCLK source from HSCLK to SYSOSC. More... | |
__STATIC_INLINE void | DL_SYSCTL_setPowerPolicyRUN0SLEEP0 (void) |
Set the RUN/SLEEP mode power policy to RUN0/SLEEP0. More... | |
__STATIC_INLINE void | DL_SYSCTL_setPowerPolicyRUN1SLEEP1 (void) |
Set the RUN/SLEEP mode power policy to RUN1/SLEEP1. More... | |
__STATIC_INLINE void | DL_SYSCTL_setPowerPolicyRUN2SLEEP2 (void) |
Set the RUN/SLEEP mode power policy to RUN2/SLEEP2. More... | |
DL_SYSCTL_POWER_POLICY_RUN_SLEEP | DL_SYSCTL_getPowerPolicyRUNSLEEP (void) |
Get the RUN/SLEEP mode power policy. More... | |
__STATIC_INLINE void | DL_SYSCTL_setPowerPolicySTOP0 (void) |
Set the STOP mode power policy to STOP0. More... | |
__STATIC_INLINE void | DL_SYSCTL_setPowerPolicySTOP2 (void) |
Set the STOP mode power policy to STOP2. More... | |
DL_SYSCTL_POWER_POLICY_STOP | DL_SYSCTL_getPowerPolicySTOP (void) |
Get the STOP mode power policy. More... | |
__STATIC_INLINE void | DL_SYSCTL_setPowerPolicySTANDBY0 (void) |
Set the STANDBY mode power policy to STANDBY0. More... | |
__STATIC_INLINE void | DL_SYSCTL_setPowerPolicySTANDBY1 (void) |
Set the STANDBY mode power policy to STANDBY1. More... | |
DL_SYSCTL_POWER_POLICY_STANDBY | DL_SYSCTL_getPowerPolicySTANDBY (void) |
Get the STANDBY mode power policy. More... | |
__STATIC_INLINE void | DL_SYSCTL_setPowerPolicySHUTDOWN (void) |
Set power policy to SHUTDOWN mode. More... | |
__STATIC_INLINE void | DL_SYSCTL_setBORThreshold (DL_SYSCTL_BOR_THRESHOLD_LEVEL thresholdLevel) |
Set the brown-out reset (BOR) threshold level. More... | |
__STATIC_INLINE DL_SYSCTL_BOR_THRESHOLD_LEVEL | DL_SYSCTL_getBORThreshold (void) |
Get the brown-out reset (BOR) threshold level. More... | |
__STATIC_INLINE void | DL_SYSCTL_activateBORThreshold (void) |
Activate the BOR threshold level. More... | |
__STATIC_INLINE void | DL_SYSCTL_resetDevice (uint32_t resetType) |
Resets the device. More... | |
__STATIC_INLINE void | DL_SYSCTL_enableInterrupt (uint32_t interruptMask) |
Enable SYSCTL interrupts. More... | |
__STATIC_INLINE void | DL_SYSCTL_disableInterrupt (uint32_t interruptMask) |
Disable SYSCTL interrupts. More... | |
__STATIC_INLINE uint32_t | DL_SYSCTL_getEnabledInterrupts (uint32_t interruptMask) |
Check which SYSCTL interrupts are enabled. More... | |
__STATIC_INLINE uint32_t | DL_SYSCTL_getEnabledInterruptStatus (uint32_t interruptMask) |
Check interrupt flag of enabled SYSCTL interrupts. More... | |
__STATIC_INLINE uint32_t | DL_SYSCTL_getRawInterruptStatus (uint32_t interruptMask) |
Check interrupt flag of any SYSCTL interrupt. More... | |
__STATIC_INLINE DL_SYSCTL_IIDX | DL_SYSCTL_getPendingInterrupt (void) |
Get highest priority pending SYSCTL interrupt. More... | |
__STATIC_INLINE void | DL_SYSCTL_clearInterruptStatus (uint32_t interruptMask) |
Clear pending SYSCTL interrupts. More... | |
__STATIC_INLINE uint32_t | DL_SYSCTL_getRawNonMaskableInterruptStatus (uint32_t interruptMask) |
Check interrupt flag of any SYSCTL non-maskable interrupt. More... | |
__STATIC_INLINE DL_SYSCTL_NMI_IIDX | DL_SYSCTL_getPendingNonMaskableInterrupt (void) |
Get highest priority pending SYSCTL non-maskable interrupt. More... | |
__STATIC_INLINE void | DL_SYSCTL_clearNonMaskableInterruptStatus (uint32_t interruptMask) |
Clear pending SYSCTL non-maskable interrupts. More... | |
__STATIC_INLINE void | DL_SYSCTL_setWWDT0ErrorBehavior (DL_SYSCTL_ERROR_BEHAVIOR behavior) |
Set the behavior when a WWDT0 error occurs. More... | |
__STATIC_INLINE DL_SYSCTL_ERROR_BEHAVIOR | DL_SYSCTL_getWWDT0ErrorBehavior (void) |
Get the behavior when a WWDT0 error occurs. More... | |
__STATIC_INLINE void | DL_SYSCTL_setMCLKDivider (DL_SYSCTL_MCLK_DIVIDER divider) |
Set the Main Clock (MCLK) divider (MDIV) More... | |
__STATIC_INLINE DL_SYSCTL_MCLK_DIVIDER | DL_SYSCTL_getMCLKDivider (void) |
Get the Main Clock (MCLK) divider (MDIV) More... | |
__STATIC_INLINE DL_SYSCTL_MCLK_SOURCE | DL_SYSCTL_getMCLKSource (void) |
Get the source for the Main Clock (MCLK) More... | |
__STATIC_INLINE void | DL_SYSCTL_setSYSOSCFreq (DL_SYSCTL_SYSOSC_FREQ freq) |
Set the target frequency of the System Oscillator (SYSOSC) More... | |
__STATIC_INLINE DL_SYSCTL_SYSOSC_FREQ | DL_SYSCTL_getTargetSYSOSCFreq (void) |
Get the target frequency of the System Oscillator (SYSOSC) Target/desired SYSOSC frequency may be different than current/actual SYSOSC frequency during gear shift and other operations. This function matches what is input by DL_SYSCTL_setSYSOSCFreq. More... | |
__STATIC_INLINE DL_SYSCTL_SYSOSC_FREQ | DL_SYSCTL_getCurrentSYSOSCFreq (void) |
Get the current frequency of the System Oscillator (SYSOSC) Current/actual SYSOSC frequency may be different than target/desired SYSOSC frequency during gear shift and other operations. More... | |
__STATIC_INLINE uint32_t | DL_SYSCTL_getClockStatus (void) |
Returns status of the different clocks in CKM. More... | |
__STATIC_INLINE uint32_t | DL_SYSCTL_getStatus (void) |
Returns general status of SYSCTL. More... | |
__STATIC_INLINE void | DL_SYSCTL_clearECCErrorStatus (void) |
Clear the ECC error bits in SYSSTATUS. More... | |
__STATIC_INLINE void | DL_SYSCTL_setLFCLKSourceEXLF (void) |
Change LFCLK source to external digital LFCLK_IN. More... | |
__STATIC_INLINE void | DL_SYSCTL_setHFCLKSourceHFCLKIN (void) |
Change HFCLK source to external digital HFCLK_IN. More... | |
__STATIC_INLINE void | DL_SYSCTL_enableMFCLK (void) |
Enable the Medium Frequency Clock (MFCLK) More... | |
__STATIC_INLINE void | DL_SYSCTL_disableMFCLK (void) |
Disable the Medium Frequency Clock (MFCLK) | |
__STATIC_INLINE void | DL_SYSCTL_enableExternalClock (DL_SYSCTL_CLK_OUT_SOURCE source, DL_SYSCTL_CLK_OUT_DIVIDE divider) |
Enable the External Clock (CLK_OUT) More... | |
__STATIC_INLINE void | DL_SYSCTL_disableExternalClock (void) |
Disable the External Clock (CLK_OUT) More... | |
__STATIC_INLINE void | DL_SYSCTL_disableExternalClockDivider (void) |
Disable the External Clock (CLK_OUT) Divider. More... | |
__STATIC_INLINE void | DL_SYSCTL_enableMFPCLK (void) |
Enable the Middle Frequency Precision Clock (MFPCLK) More... | |
__STATIC_INLINE void | DL_SYSCTL_disableMFPCLK (void) |
Disable the Middle Frequency Precision Clock (MFPCLK) More... | |
__STATIC_INLINE void | DL_SYSCTL_blockAllAsyncFastClockRequests (void) |
Blocks all asynchronous fast clock requests. More... | |
__STATIC_INLINE void | DL_SYSCTL_allowAllAsyncFastClockRequests (void) |
Allows all asynchronous fast clock requests. More... | |
__STATIC_INLINE void | DL_SYSCTL_enableFastCPUEventHandling (void) |
Generates an asynchronous fast clock request upon any IRQ request to CPU. More... | |
__STATIC_INLINE void | DL_SYSCTL_disableFastCPUEventHandling (void) |
Maintains current system clock speed for IRQ request to CPU. More... | |
__STATIC_INLINE void | DL_SYSCTL_setSRAMBoundaryAddress (uint32_t address) |
Set the SRAM boundary address to act as partition for read-execute permission. More... | |
__STATIC_INLINE uint32_t | DL_SYSCTL_getSRAMBoundaryAddress (void) |
Get the SRAM boundary address. More... | |
__STATIC_INLINE uint32_t | DL_SYSCTL_readFCC (void) |
Read Frequency Clock Counter (FCC) More... | |
__STATIC_INLINE void | DL_SYSCTL_startFCC (void) |
Start Frequency Clock Counter (FCC) More... | |
__STATIC_INLINE bool | DL_SYSCTL_isFCCDone (void) |
Returns whether FCC is done capturing. More... | |
void | DL_SYSCTL_configFCC (DL_SYSCTL_FCC_TRIG_TYPE trigLvl, DL_SYSCTL_FCC_TRIG_SOURCE trigSrc, DL_SYSCTL_FCC_CLOCK_SOURCE clkSrc) |
Configure the Frequency Clock Counter (FCC) More... | |
__STATIC_INLINE void | DL_SYSCTL_setFCCPeriods (DL_SYSCTL_FCC_TRIG_CNT periods) |
Sets number of rising-edge to rising-edge period for Frequency Clock Counter (FCC) More... | |
__STATIC_INLINE DL_SYSCTL_FCC_TRIG_CNT | DL_SYSCTL_getFCCPeriods (void) |
Gets number of rising-edge to rising-edge period for Frequency Clock Counter (FCC) More... | |
__STATIC_INLINE void | DL_SYSCTL_enableSYSOSCFCL (void) |
Enable Frequency Correction Loop (FCL) in Internal Resistor mode. More... | |
__STATIC_INLINE void | DL_SYSCTL_enableWriteLock (void) |
Enable write protection of selected SYSCTL registers. More... | |
__STATIC_INLINE void | DL_SYSCTL_disableWriteLock (void) |
Disable write protection of selected SYSCTL registers. More... | |
__STATIC_INLINE void | DL_SYSCTL_setVBOOSTConfig (DL_SYSCTL_VBOOST setting) |
Sets operating mode of VBOOST (analog charge pump) More... | |
__STATIC_INLINE DL_SYSCTL_VBOOST | DL_SYSCTL_getVBOOSTConfig (void) |
Gets operating mode of VBOOST (analog charge pump) More... | |
__STATIC_INLINE uint8_t | DL_SYSCTL_getShutdownStorageByte (DL_SYSCTL_SHUTDOWN_STORAGE_BYTE index) |
Return byte that was saved through SHUTDOWN. More... | |
__STATIC_INLINE void | DL_SYSCTL_setShutdownStorageByte (DL_SYSCTL_SHUTDOWN_STORAGE_BYTE index, uint8_t data) |
Save a byte to SHUTDOWN memory. More... | |
__STATIC_INLINE void | DL_SYSCTL_releaseShutdownIO (void) |
Enable SHUTDOWN IO Release. More... | |
__STATIC_INLINE void | DL_SYSCTL_disableNRSTPin (void) |
Disable the reset functionality of the NRST pin. More... | |
__STATIC_INLINE void | DL_SYSCTL_disableSWD (void) |
Disable Serial Wire Debug (SWD) functionality. More... | |
__STATIC_INLINE DL_SYSCTL_RESET_CAUSE | DL_SYSCTL_getResetCause (void) |
Return byte that is stored in RSTCAUSE. More... | |
__STATIC_INLINE uint32_t | DL_SYSCTL_getTempCalibrationConstant (void) |
Retrieves the calibration constant of the temperature sensor to be used in temperature calculation. More... | |
__STATIC_INLINE void | DL_SYSCTL_enableBeeperOutput (void) |
Enable Beeper output. More... | |
__STATIC_INLINE void | DL_SYSCTL_disableBeeperOutput (void) |
Disable Beeper output. | |
__STATIC_INLINE void | DL_SYSCTL_setBeeperFreq (DL_SYSCTL_BEEPER_FREQ freq) |
Set the target frequency of the Beeper output. More... | |
__STATIC_INLINE DL_SYSCTL_BEEPER_FREQ | DL_SYSCTL_getBeeperFreq (void) |
Get the target frequency of the the Beeper output. More... | |
__STATIC_INLINE bool | DL_SYSCTL_isBeeperEnabled (void) |
Check if Beeper is enabled. More... | |
__STATIC_INLINE bool | DL_SYSCTL_isFlashBankSwapEnabled (void) |
Checks if Flash Bank swapping is enabled. More... | |
__STATIC_INLINE bool | DL_SYSCTL_isExecuteFromUpperFlashBank (void) |
Checks if executing from upper flash bank. More... | |