MKMxxZxxACxx5 Bare Metal Software Drivers  R4.1.6
Reference Manual
RCM Example

This example shows typical use of the Reset Control Module (RCM) module.

Source code:
/******************************************************************************
* (c) Copyright 2010-2015, Freescale Semiconductor Inc.
* ALL RIGHTS RESERVED.
******************************************************************************
* rcm_test.c
******************************************************************************/
#include "drivers.h"
#if defined(__ICCARM__)
#pragma diag_suppress=Pa082
#endif
void main (void)
{
register uint16 tmp16;
/* reset pin filtered in all modes by a filter clocked by LPO */
/* read sources of the most recent reset */
tmp16 = RCM_GetResetSrc();
if (tmp16 & RCM_SACKERR) { NOP(); }
if (tmp16 & RCM_MDM_AP ) { NOP(); }
if (tmp16 & RCM_SW ) { NOP(); }
if (tmp16 & RCM_LOCKUP ) { NOP(); }
if (tmp16 & RCM_POR ) { NOP(); }
if (tmp16 & RCM_PIN ) { NOP(); }
if (tmp16 & RCM_LOL ) { NOP(); }
if (tmp16 & RCM_LOC ) { NOP(); }
if (tmp16 & RCM_LVD ) { NOP(); }
if (tmp16 & RCM_WAKEUP ) { NOP(); }
while(1);
}
Toolchain support:
IAR EWARM 7.40.7CodeWarrior 10.6KEIL uVision 5.15CrossWorks 3.6ATOLLIC TrueStudio 5.3.0Kinetis Design Studio 3.0.0