6 ADC's Channels using PDB/Frdm-k64/SDK 2.2

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

6 ADC's Channels using PDB/Frdm-k64/SDK 2.2

跳至解决方案
1,273 次查看
jordangarcia
Contributor II

Hi:

Is there any way for reading 6 ADC´s channels (3 per ADC) using a PDB module?

I know the k64 has only 4 pretriggers (2 per PDB channel) and that we're able to read 4 analog inputs using back-to-back mode, but is there a form to read 6 analog inputs using this mode?

Is there any possibility to do it or is it better to choose another micro?

Best Regards:

Jordan Garcia 

标记 (3)
0 项奖励
回复
1 解答
1,100 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jordan,

You are right, the K64 has two ADC modules, PDB has two channels to trigger ADC, each ADC module has Ping-pong mode, in other words, you can sample 4 ADC channels if you use PDB to trigger two ADC modules as you have done.

If you want to sample 6 ADC channels, as a workaround with K64, you can use hardware trigger mode of PDB plus ADC as you have done, in the ISR of ADC, you can read ADCx_RA, ADCx_RB of both ADC module firstly, then change the ADC in software trigging mode, start both ADC to sample by writting ADC0_SC1A/ADC1_SC1A to sample another two channels, poll the status register, read samples, recover to hardware trigger mode.

As an alternative, you can change another Kinetis processor which can meet your requirement.

Hope it can help you

BR

Xiangjun Rong

在原帖中查看解决方案

1 回复
1,101 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jordan,

You are right, the K64 has two ADC modules, PDB has two channels to trigger ADC, each ADC module has Ping-pong mode, in other words, you can sample 4 ADC channels if you use PDB to trigger two ADC modules as you have done.

If you want to sample 6 ADC channels, as a workaround with K64, you can use hardware trigger mode of PDB plus ADC as you have done, in the ISR of ADC, you can read ADCx_RA, ADCx_RB of both ADC module firstly, then change the ADC in software trigging mode, start both ADC to sample by writting ADC0_SC1A/ADC1_SC1A to sample another two channels, poll the status register, read samples, recover to hardware trigger mode.

As an alternative, you can change another Kinetis processor which can meet your requirement.

Hope it can help you

BR

Xiangjun Rong