3 Replies Latest reply on May 28, 2018 6:18 PM by user_202566985

    It is a question about how to set the number of DMA transfers

    user_202566985

      I added a TD by modifying the project file attached with AN 61102.

      I will attach a modified project file.

      The attached project file was created using Creator 4.2 so that it works with CY8CKIT-050B.

       

      When you press SW2 of CY8CKIT-050B once, 20bit AD conversion value is stored in the buffer of ADC_sample continuously

      In this project file, TD 0 to TD 7 sets the number of transfers to 50 times × 4 respectively.

       

      I wanted to dynamically change the number of TD transfers and made a modification like the attached image.

      But it seems that the DMA interrupt is synchronized with the ADC conversion interrupt as the operation.

       

      How can I fix it if I want to dynamically change the number of DMA transfers?

      test_code.jpg

       

      There was a mistake in main.c.

      Attach the corrected main.c.