Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

The RCM implements the reset functions for the MCU.

RCM HAL driver provides these APIs:

System Reset Source APIs

The function RCM_HAL_GetSrcStatus() checks whether the system is reset by a specific source. For some platforms, there is sticky register for reset source. The function RCM_HAL_GetStickySrcStatus() checks the sticky status and the function RCM_HAL_ClearStickySrcStatus() clears the sticky status.

RESET Pin Filter APIs

The function RCM_HAL_SetResetPinFilterConfig() configures the RESET pin filter, including enable/disable filter, filter selection, and filter width setting.

ROM Boot APIs

The MCU can be configured to boot from ROM forcefully. Use function RCM_HAL_SetForceBootRomSrc() to set the boot source and use function RCM_HAL_GetBootRomSrc() to get the boot source after reset.

Files

file  fsl_rcm_hal.h
 

Data Structures

struct  rcm_reset_pin_filter_config_t
 Reset pin filter configuration. More...
 

Enumerations

enum  rcm_source_names_t {
  kRcmSrcAll = 0U,
  kRcmWakeup = RCM_SRS0_WAKEUP_MASK,
  kRcmLowVoltDetect = RCM_SRS0_LVD_MASK,
  kRcmWatchDog = RCM_SRS0_WDOG_MASK,
  kRcmExternalPin = RCM_SRS0_PIN_MASK,
  kRcmPowerOn = RCM_SRS0_POR_MASK,
  kRcmCoreLockup = RCM_SRS1_LOCKUP_MASK << 8U,
  kRcmSoftware = RCM_SRS1_SW_MASK << 8U,
  kRcmMdmAp = RCM_SRS1_MDM_AP_MASK << 8U,
  kRcmStopModeAckErr = RCM_SRS1_SACKERR_MASK << 8U
}
 System Reset Source Name definitions. More...
 
enum  rcm_filter_run_wait_modes_t {
  kRcmFilterDisabled,
  kRcmFilterBusClk,
  kRcmFilterLpoClk,
  kRcmFilterReserverd
}
 Reset pin filter select in Run and Wait modes. More...
 

Reset Control Module APIs

uint32_t RCM_HAL_GetSrcStatus (RCM_Type *base, uint32_t statusMask)
 Gets the reset source status. More...
 
void RCM_HAL_SetResetPinFilterConfig (RCM_Type *base, rcm_reset_pin_filter_config_t *config)
 Sets the reset pin filter base on configuration. More...
 

Data Structure Documentation

struct rcm_reset_pin_filter_config_t

Data Fields

bool filterInStop
 Reset pin filter select in stop mode. More...
 
rcm_filter_run_wait_modes_t filterInRunWait
 Reset pin filter in run/wait mode. More...
 
uint8_t busClockFilterCount
 Reset pin bus clock filter width. More...
 

Field Documentation

bool rcm_reset_pin_filter_config_t::filterInStop
rcm_filter_run_wait_modes_t rcm_reset_pin_filter_config_t::filterInRunWait
uint8_t rcm_reset_pin_filter_config_t::busClockFilterCount

Enumeration Type Documentation

Enumerator
kRcmSrcAll 

Parameter could get all reset flags.

kRcmWakeup 

Low-leakage wakeup reset.

kRcmLowVoltDetect 

low voltage detect reset

kRcmWatchDog 

Watchdog reset.

kRcmExternalPin 

External pin reset.

kRcmPowerOn 

Power on reset.

kRcmCoreLockup 

Core lockup reset.

kRcmSoftware 

Software reset.

kRcmMdmAp 

MDM-AP system reset.

kRcmStopModeAckErr 

Stop mode ACK error reset.

Enumerator
kRcmFilterDisabled 

All filtering disabled.

kRcmFilterBusClk 

Bus clock filter enabled.

kRcmFilterLpoClk 

LPO clock filter enabled.

kRcmFilterReserverd 

Reserved setting.

Function Documentation

uint32_t RCM_HAL_GetSrcStatus ( RCM_Type *  base,
uint32_t  statusMask 
)

This function gets the current reset source status for a specified source.

Example:

uint32_t resetStatus;
// To get all reset source statuses.
resetStatus = RCM_HAL_GetSrcStatus(RCM, kRcmSrcAll);
// To test whether MCU is reset by watchdog.
resetStatus = RCM_HAL_GetSrcStatus(RCM, kRcmWatchDog);
// To test multiple reset source.
Parameters
baseRegister base address of RCM
statusMaskBit mask for the reset sources to get.
Returns
The reset source status.
void RCM_HAL_SetResetPinFilterConfig ( RCM_Type *  base,
rcm_reset_pin_filter_config_t config 
)

This function sets the reset pin filter, including filter source, filter width, and so on.

Parameters
baseRegister base address of RCM
configPointer to the configuration structure.