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.

Questions for TI Employees/CC2541 Programmers SPI DMA CC2541 Functionality

I have some question about how the DMA works when properly configured with SPI for any TI Employees or others that might know.

1. In the documentation it states that any XDATA addressed SFR can be used as a Source Address. Is this the case? So is it valid to use U1DBUF as a source address in the following way:

    dmaConfig0.SRCADDRH  = ((uint16)U1DBUF >> 8) & 0x00FF;
    dmaConfig0.SRCADDRL  = (uint16)U1DBUF & 0x00FF;

2. When setting the trigger to DMA_TRIG_URX1, what specifically does it check for a trigger? It states when receive is complete, or the same RX interrupt that USART uses. So, does this imply that URXIE needs to be set? Or, is it checking some other bit?

 

3. Are there any preprocessor symbols that are not noted in the documentation that are needed for proper SPI DMA functionality?

 

4. At this point I have DMA working as in the TI peripherals example, including using that logic in my program where I just copy from one place in memory to the next using DMA, but when I configure DMA for SPI I no longer get the desired results. Any ideas on what could be causing the URX1 to trigger and for the transfer to complete but when checked all is received is a filled array of 0x80?

 

Here is the link to my previous post if interested:

http://e2e.ti.com/support/wireless_connectivity/f/538/p/368905/1297638.aspx#1297638

  • But have you checked the wiki? http://processors.wiki.ti.com/index.php/CC254x_SPI_Driver_User_Guide

    My link contains source code, illustrations, and steps on how to use the DMA for SPI communication

  • Thanks for the reply Peter, I just found out the issue with my code.

     

    1. The answer to this was what I was missing, for all those that I saw asking DMA SPI questions that never got answered, I saw that they were directly calling U1DBUF.

    You can not do this, you must call the full address for U1DBUF directly and this will work:

       dmaConfig0.SRCADDRH  = ((uint16)0x70F9 >> 8) & 0x00FF;
        dmaConfig0.SRCADDRL  = (uint16)0x70F9 & 0x00FF;

     

    2. Also, make sure that you do not have the URX1IE set otherwise you might see very misleading IDATA overflow problems that cause many hours of going in the complete wrong direction.