Need ADC Code For MPC5674f

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

Need ADC Code For MPC5674f

Jump to solution
1,626 Views
natarajmani
Contributor III

Hi friend,

 

i am going to use EQADC with MPC5674f...i referred reference manual..but i am not getting full details about Continuous scan mode ..so i want to know how to configure Single scan mode and Continuous scan mode for MPC5674f and i need ADC Code for Single scan mode and Continuous scan mode using MPC5674f ..i referred following link which is not satisfied ..http://cache.freescale.com/files/32bit/doc/app_note/AN2865.pdf?fasp=1 ..

Labels (1)
1 Solution
889 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I have just posted updated version of mentioned examples:

Example MPC5674F eQADC+eDMA Single_Scan CW210

Example MPC5674F eQADC+eDMA Continuous_Scan CW210

Streaming mode example I will add early.

View solution in original post

5 Replies
889 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi guys, I have just added example code for streaming mode as promised:

Example MPC5674F eQADC-Streaming Mode CW210

0 Kudos
890 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I have just posted updated version of mentioned examples:

Example MPC5674F eQADC+eDMA Single_Scan CW210

Example MPC5674F eQADC+eDMA Continuous_Scan CW210

Streaming mode example I will add early.

889 Views
natarajmani
Contributor III

Thank you friend,,,what will be the main difference between normal and streaming mode...what is use of time base counter ,Red Line Client Configuration Register for EQADC,..could you please send me step by step procedure to convert the Analog signal...

0 Kudos
889 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I am attaching 2 example codes, one for single scan, second for continuous scan.

Regarding streaming mode, I don’t have prepared example at this moment.

Some info to STREAMING MODE:

Streaming mode is new feature of eQADC that wasn’t present in preceding devices (MCP55xx) and its intention is just to reduce a need of DMA data transfers when short sequences is needed to convert repeatedly. The key point is that streaming mode cause lock of commands in CFIFO between REP and PAUSE, in normal mode commands are invalidated after its execution and so must by fed by DMA (or core) again and again.

For this there are 3 new fields in CFCR[0]:

CFEEE0 - enlarges CFIFO0 to 8 entries

STRME0 - enables streaming mode

AMODE0 - operation mode for advance mode

If streaming mode is enabled, PAUSE exiting causes returning to REPEAT pointer in case advance trigger haven’t occurred, or continuance to next entry in case advance trigger have occurred.

Let’s have following command queue -

uint32_t CQueue_0[] =

{

    ( CHANNEL(1)  | B0 | MESSAGE_TAG(RFIFO0)         ),

    ( CHANNEL(2)  | B1 | MESSAGE_TAG(RFIFO0)         ),

    ( CHANNEL(3)  | B0 | MESSAGE_TAG(RFIFO0) | REP   ),

    ( CHANNEL(4)  | B1 | MESSAGE_TAG(RFIFO0)         ),

    ( CHANNEL(5)  | B0 | MESSAGE_TAG(RFIFO0)         ),

    ( CHANNEL(6)  | B1 | MESSAGE_TAG(RFIFO0) | PAUSE ),

    ( CHANNEL(7)  | B0 | MESSAGE_TAG(RFIFO0)         ),

    ( CHANNEL(8)  | B1 | MESSAGE_TAG(RFIFO0)         ),

    ( CHANNEL(9)  | B0 | MESSAGE_TAG(RFIFO0) | EOQ   )

};

Red marked commands will be executed in loop until advance trigger occurs. Blue marked command will be executed after advance trigger.

Important note: Streaming mode is only available on eQADC_B on MPC5674F device.

889 Views
natarajmani
Contributor III

hi friend,

Thank you so much..i have more doubt on streaming mode operation..so i need more explanation about streaming mode..where can we use streaming mode..what will be the main difference between normal and streaming mode..say any example ..and send some sample code for streaming mode operation .what is use of time base counter ,Red Line Client Configuration Register for EQADC, please do the needful as soon as possible..

0 Kudos