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

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

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

1,096 Views
umsteigen
Contributor II

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).

170082_170082.jpgIMG_20161122_141757.jpg

 

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.

Labels (1)
0 Kudos
6 Replies

858 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

The BCTU trigger inputs are level-sensitive, thus if a logical level 1 is detected, an event is captured by the BCTU.

While the BCTU is triggered by eTPU channel output, the eMIOS flag rather then eMIOS output is used as BCTU trigger.

That’s why you see such behavior.

BR, Petr

0 Kudos

858 Views
umsteigen
Contributor II

Dear Petr,

please explain "While the BCTU is triggered by eTPU channel output, the eMIOS flag rather then eMIOS output is used as BCTU trigger.".

Thank you very much.

Regards,

0 Kudos

858 Views
PetrS
NXP TechSupport
NXP TechSupport

sorry forgot to reply...

I tried to describe the difference between eMIOS and eTPU trigger sources.

The eTPU channel output is used as trigger for the BCTU.

But for the eMIOS the channel flag is used as trigger for the BCTU.

The BCTU trigger inputs are level-sensitive, so using your eTPU signal the BCTU will be triggered repeatedly as long as signal is kept high.

BR, Petr

0 Kudos

858 Views
umsteigen
Contributor II

Dear Petr,

thank you for your reply.

Then I understand. And the last question: 

Because normally a OC function or QOM function has both rising edges and falling edges.  Only the rising edge or high pin level trigger the BCTU? 

Best regards,

Cheng FANG

0 Kudos

858 Views
PetrS
NXP TechSupport
NXP TechSupport

just the high pin level.

BR, Petr

0 Kudos

858 Views
umsteigen
Contributor II

I don't understand the meaning of "While the BCTU is triggered by eTPU channel output, the eMIOS flag rather then eMIOS output is used as BCTU trigger.".

Could you please explain it?

There are two match events of the example TPU output (one rising edge, one falling edge) in a period. Do the both match events trigger the AD conversions?

Thank you.

0 Kudos