MPC5744P ADC Question

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC5744P ADC Question

184 Views
Du_0224
Contributor II

Hi, 

Thank you for looking at my question.

I ran into a problem while trying to debug the ADC function of the MPC5744P.

I set the register values of ADC3 and ADC1 to be the same, but the sampling frequency of ADC3 is much higher than that of ADC1. I configured Normal mode. 

Du_0224_0-1612257845150.png

 

Is it a problem with my clock configuration, or is it something else?

 

Thank you.

Tags (2)
0 Kudos
7 Replies

174 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the same AD_clk clock is used for conversion, so if ADC modules register setting is the same then there should not be a difference.
For your code, set CTR0 register before you start conversion by setting NSTART.
So compare registers in debugger before you finally start conversion using NSTART.

BR, Petr 

0 Kudos

161 Views
Du_0224
Contributor II

Hi,

Thank you for your answer.

I have a small problem now, when I was analyzing the clock tree, the clock PBRIDGEx_CLK has input to the ADC module.I want to know if the four ADC groups are using the same PBRIDGEx_CLK or if PBRIDGE0_CLK/PBRIDGE1_CLK are supplying four different ADCs (0/1/2/3) groups.

image.png

 

Thank you.

Tags (2)
0 Kudos

146 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

ADC1/ADC3 is on PBRIGDE_0 and ADC0/ADC2 on PBRIDGE_1

BR, Petr

0 Kudos

120 Views
Du_0224
Contributor II

Hi, PetrS,

Thank you for your reply.

Now we need a longer sampling period. Now we set CTR0-INPSAMP to the maximum value, but the time is still too fast. We found another way:

We use the scan mode of ADC sampling. When an ADC group initializes multiple channels, the sampling period of the entire ADC group can be extended. So when we use ADC3, we enable channels 0-2 and 10-14 of ADC3. We found that this can also extend the sampling cycle time. But we are using the 144-pin 5744P, the description above in the manual does not have this channel. 

We would like to ask if there are any risks in this approach.

image.png

image.png

Looking forward to your reply.
Thank you.

 

Tags (2)
0 Kudos

89 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if you have same setting for CTR0 register and MCR[ADCLKSEL] then conversion of single channel takes same time on each ADC modules. Check if you have enabled presampling for some channels, compare this between modules.
You should not select reserved channels for conversion.

BR, Petr  

0 Kudos

64 Views
Du_0224
Contributor II

Thank you for your reply.
I switched to FlexPWM_CTU_ADC and it succeeded.
But I have a small question to ask, CTU_TGSISR register where to see what each one corresponding trigger inputs are? I did not find CTU's chip-specific part in the manual.

image.png

Du_0224_0-1614945356871.png

image.png

Thank you again.

0 Kudos

62 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

see chapter 7

PetrS_0-1614950915349.png

BR, Petr