Trident IoT SDK
Loading...
Searching...
No Matches
Power Mgmt
Collaboration diagram for Power Mgmt:

Functions

tr_hal_status_t tr_hal_power_enable_clock (tr_hal_clock_t clock)
tr_hal_status_t tr_hal_power_disable_clock (tr_hal_clock_t clock)
tr_hal_status_t tr_hal_power_is_clock_enabled (tr_hal_clock_t clock, bool *is_enabled)
uint32_t tr_hal_power_get_reset_cause (void)
 Get the the Chip reset cuase.

Detailed Description



Function Documentation

◆ tr_hal_power_disable_clock()

tr_hal_status_t tr_hal_power_disable_clock ( tr_hal_clock_t clock)

◆ tr_hal_power_enable_clock()

tr_hal_status_t tr_hal_power_enable_clock ( tr_hal_clock_t clock)

◆ tr_hal_power_get_reset_cause()

uint32_t tr_hal_power_get_reset_cause ( void )

Get the the Chip reset cuase.

Returns
The reset cause is one of the following values. TR_HAL_RESET_REASON_POWER (0x01) Power On Reset reset TR_HAL_RESET_REASON_EXTERNAL_RESET (0x02) Reset Pin reset TR_HAL_RESET_REASON_DEEP_POWER_DOWN (0x04) Deep power down reset TR_HAL_RESET_REASON_DEEP_SLEEP (0x08) Deep sleep reset TR_HAL_RESET_REASON_WATCHDOG (0x10) Watchdog reset TR_HAL_RESET_REASON_SOFTWARE (0x20) Software reset TR_HAL_RESET_REASON_MCU_LOCKUP (0x40) Hardfault reset
Note
On T32CZ20B, the reset cause is stored in retention register 0 (address 0x40005010). This register value is read by the bootloader during system startup.

◆ tr_hal_power_is_clock_enabled()

tr_hal_status_t tr_hal_power_is_clock_enabled ( tr_hal_clock_t clock,
bool * is_enabled )