LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
LPC17xx/40xx Event Monitor/Recorder example

Detailed Description

Example description
This example describes how to use Event Monitor/Recorder Block to track event occurs on input pins.

After initialize RTC, set the current time for the RTC. When an event occurs on an input channel, an interrupt is generated. The first and last timestamp of the event is printed out.

Special connection requirements
Connect desired event input channel pin to GND/VCC to generate events.
Event Input pins:
Channel Pin EA
0 P0.7 J5.17
1 P0.8 J3.19
2 P0.9 J5.18

Build procedures:
LPC17xx/40xx example quickstart for Keil uVision4
LPC17xx/40xx example quickstart for IAR EWARM
LPC17xx/40xx example quickstart for Code Red Xpresso

Supported boards and board setup:
Embedded Artists' LPC1788 Developer's Kit
Embedded Artists' LPC4088 Developer's Kit

Submitting LPCOpen issues:
Community support for LPCOpen

Functions

static void showTime (IP_RTC_TIME_T *pTime)
 
static void showTimeStamp (RTC_EV_TIMESTAMP_T *pTime)
 
void RTC_IRQHandler (void)
 RTC interrupt handler.
 
int main (void)
 Main entry point.
 

Variables

STATIC volatile bool fIntervalReached
 

Function Documentation

int main ( void  )

Main entry point.

Main program body.

Returns
Nothing

Definition at line 150 of file rtc_ev.c.

void RTC_IRQHandler ( void  )

RTC interrupt handler.

Returns
Nothing

Definition at line 108 of file rtc_ev.c.

static void showTime ( IP_RTC_TIME_T pTime)
static

Definition at line 80 of file rtc_ev.c.

static void showTimeStamp ( RTC_EV_TIMESTAMP_T *  pTime)
static

Definition at line 92 of file rtc_ev.c.

Variable Documentation

STATIC volatile bool fIntervalReached

Definition at line 69 of file rtc_ev.c.