How to only trigger corresponding ADC commands with related input selection source of CTU

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

How to only trigger corresponding ADC commands with related input selection source of CTU

781 Views
xiemeijuan
Contributor II

For 3 phase motor control ,it can be easily implemented to different triggers for different ADC commands by using the same MRS input selection of CTU. But if the input selection of CTU is changed with time, for example, only A ADC commands need to be implemented when A input selection occurs and only  B ADC commands need to be implemented when B input selection occurs. My understanding is the CTU MRS signals is generated by the Or operation of input selection signals and will trigger several triggers with different ADC commands. So how to differentiate from A ADC commands ADC result is the implementation result of A input selection not B input selection?

3 Replies

562 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

I understand what you are trying to achieve. Yes the input signals are ORed.

If they are asynchronous, then first come first go. Other signals are ignored.

However there is only one SU (Scheduler subunit)

pastedImage_1.png

So on incoming triggers you will execute always same ADC command list.

As you didn't really share with us any details on used micro or purpose of this concept it is hard to propose any workaround.

Peter

562 Views
xiemeijuan
Contributor II

Thanks for your reply. 

My mcu is MPC5744p and in my application case including BLDC motor drive and valve and coil drive which seems similar as the following drive and current sampling scheme shown in Fig1. So I think all the currents sampling is related to the PWM point (Current sampling is valid only MOSFET is on).

current_AD.png

                          Fig.1

So my CTU configuration as following Fig.2

CTU.png

                      Fig.2

I have tested it and tried to modify but found that all the ADC command list will converted for each input selection occurs. The CTU mode is in trigger mode at present. 

If I use CTU in sequential mode, is it ok to implement it or if you have good solution for it, thank you very much

I

0 Kudos

562 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

as I have already emplaned to you there is only one scheduler subunit (SU) in CTU.

So on any of incoming trigger there will be the same ADC command list executed.

But on MPC5744P there are  2 CTUs.

So you can use them both, and each of it can have separate ADC command list.

For the third ADC measurement you have to use different method.

But I am still not clear about your requirements.

Could you please share them with me? I am afraid I wont be able to propose solution without knowing them.

For example see my picture below.

pastedImage_1.png

What is the source of PWM for your BLDC,Valve, coil?

What is the measurement time for it?

How do you know when to measure it? (incomming signal?, or simple timing?)

Peter