1 Reply Latest reply on Jan 13, 2012 2:55 PM by user_78878863

    20BIT ADC > MEM via DMA. Maximum Transfer Count?

    thomas.schmid

      Dear all,

         

      I am using the DMA to read out the data of the delta sigma ADC and store these values into RAM.

         

      Afterwards I use them to calculate several things. My Code for this task is the same as in the example, the only difference is, that the ADC is running in 17Bit mode (but also has uint32 as a result). I was trying to store more samples into the RAM, so I changed the BUFFER_SIZE to highe values.

         

      Until a buffer size of 512 everything is ok. but when I increase the buffer to 1024 it doesn't work the way I expected. After 544 correct sampled and stored values every value is 0.

         

      Has anyone a solution for this?

         

      Thanks in advance,
      Thomas

        • 1. Re: 20BIT ADC > MEM via DMA. Maximum Transfer Count?
          user_78878863

          I think you hit a limitation of the CyDmaTdSetConfiguration() call: the transferCount cannot exceed 4095 bytes. And when I calculate correctly, you have 4096 there (4 bytes per burst for the uint32, and 1024 values).

             

          OTOH, the documentation says that the DMA won't be configured in such cases, so you shouldn't see any values.

             

          If you hit this limit, you just need to create multiple TDs and chain them together, each for 512 values. (I did this before and could provide sample code).