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

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

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

Jump to solution
704 Views
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 

Tags (3)
0 Kudos
1 Solution
531 Views
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

View solution in original post

1 Reply
532 Views
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