Hello,
I have problems getting a DMA interrupt setup. I am developping in eclipse in combination with the SDCC compiler.
The problem that I have is that I want to receive packets with variable lengths but the devices that send the packages have the length byte in the second byte after the sync word instead of the first byte.
I came accross this post with the solution to this problem:
http://e2e.ti.com/support/low_power_rf/f/155/p/83997/289501.aspx
Now I am trying to setup the receiver that the first time the dma will read only 2 bytes thus I can get the length of the rest from the package from the second byte. The problem is that I don't seem to get the DMA interrupt.
I have enabled the DMA interrupt as follows:
IEN1 |= DMAIE;
I have the following options configured:
VLEN = 0 // use fixed length
LEN = 0x02 // fixed length of 2 bytes
WORDSIZE = 0 // byte
TMODE = 0 // single
TRIGGER = 19 // radio trigger
SRCINC = 0
DSTINC = 1 // increment 1 byte
IRQMASK = 1 //enable interrupt
M8 = 0 // use all 8 bits
PRIORITY = 1 // normal
For the interrupt I have defined the following function:
void dmaIntHandler(void) interrupt DMA_VECTOR;
In this function I have tried to put a LED on or try to enable a variable and look in the main program if it was set, but both with no effect.
Am I missing/misconfigured something in order to get the interrupt?
Regards,
Gerard