ADC setup for conversion of 2 channels A and B

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

ADC setup for conversion of 2 channels A and B

Jump to solution
897 Views
aroste
Contributor IV

Hi all,

I read many things but still don't know what I can do or not.

In hardware there are to channels that can be set in K60 processor with configuration register ADCx_SC1A and B.

How do I have to setup everything to start a convertion of those 2 channels and get one interruption when both are finisched?

I use tower TWR-K60F120M.

Thanks

stephan

1 Solution
600 Views
aroste
Contributor IV

Hi,

Thanks Jiri, I implemented it with PDB and it works fine. 

Best regards

-stéphan-

View solution in original post

0 Kudos
4 Replies
601 Views
aroste
Contributor IV

Hi,

Thanks Jiri, I implemented it with PDB and it works fine. 

Best regards

-stéphan-

0 Kudos
600 Views
aroste
Contributor IV

Hi,

Thanks for your reply.

I finally succeeded by using one PIT (TimerUnit_LDD PIT_LDVAL0) hardware trigger for channel B and then software trigger on channel A. I tried with PDB and other hardware trigger but without success.

I didn't see before the answer of Jiri Chvatik, I will have a look in the solution he provided to me. 

Thanks

BR

-stéphan-

0 Kudos
600 Views
jch
NXP Employee
NXP Employee

Hi Stephan,

please see also my response from Aug 22, 2013 7:40 AM to your similar issue https://community.freescale.com/message/346113#346113

Thanks

Jiri

600 Views
Petr_H
NXP Employee
NXP Employee

Hi,

The ADCx_SC1A /B configuration registers correspond to two triggering options - channel specified by SC1A is used when trigger A is received and channel from SC1B is used when trigger B is received (it can be either software of hardware trigger). However, there is still only one A/D converter.

To configure it to measure it the way you described , there needs to be used also PDB peripheral to provide the triggers - trigger A first and then trigger B. There should be possible to setup PDB for  back-to-back operation so it would behave the way you have described (measure A and then immediately B).

The  ADC_LDD component does not provide this functionality, but it can be configured using Init_ADC and Init_PDB components.

Do you want to do the triggering periodically ?


best regards

Petr Hradsky

Processor Expert Support Team