This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RFTXRX interrupt do not set on Keil and CC2510!

Other Parts Discussed in Thread: CC2510

I can not transmit any packet because RFTXRX flag is not set. I am working on Keil and CC2510 minikit. I know that it is quite hard to program on Keil instead of IAR, I try to write the code by myself. In this problem I have to do sth with Keil compiler, don't I? the flow of program stop at checking RFTXRX and nothing happen. I used example code on this forum but it did not help. Pls help me!

Here is my code:

TX:

RFST = RFST_STX;
while (1) {
i=0;
RFTXRXIE = 1;
EA = 1;

//DMAARM |= DMAARM_CHANNEL0; // Arm DMA channel 0

while(i < 17) {
while(flag!=1)
flag =0;
RFD = radioPktBuffer[i++];
delay(2000);
}
//P1_0 ^= 1;

}

RX:

RFST = RFST_SRX; // Switch radio to RX
while (TRUE) {
i = 0;


rPktBuffer[i++]=RFD;
delay(2000);

rPktBuffer[i++]=RFD;
delay(2000);

rPktBuffer[i++]=RFD;
delay(2000);

rPktBuffer[i++]=RFD;
delay(2000);
P1_0 = rPktBuffer[3]&0x01;
}
}

  • Hi everybody!

    Now I partly solve the problem. I think the CC2510 linker file in Keil is not suitable anymore. I tried some alternative method in order to let program fire interrupt, and I did it. I think just in my case, I use data type for my variables, and add value to RFD inside the interrupt. SO that I can receive and transmit packet completly. But I just wonder did I do it wrong. 

    And Is there any different method to fix the interrupt do not fire problem in Keil. Can we remap the memory in Keil for CC2510 by ourselves?

  • Nguyen,

    Could you possibly post this code? I am having trouble getting my transmitter to transmit as well and I am getting caught up by packetSentFlag.

  • If any one is interested. To fix the DMA problems in the per_test code for compilers that are not IAR:
    1. Open per_test_dma.h
    2. Remove the "#pramgabitfield =" lines
    3. Change the struct to:

    typedef struct {
    uint8 srcAddrH;
    uint8 srcAddrL;
    uint8 destAddrH;
    uint8 destAddrL;
    uint8 lenH : 5;
    uint8 vlen : 3;
    uint8 lenL : 8;

    uint8 trig : 5;
    uint8 tMode : 2;
    uint8 wordSize : 1;

    uint8 priority : 2;
    uint8 m8 : 1;
    uint8 irqMask : 1;
    uint8 destInc : 2;
    uint8 srcInc : 2;
    } DMA_DESC;

    It took me a while to realize what exactly the #pragma was even doing, but with a little help from different forums (e2e.ti.com/.../16922) I realized it was changing the order of the bits in the bytes, not the order of the bytes themselves.