pdb triggers adc in s32k144

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

pdb triggers adc in s32k144

ソリューションへジャンプ
2,145件の閲覧回数
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!

 

ラベル(1)
0 件の賞賛
返信
1 解決策
2,112件の閲覧回数
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 件の賞賛
返信
4 返答(返信)
2,113件の閲覧回数
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 件の賞賛
返信
2,107件の閲覧回数
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 件の賞賛
返信
2,092件の閲覧回数
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 件の賞賛
返信
2,087件の閲覧回数
zhangchun
Contributor III

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

Thanks

0 件の賞賛
返信