pdb triggers adc in s32k144

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

pdb triggers adc in s32k144

Jump to solution
2,023 Views
zhangchun
Contributor III

hello

Ftm0 in s32k144_ PWM triggers PDB0 PDB1 through TRGMUX and pre triggers adc0 adc1. It is expected that by closing the trigger in the adc1 interrupt and reading the conversion results of ADC0 and ADC1, the trigger will be opened in the PDB interrupt, so that the PDB pre triggers ADC continuously in a loop.

Now, there have been PDB error interrupts throughout this process, and ADC interrupts have not been generated. Please help me take a look at the issue

 

Thanks!

 

Labels (1)
0 Kudos
Reply
1 Solution
1,990 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you need to read all ADC results that are triggered/converted. I see 3 channels are triggered, but you read just 2 result registers. In this case lock of pretrigger can happen and error generated.

BR, Petr

View solution in original post

0 Kudos
Reply
4 Replies
1,991 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you need to read all ADC results that are triggered/converted. I see 3 channels are triggered, but you read just 2 result registers. In this case lock of pretrigger can happen and error generated.

BR, Petr

0 Kudos
Reply
1,985 Views
zhangchun
Contributor III
hello

Thank you very much for your reply,

After reading the three ADC channels, it can work normally,

Now I want a PWM cycle to trigger the ADC twice for current sampling. Can this solution be implemented?
0 Kudos
Reply
1,970 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, that is possible. The PDB trigger source selection is implemented through the TRGMUX module, so you can select trigger signal form PWM module (FTM). And then you can set pretrigger delays in PDB to sample channel twice.

BR, Petr

0 Kudos
Reply
1,965 Views
zhangchun
Contributor III

I may not quite understand what you mean. The implementation failed. Can you provide me with an example?

Thanks

0 Kudos
Reply