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.

Dma transfer on cc2511

Other Parts Discussed in Thread: CC2511

Hii,

i am trying to transfer the  the radio buffer array to Radio register RFD using DMA , i am using the sample code from  PER Test ,but when i try to debug the code, i dont seee any  Transfer of data  in the  xdata memory and not able to transfer the packet via wireless.

 

I have attache the cod for more Clarity

void dmaRadioSetup(BYTE mode)
{
    // Some configuration that are common for both TX and RX:

    // CPU has priority over DMA
    // Use 8 bits for transfer count
    // No DMA interrupt when done
    // DMA triggers on radio
    // Single transfer per trigger.
    // One byte is transferred each time.
    dmaConfig.PRIORITY       = DMA_PRI_LOW;
    dmaConfig.M8             = DMA_M8_USE_8_BITS;
    dmaConfig.IRQMASK        = DMA_IRQMASK_DISABLE;
    dmaConfig.TRIG           = DMA_TRIG_RADIO;
    dmaConfig.TMODE          = DMA_TMODE_SINGLE;
    dmaConfig.WORDSIZE       = DMA_WORDSIZE_BYTE;

    if (mode == RADIO_MODE_TX) {
        // Transmitter specific DMA settings

        // Source: radioPktBuffer
        // Destination: RFD register
        // Use the first byte read + 1
        // Sets the maximum transfer count allowed (length byte + data)
        // Data source address is incremented by 1 byte
        // Destination address is constant
        SET_WORD(dmaConfig.SRCADDRH, dmaConfig.SRCADDRL, radioPktBuffer);
        SET_WORD(dmaConfig.DESTADDRH, dmaConfig.DESTADDRL, &X_RFD);
        dmaConfig.VLEN           = DMA_VLEN_FIRST_BYTE_P_1;
        SET_WORD(dmaConfig.LENH, dmaConfig.LENL, (PACKET_LENGTH + 1));
        dmaConfig.SRCINC         = DMA_SRCINC_1;
        dmaConfig.DESTINC        = DMA_DESTINC_0;

    }

please let me know how could i proceed for cc2511.

 

Thanks in advance

 

 

 

 

  • How are you debugging?

    Are you trying to send from one CC2510EM and receive with SmartRFStudio?

    Have you made sure that you have loaded data in the radioPktBuffer? Look at the array while you run the code to make sure it has data.

  • i am using IAR emmbeded workbech ,c-spy debuger ,dowload and debug.

    I am trying to send the data from CC2511 as transmitter , and  receive with smatRFStudio...

    before i ARM the DMA  i load the data in radiopktBuffer , when i debug i see the data in radioPktBuffer array but it not seen in XDATA memory ie  at source address and it not moved to RFD register. 

     

    Please let me know what could be the issue

     

  • Hello,

    I don't think you can see the data in RFD through the debugger as this is a special register used to access the TXFIFO and RXFIFO. I would suggest you try to set up the link without using DMA first to verify taht your link is working, then i set up a simple internal DMA transfer to verify it works.