1 Reply Latest reply on Jan 11, 2017 3:49 AM by MagnusLundin

    needed help on DMA project

    burakyasin06_1515461

      Hello,

         

      I am trying to do a filtering process on psoc5. I did lots of thing but with small issue I turn back the basic form of the project. I tried to solve problem myself but I couldn't understand the reason of the problem. 

         

      Here I am doing with ping pong dma and send datas to sd card with emfile. When I writing the datas to sdcard I am writing an array after that I am doing a shift operation (just for try to solve problem. I will use the results after.)  Like this code. 

         

      if(TD_Num==DMA_FilterToAvgFilter_TD[1]){
                      FS_Write(pFile, (uint8*)filteredDataP0, (NO_OF_SAMPLES*2));
                      for(c=0;c<NO_OF_SAMPLES;c++){
                          filteredDataP0[c] = filteredDataP0[c] >> 7;
       }

         

      But in graph (you can see in attachments) , I wouldn't think to see shift operation results. But there are. 

         

      Firstly, I thought about the clear the isr flag, but it seems clearly that clear isr isn't needed.

         

      Do you have any idea about the this problem.

         

      Regards

         

      Burak 

        • 1. Re: needed help on DMA project
          MagnusLundin

          I have not had time to load and examine the posted project but:

             

          Perhaps you are shifting the data while the DMA is taking place,  so most of the data will actually be shifted in the filteredDataP0 buffer before it is written by DMA to the sd card.  I am not sure I understand what the basic problem is that you are trying to solve with the shifting operations.