pdb triggers adc in s32k144

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

pdb triggers adc in s32k144

跳至解决方案
2,021 次查看
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 解答
1,988 次查看
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 回复数
1,989 次查看
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 项奖励
回复
1,983 次查看
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 项奖励
回复
1,968 次查看
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 项奖励
回复
1,963 次查看
zhangchun
Contributor III

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

Thanks

0 项奖励
回复