Triggering DMA after PDB/ADC chain completion

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Triggering DMA after PDB/ADC chain completion

Jump to solution
866 Views
Joey_van_Hummel
Contributor III

Hi all,

I am using an S32K144 (non-W) and have the PDB start a chain of back-to-back conversions at the FTM Init trigger. I want the DMA to trigger after the chain completes. Currently I use the PDB interrupt with a fixed delay, but timing is problematic.

I have checked Example-S32K144-PDB-ADC_backtoback-DMA-ISR-v1_0-S32DS to see how I could trigger the DMA after COCO, however my DMA now triggers at every COCO, not after the chain.

In S32K-RM (v13), ch. 43.3, NXP writes the following.

For most cases, the DMA request can be directly triggered from ADC conversion completion. The device also supports another way to trigger DMA: via the TRGMUX. The TRGMUX will provide user a more flexible DMA triggering scheme using software based on different application requirements, for example, the DMA can be triggered after multiple ADC conversion completion instead of every ADC conversion completion.

This last sentence is exactly what I need, but I don't see how I am supposed to make it work. TRGMUX only receives COCO[0] and COCO[1] from each ADC. Am I supposed to use PDBn_CH0_TRIG or the Pulse Out signal?

Hope you can help on the way.

Kind regards,

Joey

0 Kudos
1 Solution
2 Replies
836 Views
PetrS
NXP TechSupport
NXP TechSupport
831 Views
Joey_van_Hummel
Contributor III
Thank you Petr,

I had used the search method in preparation for my post, but it looks like I didn't use the correct search terms.

It seems like the method I have set up is similar to the second suggestion in your post. The first method looks interesting, but also relies on timing. I was hoping for another (timing agnostic) way to reliably detect multiple conversions complete, but it seems there is no "Chain Complete" flag as such.

I might just set up an ISR on the last ADC channel and do a software trigger of the DMA.

Thank you for your time,

Joey
0 Kudos