www.ti.com
PRCM APIs
523
SWRU543–January 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
Power, Reset, and Clock Management
15.3.4 Reset Cause
The application processor restarts its execution from a reset vector after a reset. The application can
determine the cause of the reset using the following API.
unsigned long PRCMSysResetCauseGet(void)
Description: This function acquires the reason for an MCU reset. This is a sticky status.
Parameter: None
Return: Returns the MCU reset cause as one of the following:
• PRCM_POWER_ON: Power-on reset
• PRCM_LPDS_EXIT: Exiting from LPDS
• PRCM_CORE_RESET: Software reset (core only)
• PRCM_MCU_RESET: Software reset (core and associated peripherals)
• PRCM_WDT_RESET: Watchdog reset
• PRCM_SOC_RESET: Software SOC reset
• PRCM_HIB_EXIT: Exiting from hibernate
15.3.5 Clock Control
Individual peripherals can be kept clock-gated or ungated across different power modes. Any access to a
clock-gated peripheral results in a bus fault. The following APIs can control the peripheral clock gating.
void PRCMPeripheralClkEnable(unsigned long ulPeripheral, unsigned long ulClkFlags)
Description: This function ungates the specified peripheral clock and makes the peripheral accessible.
Parameters:
• ulPeripheral: One of the valid peripheral macros (see Section 15.4)
• ulClkFlag: Power mode during which the clock is kept enabled and is bitwise or one or more of the
following:
– PRCM_RUN_MODE_CLK: Ungates clock to the peripheral during run mode.
– PRCM_SLP_MODE_CLK: Keeps the clock ungated during sleep.
– PRCM_DSLP_MODE_CLK: Keeps the clock ungated during deep sleep.
Return: None
void PRCMPeripheralClkDisable(unsigned long ulPeripheral, unsigned long ulClkFlags)
Description: This function gates a specified peripheral clock.
Parameter:
• ulPeripheral: One of the valid peripheral macros (see Section 15.4)
• ulClkFlag: Power mode during which the clock is kept disabled and is bitwise or one or more of the
following:
– PRCM_RUN_MODE_CLK: Gates clock to the peripheral during run mode.
– PRCM_SLP_MODE_CLK: Keeps the clock gated during sleep.
– PRCM_DSLP_MODE_CLK: Keeps the clock gated during deep sleep.
Return: None