MPC5744P CTU dual-conversion problem

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

MPC5744P CTU dual-conversion problem

719 Views
hrvojeerjavec
Contributor III

Hello,

I am having a problem with the CTU dual conversion, while having no problems in single conversion.

I have configured the CTU for triggering on PWM reload and I am having dual ADC conversion on a trigger.

(I am also generating the external output trigger for debugging / trigger generation monitoring.)

CTU is setup in triggered mode, where I am using just the first trigger, with one ADC dual conversion command in the list.

I have set the LC in the next command to make this the only command executed.

 

The result are stored in the FIFO0, which has 16 32-bit entries. 

The problem seems to be that when all 16 entries are read from the FIFO, plus 2 more, the values read from the FIFO start to be 0..

The triggers are still generated, according to the external output trigger. FIFO status register reports an overflow and full FIFO.

Error flag register only reports a ERRCMP, which is more like a informative status that the counter reached the value at which it should stop.

 

Can anybody help me on this matter?

Labels (1)
0 Kudos
2 Replies

546 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

The CTU configuration seems to me correct.

However the reading of FIFO is not clear enough to me.

Do you read it when FIFO0 is overflow?

Do you use interrupt or DMA to read FIFO0?

Could you explain me the reading so I will have full picture and can make a test if there is any issue?

Peter

0 Kudos

546 Views
hrvojeerjavec
Contributor III

Ok, it seems I figured. I was reading the values from the FIFO and printing them to the UART, but it was done from the task. I was too slow to remove values from the FIFO, and when the FIFO got full, I read a value, the FIFO got free space for just one reading -> ADC0. When dual conversion occured, just ADC0 value got stored to FIFO and ADC1 value got discarded. So as soon as I pulled 16 readings from the FIFO I was getting values from just one ADC. The reason why they where 0 is because ADC0 pin was not initialized...

Thank you for your help Peter, your mention of interrupt or DMA usage rang the bell.

0 Kudos