MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
RCM: Reset Control Module Driver

Data Structures

struct  rcm_version_id_t
 IP version ID definition. More...
 
struct  rcm_reset_pin_filter_config_t
 Reset pin filter configuration. More...
 

Enumerations

enum  rcm_reset_source_t {
  kRCM_SourceWakeup = RCM_SRS_WAKEUP_MASK,
  kRCM_SourceLvd = RCM_SRS_LVD_MASK,
  kRCM_SourceLoc = RCM_SRS_LOC_MASK,
  kRCM_SourceLol = RCM_SRS_LOL_MASK,
  kRCM_SourceWdog = RCM_SRS_WDOG_MASK,
  kRCM_SourcePin = RCM_SRS_PIN_MASK,
  kRCM_SourcePor = RCM_SRS_POR_MASK,
  kRCM_SourceLockup = RCM_SRS_LOCKUP_MASK,
  kRCM_SourceSw = RCM_SRS_SW_MASK,
  kRCM_SourceMdmap = RCM_SRS_MDM_AP_MASK,
  kRCM_SourceSackerr = RCM_SRS_SACKERR_MASK
}
 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...
 
enum  rcm_boot_rom_config_t {
  kRCM_BootFlash = 0U,
  kRCM_BootRomCfg0 = 1U,
  kRCM_BootRomFopt = 2U,
  kRCM_BootRomBoth = 3U
}
 Boot from ROM configuration. More...
 
enum  rcm_reset_delay_t {
  kRCM_ResetDelay8Lpo = 0U,
  kRCM_ResetDelay32Lpo = 1U,
  kRCM_ResetDelay128Lpo = 2U,
  kRCM_ResetDelay512Lpo = 3U
}
 Maximum delay time from interrupt asserts to system reset. More...
 
enum  rcm_interrupt_enable_t {
  kRCM_IntNone = 0U,
  kRCM_IntLossOfClk = RCM_SRIE_LOC_MASK,
  kRCM_IntLossOfLock = RCM_SRIE_LOL_MASK,
  kRCM_IntWatchDog = RCM_SRIE_WDOG_MASK,
  kRCM_IntExternalPin = RCM_SRIE_PIN_MASK,
  kRCM_IntGlobal = RCM_SRIE_GIE_MASK,
  kRCM_IntCoreLockup = RCM_SRIE_LOCKUP_MASK,
  kRCM_IntSoftware = RCM_SRIE_SW_MASK,
  kRCM_IntStopModeAckErr = RCM_SRIE_SACKERR_MASK,
  kRCM_IntAll
}
 System reset interrupt enable bit definitions. More...
 

Driver version

#define FSL_RCM_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))
 RCM driver version 2.0.3. More...
 

Reset Control Module APIs

static void RCM_GetVersionId (RCM_Type *base, rcm_version_id_t *versionId)
 Gets the RCM version ID. More...
 
static uint32_t RCM_GetResetSourceImplementedStatus (RCM_Type *base)
 Gets the reset source implemented status. More...
 
static uint32_t RCM_GetPreviousResetSources (RCM_Type *base)
 Gets the reset source status which caused a previous reset. More...
 
static uint32_t RCM_GetStickyResetSources (RCM_Type *base)
 Gets the sticky reset source status. More...
 
static void RCM_ClearStickyResetSources (RCM_Type *base, uint32_t sourceMasks)
 Clears the sticky reset source status. More...
 
void RCM_ConfigureResetPinFilter (RCM_Type *base, const rcm_reset_pin_filter_config_t *config)
 Configures the reset pin filter. More...
 
static rcm_boot_rom_config_t RCM_GetBootRomSource (RCM_Type *base)
 Gets the ROM boot source. More...
 
static void RCM_ClearBootRomSource (RCM_Type *base)
 Clears the ROM boot source flag. More...
 
void RCM_SetForceBootRomSource (RCM_Type *base, rcm_boot_rom_config_t config)
 Forces the boot from ROM. More...
 
static void RCM_SetSystemResetInterruptConfig (RCM_Type *base, uint32_t intMask, rcm_reset_delay_t delay)
 Sets the system reset interrupt configuration. More...
 

Detailed Description

The MCUXpresso SDK provides a peripheral driver for the Reset Control Module (RCM) module of MCUXpresso SDK devices.


Data Structure Documentation

struct rcm_version_id_t

Data Fields

uint16_t feature
 Feature Specification Number. More...
 
uint8_t minor
 Minor version number. More...
 
uint8_t major
 Major version number. More...
 

Field Documentation

uint16_t rcm_version_id_t::feature
uint8_t rcm_version_id_t::minor
uint8_t rcm_version_id_t::major
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, 3))

Enumeration Type Documentation

Enumerator
kRCM_SourceWakeup 

Low-leakage wakeup reset.

kRCM_SourceLvd 

Low-voltage detect reset.

kRCM_SourceLoc 

Loss of clock reset.

kRCM_SourceLol 

Loss of lock 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_SourceMdmap 

MDM-AP system reset.

kRCM_SourceSackerr 

Parameter could get all reset flags.

Enumerator
kRCM_FilterDisable 

All filtering disabled.

kRCM_FilterBusClock 

Bus clock filter enabled.

kRCM_FilterLpoClock 

LPO clock filter enabled.

Enumerator
kRCM_BootFlash 

Boot from flash.

kRCM_BootRomCfg0 

Boot from boot ROM due to BOOTCFG0.

kRCM_BootRomFopt 

Boot from boot ROM due to FOPT[7].

kRCM_BootRomBoth 

Boot from boot ROM due to both BOOTCFG0 and FOPT[7].

Enumerator
kRCM_ResetDelay8Lpo 

Delay 8 LPO cycles.

kRCM_ResetDelay32Lpo 

Delay 32 LPO cycles.

kRCM_ResetDelay128Lpo 

Delay 128 LPO cycles.

kRCM_ResetDelay512Lpo 

Delay 512 LPO cycles.

Enumerator
kRCM_IntNone 

No interrupt enabled.

kRCM_IntLossOfClk 

Loss of clock interrupt.

kRCM_IntLossOfLock 

Loss of lock interrupt.

kRCM_IntWatchDog 

Watch dog interrupt.

kRCM_IntExternalPin 

External pin interrupt.

kRCM_IntGlobal 

Global interrupts.

kRCM_IntCoreLockup 

Core lock up interrupt.

kRCM_IntSoftware 

software interrupt

kRCM_IntStopModeAckErr 

Stop mode ACK error interrupt.

kRCM_IntAll 

Enable all interrupts.

Function Documentation

static void RCM_GetVersionId ( RCM_Type *  base,
rcm_version_id_t versionId 
)
inlinestatic

This function gets the RCM version ID including the major version number, the minor version number, and the feature specification number.

Parameters
baseRCM peripheral base address.
versionIdPointer to the version ID structure.
static uint32_t RCM_GetResetSourceImplementedStatus ( RCM_Type *  base)
inlinestatic

This function gets the RCM parameter that indicates whether the corresponding reset source is implemented. Use source masks defined in the rcm_reset_source_t to get the desired source status.

This is an example.

* uint32_t status;
*
* To test whether the MCU is reset using Watchdog.
*
Parameters
baseRCM peripheral base address.
Returns
All reset source implemented status bit map.
static uint32_t RCM_GetPreviousResetSources ( RCM_Type *  base)
inlinestatic

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

This is an 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.
*
* To test multiple reset sources.
*
Parameters
baseRCM peripheral base address.
Returns
All reset source status bit map.
static uint32_t RCM_GetStickyResetSources ( RCM_Type *  base)
inlinestatic

This function gets the current reset source status that has not been cleared by software for a specific source.

This is an example.

* uint32_t resetStatus;
*
* To get all reset source statuses.
* resetStatus = RCM_GetStickyResetSources(RCM) & kRCM_SourceAll;
*
* To test whether the MCU is reset using Watchdog.
*
* To test multiple reset sources.
*
Parameters
baseRCM peripheral base address.
Returns
All reset source status bit map.
static void RCM_ClearStickyResetSources ( RCM_Type *  base,
uint32_t  sourceMasks 
)
inlinestatic

This function clears the sticky system reset flags indicated by source masks.

This is an example.

* Clears multiple reset sources.
*
Parameters
baseRCM peripheral base address.
sourceMasksreset 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
baseRCM peripheral base address.
configPointer to the configuration structure.
static rcm_boot_rom_config_t RCM_GetBootRomSource ( RCM_Type *  base)
inlinestatic

This function gets the ROM boot source during the last chip reset.

Parameters
baseRCM peripheral base address.
Returns
The ROM boot source.
static void RCM_ClearBootRomSource ( RCM_Type *  base)
inlinestatic

This function clears the ROM boot source flag.

Parameters
baseRegister base address of RCM
void RCM_SetForceBootRomSource ( RCM_Type *  base,
rcm_boot_rom_config_t  config 
)

This function forces booting from ROM during all subsequent system resets.

Parameters
baseRCM peripheral base address.
configBoot configuration.
static void RCM_SetSystemResetInterruptConfig ( RCM_Type *  base,
uint32_t  intMask,
rcm_reset_delay_t  delay 
)
inlinestatic

For a graceful shut down, the RCM supports delaying the assertion of the system reset for a period of time when the reset interrupt is generated. This function can be used to enable the interrupt and the delay period. The interrupts are passed in as bit mask. See rcm_int_t for details. For example, to delay a reset for 512 LPO cycles after the WDOG timeout or loss-of-clock occurs, configure as follows: RCM_SetSystemResetInterruptConfig(kRCM_IntWatchDog | kRCM_IntLossOfClk, kRCM_ResetDelay512Lpo);

Parameters
baseRCM peripheral base address.
intMaskBit mask of the system reset interrupts to enable. See rcm_interrupt_enable_t for details.
DelayBit mask of the system reset interrupts to enable.