3 Replies Latest reply on Jan 30, 2020 9:56 AM by BragadeeshV_41

    Select which DMA block to use

    user_1669321

      Hi,

       

      Is it possible to select which DMA block a certain DMA module will be from?

       

      Right now, I have 2 DMA channels, and I'd like both to operate in parallel. However, since they are from the same DMA block, one channel is blocked by the other.

       

      Thanks,

      Fred

        • 1. Re: Select which DMA block to use
          BragadeeshV_41

          Hi user_1669321,

           

          PSoC Creator:

           

          If you are using PSoC Creator, then you can force the DMA component to be assigned to a particular DMA block and particular DMA channel using a control file. Refer to PSoC Creator help topics on how to add a control file to your design.

           

          On PSoC 6 devices, channels are spread across multiple controllers; however, this is still specified in the directive as a single channel id. To force placement to controller C, channel N, use the following:

          channel_id = C * channels_per_controller + N

           

          To find channels_per_controller, look at the value of CPUSS_DW_CH_NR in the PDL series_config.h file (e.g., psoc63_config.h) for your device.

           

          The example control file line for DMA is:

          attribute placement_force of \txDma:DW\ : label is "DMA(0,7)";

          attribute placement_force of \rxDma:DW\ : label is "DMA(0,21)";

          It places the txDma Component into the DMA block 0, channel 7. (channel id = 0 * 16 + 7).

          It places the rxDma Component into the DMA block 1, channel 5 (channel id = 1 * 16 + 5)

           

          Before control file:

          Here txDma and rxDma are two DMA component instances.

           

           

          After control file:

           

           

          ModusToolBox 2.0

           

          If you are using MTB 2.0, then you can choose the individual DMA block for your channels directly using the DMA tab in the Device configurator

           

          Hope this helps!

           

          Regards,

          Bragadeesh

          1 of 1 people found this helpful
          • 2. Re: Select which DMA block to use
            user_1669321

            Thanks Bragadeesh, it works!

             

            I had to google <psoc "control file"> to be redirected to PSoC Creator's user guide and find what is a control file and how to create one, but that was really quick.

            • 3. Re: Select which DMA block to use
              BragadeeshV_41

              Hi user_1669321,

               

              Alternatively, you can Open PSoC Creator , Help - > PSoC Creator Help Topics (or) Help -> Documentation -> PSoC Creator User Guide.

               

              Regards,

              Bragadeesh