CTU Interrupt MPC5643L

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

CTU Interrupt MPC5643L

Jump to solution
895 Views
tommaaß
Contributor I

Hi,

 

I try to implement a current messuring for an ac inductive motor by using the CTU to store the adc results in FIFO0. So for the adc results i enable Trigger0 and T0_ADCE at THCR1 register to start adc list with Trigger0. I also have programmed the adc list and everything else to set up triggers and to read out FIFO0 with all stored adc results. And now I struggle to implement the CTU interrrupt to get the stored adc results. So I enable Trigger1 and for the interrupt I enable Trigger 1 interrupt at CTUIR. To Update the changes i reload the double buffered registers. At next step I wrote a new .c File with a read out function of FIFO0 and put this function at slot 195 in the interrupt vector table. So everything should be set up but if I test my software i get no data from my read outs.  I hope you can help me.

 

Tom

Labels (1)
Tags (2)
1 Solution
577 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

You can refer to following post:

https://community.freescale.com/docs/DOC-102559

This demo example does the same you have except of DMA is used to read the CTU FIFO finally.

But you can use the FIFO overflow interrupt instead of DMA if needed. This is also mentioned in the document in fact.

In your case do not use Trigger 1 interrupt but use FIFO0 interrupt (vector 202) and set CTU FIFO registers properly, means set FIFO threshold and enable overflow interrupt.

BR,

Petr

View solution in original post

1 Reply
578 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

You can refer to following post:

https://community.freescale.com/docs/DOC-102559

This demo example does the same you have except of DMA is used to read the CTU FIFO finally.

But you can use the FIFO overflow interrupt instead of DMA if needed. This is also mentioned in the document in fact.

In your case do not use Trigger 1 interrupt but use FIFO0 interrupt (vector 202) and set CTU FIFO registers properly, means set FIFO threshold and enable overflow interrupt.

BR,

Petr