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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
YaIs_283501
Level 3
Level 3
First like given

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.

0 Likes
1 Solution
3 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received
0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Yasuki san,

Please check the first AppNote Ankita has attached. In section 6 Modifying TD dynamically there are two methods. Using Indexed/Nested DMA, you can update the transfer count parameter to achieve dynamic update of TD.

Could you elaborate more about your concern over DMA and ADC timing ?

Best Regards,
VSRS

0 Likes

Thank you for the information. I will study.

0 Likes