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?
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?
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.
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.
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;
}