| Kinetis SDK v.2.0 API Reference Manual Rev. 0 Freescale Semiconductor, Inc.

- Main Page
- Related Pages
- API Reference

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Files | Data Structures | Enumerations
RCM: Reset Control Module Driver

## Overview

The KSDK provides a Peripheral driver for the Reset Control Module (RCM) module of Kinetis devices.

## Files
file | fsl_rcm.h

## Data Structures
struct | rcm_reset_pin_filter_config_t
| Reset pin filter configuration. More...

## Enumerations
enum | rcm_reset_source_t { kRCM_SourceLvd = RCM_SRS0_LVD_MASK, kRCM_SourceWdog = RCM_SRS0_WDOG_MASK, kRCM_SourcePin = RCM_SRS0_PIN_MASK, kRCM_SourcePor = RCM_SRS0_POR_MASK, kRCM_SourceLockup = RCM_SRS1_LOCKUP_MASK << 8U, kRCM_SourceSw = RCM_SRS1_SW_MASK, kRCM_SourceSackerr = RCM_SRS1_SACKERR_MASK << 8U }
| System Reset Source Name definitions. More...
enum | rcm_run_wait_filter_mode_t { kRCM_FilterDisable = 0U, kRCM_FilterBusClock = 1U, kRCM_FilterLpoClock = 2U }
| Reset pin filter select in Run and Wait modes. More...

## Driver version
#define | FSL_RCM_DRIVER_VERSION (MAKE_VERSION(2, 0, 0))
| RCM driver version 2.0.0. More...

## Reset Control Module APIs
static uint32_t | RCM_GetPreviousResetSources (RCM_Type *base)
| Gets the reset source status which caused a previous reset. More...
void | RCM_ConfigureResetPinFilter (RCM_Type *base, const rcm_reset_pin_filter_config_t *config)
| Configures the reset pin filter. More...

## Data Structure Documentation

struct rcm_reset_pin_filter_config_t

### Data Fields
bool | enableFilterInStop
| Reset pin filter select in stop mode. More...
rcm_run_wait_filter_mode_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::enableFilterInStop

rcm_run_wait_filter_mode_t rcm_reset_pin_filter_config_t::filterInRunWait

uint8_t rcm_reset_pin_filter_config_t::busClockFilterCount

## Macro Definition Documentation

#define FSL_RCM_DRIVER_VERSION (MAKE_VERSION(2, 0, 0))

## Enumeration Type Documentation

enum rcm_reset_source_t

Enumerator
kRCM_SourceLvd | low voltage detect reset
kRCM_SourceWdog | Watchdog reset.
kRCM_SourcePin | External pin reset.
kRCM_SourcePor | Power on reset.
kRCM_SourceLockup | Core lock up reset.
kRCM_SourceSw | Software reset.
kRCM_SourceSackerr | Parameter could get all reset flags.

enum rcm_run_wait_filter_mode_t

Enumerator
kRCM_FilterDisable | All filtering disabled.
kRCM_FilterBusClock | Bus clock filter enabled.
kRCM_FilterLpoClock | LPO clock filter enabled.

## Function Documentation

static uint32_t RCM_GetPreviousResetSources | ( | RCM_Type * | base | ) |
| inline static

This function gets the current reset source status. Use source masks defined in the rcm_reset_source_t to get the desired source status.

Example:

uint32_t resetStatus;
// To get all reset source statuses.
resetStatus = RCM_GetPreviousResetSources(RCM) & kRCM_SourceAll;
// To test whether the MCU is reset using Watchdog.
resetStatus = RCM_GetPreviousResetSources(RCM) & kRCM_SourceWdog;
// To test multiple reset sources.
resetStatus = RCM_GetPreviousResetSources(RCM) & (kRCM_SourceWdog | kRCM_SourcePin);

Parameters

  base | RCM peripheral base address.

Returns
  All reset source status bit map.

void RCM_ConfigureResetPinFilter | ( | RCM_Type * | base,
|  | const rcm_reset_pin_filter_config_t * | config
| ) |  |

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

Parameters

  base | RCM peripheral base address.
  config | Pointer to the configuration structure.