SYSCTL Module¶
System Control (SysCtl) determines the overall operation of the communication manager (CM). The API provides functions to configure the set of peripherals that are enabled, the windowed watchdog, the NMI watchdog, and WFI. It also provides functions to handle and obtain information about resets and peripheral clock requests.
-
group
sysctl_api The System Control module is used for miscellaneous system configurations.
Defines
-
SYSCTL_WD_CHKBITS0x0028U¶
-
SYSCTL_WD_ENRSTKEY0x0055U¶
-
SYSCTL_WD_RSTKEY0x00AAU¶
-
SYSCTL_PERIPH_REG_M0x001FU¶
-
SYSCTL_PERIPH_REG_S0x0000U¶
-
SYSCTL_PERIPH_BIT_M0x1F00U¶
-
SYSCTL_PERIPH_BIT_S0x0008U¶
-
SYSCTL_CMNMIFLGCLR_KEY0x5674U¶
-
SYSCTL_CMNMIFLGFRC_KEY0x2732U¶
-
SYSCTL_CMNMICFG_KEY0x6789U¶
-
SYSCTL_CMNMIWDPRD_KEY0x9238U¶
-
SYSCTL_CMSYSCTL_KEY0x5634U¶
-
SYSCTL_WWD_KEY0x1234U¶
-
SYSCTL_ETHERCAT_I2C_LOOPBACK0x1U¶
-
SYSCTL_NMI_GLOBAL0x1U¶
-
SYSCTL_NMI_NMIINT0x0001U¶ Non-maskable interrupt.
-
SYSCTL_NMI_CLOCKFAIL0x0002U¶ Clock Failure.
-
SYSCTL_NMI_MEMUNCERR0x0004U¶ RAM/ROM Uncorrectable error.
-
SYSCTL_NMI_FLUNCERR0x0008U¶ Uncorrectable Flash error.
-
SYSCTL_NMI_MCANUNCERR0x0010U¶ MCAN Uncorrectable Error.
-
SYSCTL_NMI_WWDNMI0x0020U¶ CM Windowed Watchdog.
-
SYSCTL_NMI_ECATNMI0x0040U¶ EtherCAT reset out.
-
SYSCTL_CAUSE_PORESETN0x00000001U¶ Power-on reset.
-
SYSCTL_CAUSE_XRSN0x00000002U¶ External reset pin.
-
SYSCTL_CAUSE_CPU1WDRSN0x00000004U¶ CPU1 Watchdog reset.
-
SYSCTL_CAUSE_CPU1NMIWDRSN0x00000008U¶ CPU1 NMI WD reset.
-
SYSCTL_CAUSE_CPU1SYSRSN0x00000010U¶ CPU1 System reset.
-
SYSCTL_CAUSE_CPU1SCCRESETN0x00000020U¶ CPU1 SCCRESETn reset.
-
SYSCTL_CAUSE_ECAT_RESET_OUT0x00000040U¶ ECAT Reset.
-
SYSCTL_CAUSE_CPU1SIMRESET_CPURSN0x00000080U¶ SIMRESET_CPURSn-CPU1.
-
SYSCTL_CAUSE_CMRSTCTLRESETREQ0x00000100U¶ Reset req from CM.
-
SYSCTL_CAUSE_CMVECTRESETN0x00010000U¶ CM Vector Reset.
-
SYSCTL_CAUSE_CMSYSRESETREQ0x00020000U¶ CM System reset.
-
SYSCTL_CAUSE_CMNMIWDRSTN0x00040000U¶ CM NMI WD Reset.
-
SYSCTL_CAUSE_CMEOLRESETN0x00080000U¶ Logic reset.
CM Execute Override
-
SYSCTL_CMECATCTL_LOCK0x1U¶ block writes to CM-Ethercat control Reg
-
CM_CLK_FREQ125000000U¶
-
SYSCTL_DELAY__asm( ” .sect ".TI.ramfunc"\n” \
” .clink\n” \
” .thumbfunc SysCtl_delay\n” \
” .thumb\n” \
” .global SysCtl_delay\n” \
“SysCtl_delay:\n” \
” subs r0, #1\n” \
” bne.n SysCtl_delay\n” \
” bx lr\n”);
¶
Enums
-
enum
SysCtl_PeripheralPCLOCKCR¶ The following are values that can be passed to SysCtl_enablePeripheral() and SysCtl_disablePeripheral() as the peripheral parameter.
Values:
-
enumerator
SYSCTL_PERIPH_CLK_UART0= 0x0000U¶ UART0 clock.
-
enumerator
SYSCTL_PERIPH_CLK_SSI0= 0x0400U¶ SSI0 clock.
-
enumerator
SYSCTL_PERIPH_CLK_I2C0= 0x0800U¶ I2C0 clock.
-
enumerator
SYSCTL_PERIPH_CLK_USB= 0x0C00U¶ USB clock.
-
enumerator
SYSCTL_PERIPH_CLK_ENET= 0x0001U¶ ENET clock.
-
enumerator
SYSCTL_PERIPH_CLK_ECAT= 0x0201U¶ ECAT clock.
-
enumerator
SYSCTL_PERIPH_CLK_CAN_A= 0x0401U¶ CAN_A clock.
-
enumerator
SYSCTL_PERIPH_CLK_CAN_B= 0x0501U¶ CAN_B clock.
-
enumerator
SYSCTL_PERIPH_CLK_MCAN_A= 0x0801U¶ MCAN_A clock.
-
enumerator
SYSCTL_PERIPH_CLK_TIMER0= 0x0002U¶ CPUtimer0 clock.
-
enumerator
SYSCTL_PERIPH_CLK_TIMER1= 0x0102U¶ CPUtimer1 clock.
-
enumerator
SYSCTL_PERIPH_CLK_TIMER2= 0x0202U¶ CPUtimer2 clock.
-
enumerator
SYSCTL_PERIPH_CLK_UDMA= 0x0402U¶ UDMA clock.
-
enumerator
SYSCTL_PERIPH_CLK_AESIP= 0x0602U¶ AESIP clock.
-
enumerator
SYSCTL_PERIPH_CLK_GCRC= 0x0802U¶ GCRC clock.
-
enumerator
-
enum
SysCtl_PeripheralSOFTPRES¶ The following are values that can be passed to SysCtl_resetPeripheral() as the peripheral parameter.
Values:
-
enumerator
SYSCTL_PERIPH_RES_UART0= 0x0000U¶ UART0 Reset.
-
enumerator
SYSCTL_PERIPH_RES_SSI0= 0x0400U¶ SSI0 Reset.
-
enumerator
SYSCTL_PERIPH_RES_I2C0= 0x0800U¶ I2C0 Reset.
-
enumerator
SYSCTL_PERIPH_RES_USB= 0x0C00U¶ USB Reset.
-
enumerator
SYSCTL_PERIPH_RES_ENET= 0x0001U¶ ENET Reset.
-
enumerator
SYSCTL_PERIPH_RES_ECAT= 0x0201U¶ ECAT Reset.
-
enumerator
SYSCTL_PERIPH_RES_CAN_A= 0x0401U¶ CAN_A Reset.
-
enumerator
SYSCTL_PERIPH_RES_CAN_B= 0x0501U¶ CAN_B Reset.
-
enumerator
SYSCTL_PERIPH_RES_MCAN_A= 0x0801U¶ MCAN_A Reset.
-
enumerator
SYSCTL_PERIPH_RES_AESIP= 0x0602U¶ AESIP Reset.
-
enumerator
SYSCTL_PERIPH_RES_GCRC= 0x0802U¶ GCRC Reset.
-
enumerator
-
enum
SysCtl_PeripheralCMCLKSTOPACK¶ The following are values that can be passed to SysCtl_isPeripheralClockStopAcked()as the peripheral parameter.
Values:
-
enumerator
SYSCTL_PERIPH_ACK_MCAN_A= 0x0800U¶ MCAN_A clock.
-
enumerator
-
enum
SysCtl_PeripheralCMCLKSTOPREQ¶ The following are values that can be passed to SysCtl_reqPeripheralClockStop()as the peripheral parameter.
Values:
-
enumerator
SYSCTL_PERIPH_REQ_MCAN_A= 0x0801U¶ MCAN_A clock.
-
enumerator
-
enum
SysCtl_WDPredivider¶ The following are values that can be passed to SysCtl_setWatchdogPredivider() as the predivider parameter.
Values:
-
enumerator
SYSCTL_WD_PREDIV_2= 0x800U¶ PREDIVCLK = INTOSC1 / 2.
-
enumerator
SYSCTL_WD_PREDIV_4= 0x900U¶ PREDIVCLK = INTOSC1 / 4.
-
enumerator
SYSCTL_WD_PREDIV_8= 0xA00U¶ PREDIVCLK = INTOSC1 / 8.
-
enumerator
SYSCTL_WD_PREDIV_16= 0xB00U¶ PREDIVCLK = INTOSC1 / 16.
-
enumerator
SYSCTL_WD_PREDIV_32= 0xC00U¶ PREDIVCLK = INTOSC1 / 32.
-
enumerator
SYSCTL_WD_PREDIV_64= 0xD00U¶ PREDIVCLK = INTOSC1 / 64.
-
enumerator
SYSCTL_WD_PREDIV_128= 0xE00U¶ PREDIVCLK = INTOSC1 / 128.
-
enumerator
SYSCTL_WD_PREDIV_256= 0xF00U¶ PREDIVCLK = INTOSC1 / 256.
-
enumerator
SYSCTL_WD_PREDIV_512= 0x000U¶ PREDIVCLK = INTOSC1 / 512.
-
enumerator
SYSCTL_WD_PREDIV_1024= 0x100U¶ PREDIVCLK = INTOSC1 / 1024.
-
enumerator
SYSCTL_WD_PREDIV_2048= 0x200U¶ PREDIVCLK = INTOSC1 / 2048.
-
enumerator
SYSCTL_WD_PREDIV_4096= 0x300U¶ PREDIVCLK = INTOSC1 / 4096.
-
enumerator
-
enum
SysCtl_WDPrescaler¶ The following are values that can be passed to SysCtl_setWatchdogPrescaler() as the prescaler parameter.
Values:
-
enumerator
SYSCTL_WD_PRESCALE_1= 1U¶ WDCLK = PREDIVCLK / 1.
-
enumerator
SYSCTL_WD_PRESCALE_2= 2U¶ WDCLK = PREDIVCLK / 2.
-
enumerator
SYSCTL_WD_PRESCALE_4= 3U¶ WDCLK = PREDIVCLK / 4.
-
enumerator
SYSCTL_WD_PRESCALE_8= 4U¶ WDCLK = PREDIVCLK / 8.
-
enumerator
SYSCTL_WD_PRESCALE_16= 5U¶ WDCLK = PREDIVCLK / 16.
-
enumerator
SYSCTL_WD_PRESCALE_32= 6U¶ WDCLK = PREDIVCLK / 32.
-
enumerator
SYSCTL_WD_PRESCALE_64= 7U¶ WDCLK = PREDIVCLK / 64.
-
enumerator
Functions
-
uint32_t
SysCtl_getResetCause(void)¶ Gets the reason for a reset.
This function will return the reason(s) for a reset. Since the reset reasons are sticky until either cleared by software or an external reset, multiple reset reasons may be returned if multiple resets have occurred. The reset reason will be a logical OR of
SYSCTL_CAUSE_PORESETN - Power-on reset
SYSCTL_CAUSE_XRSN - External reset pin
SYSCTL_CAUSE_CPU1WDRSN - Watchdog reset from CPU1
SYSCTL_CAUSE_CPU1NMIWDRSN -NMI Watchdog reset from CPU1
SYSCTL_CAUSE_CPU1SYSRSN - System reset from CPU1
SYSCTL_CAUSE_CPU1SCCRESETN - SCCRESETn from CPU1
SYSCTL_CAUSE_ECAT_RESET_OUT - ECAT reset
SYSCTL_CAUSE_CPU1SIMRESET_CPURSN - SIMRESET from CPU1
SYSCTL_CAUSE_CMRSTCTLRESETREQ - System reset request from CM4
SYSCTL_CAUSE_CMVECTRESETN - Vectreset from CM4
SYSCTL_CAUSE_CMSYSRESETREQ - System reset request from CPU1
SYSCTL_CAUSE_CMNMIWDRSTN - NMI watchdog reset from CM4
SYSCTL_CAUSE_CMEOLRESETN - EOLRESETn reset from CM4
- Return
Returns the reason(s) for a reset.
-
void
SysCtl_clearResetCause(uint32_t rstCauses)¶ Clears reset reasons.
This function clears the specified sticky reset reasons. Once cleared, another reset for the same reason can be detected, and a reset for a different reason can be distinguished (instead of having two reset causes set). If the reset reason is used by an application, all reset causes should be cleared after they are retrieved with
SysCtl_getResetCause().- Parameters
rstCauses: are the reset causes to be cleared; must be a logical OR of SYSCTL_CAUSE_PORESETN, SYSCTL_CAUSE_XRSN, SYSCTL_CAUSE_CPU1WDRSN,SYSCTL_CAUSE_CPU1NMIWDRSN, SYSCTL_CAUSE_CPU1SYSRSN ,SYSCTL_CAUSE_CPU1SCCRESETN, SYSCTL_CAUSE_ECAT_RESET_OUT , SYSCTL_CAUSE_CPU1SIMRESET_CPURSN, SYSCTL_CAUSE_CMRSTCTLRESETREQ ,SYSCTL_CAUSE_CMVECTRESETN, SYSCTL_CAUSE_CMSYSRESETREQ, SYSCTL_CAUSE_CMNMIWDRSN and/or SYSCTL_CAUSE_CMEOLRESETN.
- Return
None.
-
void
SysCtl_disableWatchdog(void)¶ Disables the watchdog.
This function disables the watchdog timer. Note that the watchdog timer is enabled on reset.
- Return
None.
-
void
SysCtl_enableWatchdog(void)¶ Enables the watchdog.
This function enables the watchdog timer. Note that the watchdog timer is enabled on reset.
- Return
None.
-
void
SysCtl_serviceWatchdog(void)¶ Services the watchdog.
This function resets the watchdog.
- Return
None.
-
void
SysCtl_setWatchdogPredivider(SysCtl_WDPredivider predivider)¶ Sets up watchdog clock (WDCLK) pre-divider.
This function sets up the watchdog clock (WDCLK) pre-divider. There are two dividers that scale INTOSC1 to WDCLK. The
predivider parameter divides INTOSC1 down to PREDIVCLK and the prescaler (set by the SysCtl_setWatchdogPrescaler() function) divides PREDIVCLK down to WDCLK.- Parameters
predivider: is the value that configures the pre-divider.
- Return
None.
-
void
SysCtl_setWatchdogPrescaler(SysCtl_WDPrescaler prescaler)¶ Sets up watchdog clock (WDCLK) prescaler.
This function sets up the watchdog clock (WDCLK) prescaler. There are two dividers that scale INTOSC1 to WDCLK. The predivider (set with the
SysCtl_setWatchdogPredivider() function) divides INTOSC1 down to PREDIVCLK and the prescaler parameter divides PREDIVCLK down to WDCLK.- Parameters
prescaler: is the value that configures the watchdog clock relative to the value from the pre-divider.
- Return
None.
-
uint16_t
SysCtl_getWatchdogCounterValue(void)¶ Gets the watchdog counter value.
- Return
Returns the current value of the 8-bit watchdog counter. If this count value overflows, a watchdog output pulse is generated.
-
bool
SysCtl_getWatchdogStatus(void)¶ Gets the watchdog status.
This function returns the watchdog status. This bit, if set, indicates a NMI was fired to CM4 from WWD. This bit remains latched until the user writes a 1 to clear the condition. Writes of 0 will be ignored.
- Return
Returns true if the watchdog generated the NMI condition.
-
void
SysCtl_clearWatchdogStatus(void)¶ Clears the watchdog status.
This function clears the watchdog status. To check if it was set first, see SysCtl_getWatchdogStatus().
- Return
None.
-
void
SysCtl_setWatchdogWindowValue(uint16_t value)¶ Set the minimum threshold value for windowed watchdog
This function sets the minimum threshold value used to define the lower limit of the windowed watchdog functionality.
- Parameters
value: is the value to set the window threshold
- Return
None.
-
bool
SysCtl_getNMIStatus(void)¶ Read NMI interrupts.
Read the current state of NMI interrupt.
- Return
true if NMI interrupt is triggered, false if not.
-
uint16_t
SysCtl_getNMIFlagStatus(void)¶ Read NMI Flags.
Read the current state of individual NMI interrupts
- Return
Value of NMIFLG register. These defines are provided to decode the value:
SYSCTL_NMI_NMIINT - Non-maskable interrupt
SYSCTL_NMI_CLOCKFAIL - Clock Failure
SYSCTL_NMI_MEMUNCERR - RAM, ROM Uncorrectable Error
SYSCTL_NMI_FLUNCERR - Uncorrectable Flash error
SYSCTL_NMI_MCANUNCERR -MCAN Uncorrectable Error
SYSCTL_NMI_WWDNMI- CM WWD
SYSCTL_NMI_ECATNMI -EtherCAT reset out
-
bool
SysCtl_isNMIFlagSet(uint32_t nmiFlags)¶ Check if the individual NMI interrupts are set.
Check if interrupt flags corresponding to the passed in bit mask are asserted.
- Parameters
nmiFlags: Bit mask of the NMI interrupts that user wants to clear. The bit format of this parameter is same as of the NMIFLG register. These defines are provided:SYSCTL_NMI_NMIINT - Non-maskable interrupt
SYSCTL_NMI_CLOCKFAIL - Clock Failure
SYSCTL_NMI_MEMUNCERR -RAM, ROM Uncorrectable Error
SYSCTL_NMI_FLUNCERR - Uncorrectable Flash error
SYSCTL_NMI_MCANUNCERR -MCAN Uncorrectable Error
SYSCTL_NMI_WWDNMI- CM WWD
SYSCTL_NMI_ECATNMI -EtherCAT reset out
- Return
true if any of the NMI asked for in the parameter bit mask is set. false if none of the NMI requested in the parameter bit mask are set.
-
void
SysCtl_clearNMIStatus(uint32_t nmiFlags)¶ Function to clear individual NMI interrupts.
Clear NMI interrupt flags that correspond with the passed in bit mask.
- Parameters
nmiFlags: Bit mask of the NMI interrupts that user wants to clear. The bit format of this parameter is same as of the CMNMIFLG register. These defines are provided:SYSCTL_NMI_NMIINT - Non-maskable interrupt
SYSCTL_NMI_CLOCKFAIL -Clock Failure
SYSCTL_NMI_MEMUNCERR - RAM, ROM Uncorrectable Error
SYSCTL_NMI_FLUNCERR - Uncorrectable Flash error
SYSCTL_NMI_MCANUNCERR -MCAN Uncorrectable Error
SYSCTL_NMI_WWDNMI- CM WWD
SYSCTL_NMI_ECATNMI -EtherCAT reset out
- Return
None.
-
void
SysCtl_clearAllNMIFlags(void)¶ Clear all the NMI Flags.
- Return
None.
-
void
SysCtl_forceNMIFlags(uint32_t nmiFlags)¶ Function to force individual NMI interrupt fail flags
- Return
None.
- Parameters
nmiFlags: Bit mask of the NMI interrupts that user wants to clear. The bit format of this parameter is same as of the NMIFLG register. These defines are provided:SYSCTL_NMI_NMIINT - Non-maskable interrupt
SYSCTL_NMI_CLOCKFAIL - Clock Failure
SYSCTL_NMI_MEMUNCERR - RAM, ROM Uncorrectable Error
SYSCTL_NMI_FLUNCERR - Uncorrectable Flash error
SYSCTL_NMI_MCANUNCERR -MCAN Uncorrectable Error
SYSCTL_NMI_WWDNMI- CM WWD
SYSCTL_NMI_ECATNMI -EtherCAT reset out
-
uint16_t
SysCtl_getNMIWatchdogCounter(void)¶ Gets the NMI watchdog counter value.
Note: The counter is clocked at the SYSCLKOUT rate.
- Return
Returns the NMI watchdog counter register’s current value.
-
void
SysCtl_setNMIWatchdogPeriod(uint16_t wdPeriod)¶ Sets the NMI watchdog period value.
This function writes to the NMI watchdog period register that holds the value to which the NMI watchdog counter is compared. When the two registers match, a reset is generated. By default, the period is 0xFFFF.
- Parameters
wdPeriod: is the 16-bit value at which a reset is generated.
- Note
If a value smaller than the current counter value is passed into the wdPeriod parameter, a NMIRSn will be forced.
- Return
None.
-
uint16_t
SysCtl_getNMIWatchdogPeriod(void)¶ Gets the NMI watchdog period value.
- Return
Returns the NMI watchdog period register’s current value.
-
uint16_t
SysCtl_getNMIShadowFlagStatus(void)¶ Read NMI Shadow Flags.
Read the current state of individual NMI interrupts
- Return
Value of CMNMISHDFLG register. These defines are provided to decode the value:
SYSCTL_NMI_NMIINT - Non-maskable interrupt
SYSCTL_NMI_CLOCKFAIL - Clock Failure
SYSCTL_NMI_MEMUNCERR - RAM, ROM Uncorrectable Error
SYSCTL_NMI_FLUNCERR - Uncorrectable Flash error
SYSCTL_NMI_MCANUNCERR -MCAN Uncorrectable Error
SYSCTL_NMI_WWDNMI- CM WWD
SYSCTL_NMI_ECATNMI -EtherCAT reset out
-
bool
SysCtl_isNMIShadowFlagSet(uint32_t nmiFlags)¶ Check if the individual NMI shadow flags are set.
Check if interrupt flags corresponding to the passed in bit mask are asserted.
- Parameters
nmiFlags: Bit mask of the NMI interrupts that user wants to clear. The bit format of this parameter is same as of the CMNMIFLG register. These defines are provided:SYSCTL_NMI_NMIINT - Non-maskable interrupt
SYSCTL_NMI_CLOCKFAIL - Clock Failure
SYSCTL_NMI_MEMUNCERR - RAM, ROM Uncorrectable Error
SYSCTL_NMI_FLUNCERR - Uncorrectable Flash error
SYSCTL_NMI_MCANUNCERR -MCAN Uncorrectable Error
SYSCTL_NMI_WWDNMI- CM WWD
SYSCTL_NMI_ECATNMI -EtherCAT reset out
- Return
true if any of the NMI asked for in the parameter bit mask is set. false if none of the NMI requested in the parameter bit mask are set.
-
void
SysCtl_lockAccessControlRegs(uint16_t controlreg)¶ Blocks writes to the CM System control registers
This function locks the configuration registers of CM System Control register.
- Parameters
controlreg: is the Control Register whose access is blocked. SYSCTL_CMECATCTL_LOCK is for the CMECATCTL register
Note: Today only writes to the CMECATCTL register are blocked . Writes to CMECATCTL register is unblocked on reset .
- Return
None.
-
void
SysCtl_sleep(void)¶ Puts the processor into sleep mode.
This function places the processor into sleep mode
- Return
None.
-
void
SysCtl_enableGlobalNMI(void)¶ Enable the Global NMI
This function writes to the NMI configuration register that enables the global NMI.
- Note
Global NMI is disabled on reset
- Return
None.
-
bool
SysCtl_isWatchdogFirstKeyDetectFlagset(void)¶ Check if the Watchdog First Valid Key Detect Flag is set or not.
- Return
true if the First Valid key after non-zero MIN configuration got detected false if the First Valid Key after non-zero MIN configuration has not happened
-
bool
SysCtl_isMCANWakeStatusSet(void)¶ Check if the MCAN wakeup event has occured.
- Return
true if the MCAN wakeup event has occured. false if the MCAN wakeup event has not occured.
-
void
SysCtl_clearMCANWakeStatus(void)¶ Clears the MCAN wakeup event status.
This function clears the MCAN wakeup event status. To check if it was set first, see SysCtl_isMCANWakeStatusSet().
- Return
None.
-
void
SysCtl_delay(uint32_t count)¶ Delays for a fixed number of cycles.
This function generates a constant length delay using assembly code. The loop takes around 6 cycles per iteration plus 9 cycles of overhead.
- Parameters
count: is the number of delay loop iterations to perform.
It is important to note that this function is a fairly accurate timing mechanism. Although the delay loop is deterministic, the execution time of the loop will vary dramatically depending upon the application’s interrupt environment (the loop will be interrupted unless run with interrupts disabled and this is generally an unwise thing to do) and also the current system clock rate and flash timings (wait states and the operation of the prefetch buffer affect the timing).
For best accuracy, a system timer should be used with code either polling for a particular timer value being exceeded or processing the timer interrupt to determine when a particular time period has elapsed.
- Return
None.
-
void
SysCtl_resetPeripheral(SysCtl_PeripheralSOFTPRES peripheral)¶ Resets a peripheral
This function uses the SOFTPRESx registers to reset a specified peripheral. Module registers will be returned to their reset states.
- Parameters
peripheral: is the peripheral to reset.
- Note
This includes registers containing trim values.
- Return
None.
-
void
SysCtl_enablePeripheral(SysCtl_PeripheralPCLOCKCR peripheral)¶ Enables a peripheral.
Peripherals are enabled with this function. At power-up, all peripherals are disabled; they must be enabled in order to operate or respond to register reads/writes.
- Parameters
peripheral: is the peripheral to enable.
- Return
None.
-
void
SysCtl_disablePeripheral(SysCtl_PeripheralPCLOCKCR peripheral)¶ Disables a peripheral.
Peripherals are disabled with this function. Once disabled, they will not operate or respond to register reads/writes.
- Parameters
peripheral: is the peripheral to disable.
- Return
None.
-
void
SysCtl_requestPeripheralClockStop(SysCtl_PeripheralCMCLKSTOPREQ peripheral, uint16_t enable)¶ Request to stop the clock to a Peripheral.
Once set, this bit is cleared either explicitly by passing a 0U to the API or when clock to peripheral is turned on as a result of a wakeup event in hardware
- Parameters
peripheral: is the peripheral to which the Stop clock request is sent.enable: is the value to be written to the Clk stop request register. This can take values of either 1U(enable) or 0U(disable).
- Return
None.
-
bool
SysCtl_isPeripheralClockStopAcked(SysCtl_PeripheralCMCLKSTOPACK peripheral)¶ Check if request to stop the clock to a Peripheral is Acked or Not.
- Return
true if the peripheral acked the Stop clock Request false if peripheral did not ack the Stop clock Request
- Parameters
peripheral: is the peripheral which acked the Stop clock Req or not .
-
uint16_t
SysCtl_getPeripheralClockStop(SysCtl_PeripheralCMCLKSTOPREQ peripheral)¶ Gets the value of the Peripheral clock Stop register.
- Return
Value of CMCLKSTOPREQ register.
- Parameters
peripheral: is the peripheral to which the Stop clock request is sent.
-
Many of the functions provided by the SysCtl API are related to CM configuration. The ability to enable (turn on the module clock), disable (gate off the module clock), and perform a software reset on most of the peripherals on a device is provided by SysCtl_enablePeripheral(), SysCtl_disablePeripheral(), and SysCtl_resetPeripheral() respectively.
The CM’s windowed watchdog is enabled and disabled by SysCtl_enableWatchdog() and SysCtl_disableWatchdog() respectively. The watchdog can be serviced by SysCtl_serviceWatchdog(). Several functions are also provided to configure the watchdog’s clock and windowed functionality.
This section will give further details of these functions and each of the others used for the configuration of SysCtl.
The code for this module is contained in driverlib_cm/sysctl.c, with driverlib_cm/sysctl.h containing the API declarations for use by applications.