RLP Interrupt


Because I have a very time-critical application, I use Rlp on my Cobra-Board to send Data over DMA to the SPI-BUS.

My Problem is that I want to use an interrupt, that tells me, when the dma is done.
Can someone help me to install that interrupt?
Can I do it with RLPext->Interrupt.Install() and RLPext->Interrupt.Enable() or do I need to programm the interrupt “direktly” without RLP-functions?

Always use RLP extensions if they are available.

Thanks for your answer.

I tried to use the RLP extensions. But I cant make it work. After hours of searching I still dont know what the Peripheral ID at the Cobra-Boards DMA is?

When using RLP, you need the processor user manual from NXP, LPC2478

I read the user manual. But I cant find a Peripheral ID in there. I think that it is the interrupt source at page 116 (0x200 0000). But the Interrupt still doesnt work and I don`t know what the problem is. My only suggestion is that the Peripheral ID is different.

Maybe there is no interrupt for DMA. GHI is available for consulting if you need help in RLP. Please contact GHI directly if interested.

Try with 25 as the interrupt number. Also try other interrupts to make sure the problems isn’t with the DMA controller.

look at http://ics.nxp.com/products/lpc2000/lpc24xx/#Support
and download the “Sample code bundle” it contains a irq.h file with all interrupt numbers. It also contains a dma sample that installs an interrupt handler for DMA.


Thank you for your help.
Now I found my fault. It was the false interrupt numer.

Some one please help me fix my interrupt. Here is my code and the interrupt doesn’t work at all. I am using interrupt on the BL button

#include "C:\Users\Home\CodeLite\LPC23xx_24xxSampleSoftware.r6\Keil\Common\inc\type.h"
 #include "RLP.h"

 #define EINT0_INT		14

unsigned pin;
unsigned state;

void InterruptHandler(void *arg) {
	// change the pin's state
	state = !state;
	RLPext->GPIO.WritePin(pin, state);

int StartLEDBlink(unsigned int *generalArray, void **args, unsigned int argsCount, unsigned int *argSize) {
	pin = *(unsigned char*)args[0];
	state = *(unsigned char*)args[1];

	RLPext->GPIO.EnableOutputMode(pin, state);
	RLPext->Interrupt.Install(EINT0_INT, MyTaskCallback, NULL);

	return 0;

This doesn’t look right. It shouldn’t even compile!

What is MyTaskCallback? RLPext->Interrupt.Install(EINT0_INT, MyTaskCallback, NULL);

Shouldn’t this be? RLPext->Interrupt.Install(EINT0_INT, InterruptHandler , NULL);

Welcome to the community.

Thanx for welcoming me.
Sorry for that error, I changed something when posting it here but it still doesn’t work.

Then you probably have the wrong interrupt number like previous poster did or you are connected to the wrong pin?

Why not use this instead? It is easier GPIO.EnableInterruptInputMode

I appreciate that but when I tried this it still dint work

RLPext->GPIO.EnableInterruptInputMode(0, NULL, InterruptHandler, NULL);

However, the main reason for using interrupt in rlp is not to switch and led on and off. I was trying to attach an interrupt to UART so that I can read serial data from RLP but it turned out that it doesnt attach the interrupt. The code is here below.

int Initialize(unsigned int *generalArray, void **args, unsigned int argsCount, unsigned int *argSize) {
    if (RLPext->magic != RLP_EXT_MAGIC) return FALSE;
    U0IER = IER_RBR | IER_THRE | IER_RLS;	/* Enable UART0 interrupt */

    /* Install interrupt handler */
    if (!RLPext->Interrupt.Install(UART0_INT, InterruptHandler, NULL)) return FALSE;
    return TRUE;

This example should get you started: http://www.tinyclr.com/codeshare/entry/219