![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
Example description
The MRT example demonstrates using the Multi-Rate Timer API functions. This example configures the MRT using the GetIdleChannel function to initialize a timer channel. If a timer channel is not available because all channels are in-use, the RED LED is illuminated. Otherwise, a timer channel is configured as a one-shot timer with a pseudo-random value. Every pass through the MRT Interrupt Handler toggles a LED, while another LED is toggled on every SysTick.
Special connection requirements
There are no special connection requirements for this example.
Build procedures:
LPC8xx example quickstart for IAR EWARM
LPC8xx example quickstart for Keil uVision4
LPC8xx example quickstart for Code Red Xpresso
Supported boards and board setup:
NXP Xpresso LPC812 board
Submitting LPCOpen issues:
Community support for LPCOpen
Macros | |
| #define | TICKRATE_HZ (10) /* 10 ticks per second */ |
| #define | RNG_MULTI (69069) |
| #define | NO_LO_BITS(x) (x >> 8) |
Functions | |
| static uint32_t | RAND (void) |
| void | SysTick_Handler (void) |
| Handle interrupt from SysTick timer. | |
| void | MRT_IRQHandler (void) |
| Handle interrupt from MRT. | |
| int | main (void) |
| MRT example main function. | |
Variables | |
| static uint32_t | rng = 1234UL |
| int main | ( | void | ) |
| void MRT_IRQHandler | ( | void | ) |
| void SysTick_Handler | ( | void | ) |