1 Reply Latest reply on Oct 10, 2017 11:49 PM by ntan

    DMA Wizard prohibits linking 8-bit SAR ADC to 8-bit VDAC


      The DMA Wizard does not allow linking an 8-bit SAR ADC to an 8-bit VDAC.

      It complains about incompatible burst sizes. The specific error is "The selected Source and Destination have incompatible Burst sizes. No valid size can be selected".


      A minimal example project just containing the three relevant components added to the schematic is attached. This is enough to reproduce the error message. Also attached a screenshot of the error message.


      I suspect this is due to the SAR ADC being permanently stuck in a 16-bit register configuration from the DMA's perspective, even if the component is configured with 8-bit resolution. This means that the DMA configuration assumes a minimum burst size of 2 bytes, even though a burst size of 1 byte should be fine.


      In the DMA section of the SAR ADC datasheet, I see this comment about the ADC_SAR_WRK0_PTR source: "Receive a 2-byte result for a conversion with a result that always has 12-bit resolution." This supports the previous suspicion that the DMA burst size cannot shrink to match the configured 8-bit resolution.


      The DMA Wizard scales the DeltaSigma ADC burst size correctly from 1 to 3 bytes as the resolution changes from 8-bit to 20-bit. The DeltaSigma datasheet also lists these burst sizes as valid lengths of ADC_DelSig_DEC_SAMP_PTR depending on resolution. I'm just surprised that the SAR ADC cannot scale burst width similarly.


      Is this a bug, or just a limitation of the SAR ADC hardware?

      Are there any workaround suggestions besides just using the DeltaSigma ADC instead of the SAR ADC?

      I doubt it's possible to just point the DMA source address to ADC_SAR_WRK0_REG, which contains the relevant 8-bit value.


      I'm thinking one option is to chain a pair of TDs that each read one byte, where the first TD passes the first byte along to the 8-bit VDAC, and the second TD just throws the other byte away.


      I also found these two unresolved threads which encountered the same burst width issue.

      DMA from SAR to VDAC

      Why I am unable to transfer data from ADC_SAR to VDAC8 Via DMA?

        • 1. Re: DMA Wizard prohibits linking 8-bit SAR ADC to 8-bit VDAC

          The burst size of the ADC_SAR component used by the DMA Wizard is described in the DMA Capability file at the directory C:\Program Files (x86)\Cypress\PSoC Creator\4.1\PSoC Creator\psoc\content\CyComponentLibrary\CyComponentLibrary.cylib\ADC_SAR_v3_0\PSoC5\ADC_SAR_v3_0.cydmacap  Following is the content of the file.


            <Category name="SAR_ADC" 
              <Location name="`$INSTANCE_NAME`_SAR_WRK0_PTR" enabled="true" direction="source"/>


          It was found from this file, there is only one "Category" supporting 2-byte burst transfer.  It is available to describe multiple "Category" in a DMA Capability file.  So you can modify the ADC_SAR component to have an additional "Category" supporting 8-bit transfer.  Please refer "7.4 Add/Create DMA Capability File" in the following document.


          PSoC® Creator™ Component Author Guide | Cypress Semiconductor