AnsweredAssumed Answered

Why the BCTU is triggered several times with only one edge of a QOM TPU function for MPC5746R?

Question asked by Cheng FANG on Nov 21, 2016
Latest reply on Dec 5, 2016 by Petr Stancik

Now we use MPC5745R for our applications. I have configured the TPU channel A8 for a QOM function which is used to trigger the BCTU for AD conversions with the following code:

BCTU.MCR.R=0x00040080;
BCTU.TRGCFG[7].R=0x0000A400; 
BCTU.CCR[0].B.DEST=0; 
BCTU.CCR[1].B.DEST=0; 
BCTU.LISTCHR[0].R=0x00128012; 
BCTU.MCR.B.GTRGEN=1; 

 

I also enabled the trigger interrupt and in the service routine a pin PA7 state was set to high firstly and finally back to low.


BCTU.MSR.B.TRGF_CLR=1; /*clear TRGF*/
BCTU.TRGCFG[7].B.TRG_FLAG=1;
SIUL2.GPDO[7].B.PDO=1;
for(idxDelayUW=0;idxDelayUW<10;idxDelayUW++)
{
;
}
SIUL2.GPDO[7].B.PDO=0;

 

I recorded the pin states as following (purple one is TPUA_8, blue one is the  PA7).

 

It is obviously there is only one rising edge but the BCTU is triggered several times.

It seems that the trigger signal is not cleared?

So why? Which signal or which TPU flag triggers the BCTU?

 

Thank you very much.

Outcomes