MPC5777c eQADC_A sampling speed

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

MPC5777c eQADC_A sampling speed

926 Views
harshal7
Contributor II

Hi,

We have written code for eQADC_A in mpc5777c and able to achieve sampling rate of 1.2Msps (verified using input sine wave and plotting graph of it). 

In eQADC_A we are using continuous scan method, with software pit3 as trigger source and use of DMA to request data from rfifo to the system memory.

Details:

  • For 25KHz input sine wave 48 samples are getting captured result in 1.2Msps speed, but as we reduce input frequency with same adc configurations, samples captured should be more proportionally. 
  • Example: Input 25KHz, samples captured 48 and for input 10KHz, samples captured are 10 only. same with frequencies of 1KHz and below.

 

What could be the reason behind this? share your opinions. 

Thanks.

Labels (1)
Tags (2)
4 Replies

695 Views
harshal7
Contributor II

Hi,

Details

1. Initialization's:

pastedImage_2.png

pastedImage_3.png

2. Graph plotted: 

1. Input 25KHz Sine wave with offset: 48 samples

pastedImage_6.png

2. Input 20KHz Sine wave with offset: 12 samples with same adc configurations, at the same adc channel.

pastedImage_7.png

This what trying to find the cause/solution to it, what could be the reason?

Thanks,

Harshal

0 Kudos

695 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

It does not make sense too much. Could you post the whole your initialization code?

695 Views
harshal7
Contributor II

Hi David,

/*eQADC initilization*/
EQADC_A.MCR.R = 0x00000000; 

EQADC_A.CFPR[0].R = 0x00800301; 
EQADC_A.CFPR[0].R = 0x82800301; 

EQADC_A.CFCR0.R = 0x0C101C10;

while (EQADC_A.FISR[0].B.EOQFX == 0); 
EQADC_A.FISR[0].R = End_of_Queue_Flag;

EQADC_A.IDCR0.R = 0x33033303;

/*eDMA_init*/
DMA_A.CR.R = 0x0000000C;
DMA_A.EEIH.R = 0x00;
DMA_A.EEIL.R = 0x00;
DMA_A.ERQH.R = 0x00;
DMA_A.ERQL.R = 0x00;

/*pit3_init(void)*/
PIT.MCR.R = 0x00000000;
PIT.TIMER[3].LDVAL.R = 2000; 
PIT.TIMER[3].TFLG.R = 0x00000001;
PIT.TIMER[3].TCTRL.B.TIE = 1;
PIT.TIMER[3].TCTRL.B.TEN = 0;

/*initialize TCD*/

/* PIT3 trigger */
SIU.ISEL5.R = 0x05050000; 
SIU.ISEL4.R = 0x00000505;
EQADC_A.CFCR0.R = 0x00d000d0;
EQADC_A.CFCR1.R = 0x00d000d0;

These are initilization codes and then we reading adc count from Rqueue.

Thanks.

0 Kudos

695 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, could you share some details about the setting? And plots?