Hello,
I am using a microcontroller model MPC5675 controller. For analog acquisition, I use CTU (Cross-Triggering Unit), and the state variables are obtained through the following peripherals: ADC. The CTU receives incoming input signals from ADC.
The ADC commands list registers (CLRx) provide 8 commands. When CMS = 0, CLRx is in single conversion mode.
FIFO=0-7, that is, 8 channel buffers correspond to 8 CTU acquisition commands, and CH is ADC unit channel number. When I used CTU's ADC to acquire analog quantities, I found a problem in the CTU initialization program. When I used 4 ADC unit channels and 6 ADC unit channels, the signal quality would be very different. Compared with 4, the analog quantity will jump during the acquisition process, and the erroneous data will appear obviously. The following is the program I initialized by CTU:
When I use 4 ADC unit channels, the analog quantities collected are as follows:
When I use 6 ADC unit channels, the analog quantities collected are as follows:
The difference between 4 and 6 ADC unit channel images is that there will be hopping data in one cycle, as shown in the following figure:
hopping data
I think these error points have something to do with my program.Maybe some registers of CTU of MCU are not set. May I ask why?
thank you!
hi,
sorry to trouble you
when i study the module CTU,there is a Commands List Register A for ADC single-conversion mode commands (CTU_CLR_A_n)
the 10 bit "SU" is the ADC port A/B sellection.
Can you tell me the difference between the ADC port A and ADC port B.
any help will be appreciated,
thank you very much.
best regards
hao
Hi,
From your screenshots is obvious that your measurement in case of 6 ADC channels is delayed against measured signal.
It looks like your CTU is not set for the values you load into it.
Make sure that GRE and all necessary bits are set to lead new values into CTU compare registers.
Please have a look at reference manual :
another thing which comes to my mind is that there is conflict of trigger signals. I can see you are using 2 sources Ext_trigger and ETimer trigger.
If you can share the binary of the project I can test it here to see where exactly the issue is.
regards,
Peter