Hello Mike,
Recently was released the SDK for the LPC824. I modified the example mrt_example provided in the SDK to toggle the pin P0_20 on each MRT interrupt, and everything worked perfect.
Here are the changes that I made to the example. Before entering the infinite loop I configured the pin P0_20 as follows:
gpio_pin_config_t pin_config = {
kGPIO_DigitalOutput, 0,
};
GPIO_PortInit(GPIO, 0);
GPIO_PinInit(GPIO, 0, 20, &pin_config);
In the infinite loop inside the if statement I added the line to toggle the pin:
while (true)
{
if (true == mrtIsrFlag)
{
PRINTF("\r\n Channel No.0 interrupt is occured !");
APP_LED_TOGGLE;
GPIO_PortToggle(GPIO, 0, 1u << 20);
mrtIsrFlag = false;
}
}
It's important that you add the following include into the example:
#include "fsl_gpio.h"
Hope it helps!
Victor.
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------