DMA: 2 descriptors, one trigger

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.
TamirM
Level 2
Level 2
25 sign-ins First like given 10 questions asked

Hi,

I'm trying to apply DMA on ADC.

I would like that the 'eoc' trigger would start 2 transfers: of channel 0, and channel 1.

my code:

DMA_SetSrcAddress(1, (void *)ADC_SAR_SAR_CHAN1_RESULT_PTR);
DMA_SetDstAddress(1, (void *)&currentB);
DMA_ValidateDescriptor(1);

DMA_Start((void *)ADC_SAR_SAR_CHAN0_RESULT_PTR, (void *)&currentA);

 

The problem is that only channel 0 is updating.

if i chain descriptor 0 to descriptor 1 then only channel 1 updates.

what is the correct configuration.

ADC with DMA and descriptors configuration attached

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @TamirM 

 

You can simply connect both drqs to the ADC's EOC pin. That way, both the channels will get triggered simultaneously. I have created a project for the 5888LTI part. Please try this out and let me know if this is the requirement. 

 

Best regards, 
Hari

View solution in original post

0 Likes
2 Replies
lock attach
Attachments are accessible only for community members.
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @TamirM 

 

You can simply connect both drqs to the ADC's EOC pin. That way, both the channels will get triggered simultaneously. I have created a project for the 5888LTI part. Please try this out and let me know if this is the requirement. 

 

Best regards, 
Hari

0 Likes
TamirM
Level 2
Level 2
25 sign-ins First like given 10 questions asked

I wanted to use 1 DMA with 2 descriptors, but this method seems to work as well.

Thanks

0 Likes