MPC5775E - Generate PWM and Evaluate Resolver in MBDT without eTPU

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

MPC5775E - Generate PWM and Evaluate Resolver in MBDT without eTPU

1,820 Views
NilsTro
Contributor II

Hello Community,

I want to develop motor control application software for a  MCSPTR2A5775E motor kit with MPC5775E board using the MBDT. Unfortunately, the MBDT is missing critical functions for a standard motor control application. Specifically, I am facing the following problem: 

Two essential functions, the evaluation of resolver/speed feedback and generation of the three phase PWM output signals, are realized using the eTPU peripheral. The MBDT does not feature blocks/functions set up the eTPU related functions. This was confirmed by NXP, see answer in an earlier topic: 

https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Implement-eTPU-Resolver-and-PWM-functio...

Hence, I am trying to find a way to create the above functions without eTPU.  I want to share with you my approach and to kindly ask the support to answer my questions.

Alternative Solution for Resolver Feedback:

The resolver COS and SIN feedback is normally evaluated through SDADC, as stated in the application note:

  • Sine     --> SDADC 1:  M_ANA0_SDA0 ANA0 /SDA0 
  • Cosine --> SDADC 4 M_ANB0_SDD0  ANB0  /SDD0 

Since SDACD is not available, EQADC might be used instead. I would configure the EQADC as follows (example for COS evaluation on channel ANB0):

NilsTro_0-1668596079878.png

Question for support:

  • In general: is this possible?
  • Can you confirm the followin: With this approach I "loose" two EQADC channels, which are normally needed to read the current and voltage measurements. I understood, that this board does only have a max. of 4 EQADC channels. 

 

Alternative Solution for Resolver Excitation:

Resolver excitation is done using ETPUA6 /GPIO120. To bypass the eTPU I intend to write a 10kHz square wave signal directly to the GPIO120 pin (PTD24):

NilsTro_1-1668596530110.png

Question for support:

  • Is this approach feasible?
  • If not, what else can I use?

Alternative Solution for Three Phase PWM:

According to the application note the kit uses the following eTPU channels and pins (GPIOM 130...135) for the PWM generation/output:

  • ETPUA16 /GPIO130 PWMM Phase A High
  • ETPUA17 /GPIO131 PWMM Phase A Low
  • ETPUA18 /GPIO132 PWMM Phase B High
  • ETPUA19 /GPIO133 PWMM Phase B Low
  • ETPUA20 /GPIO134 PWMM Phase C High
  • ETPUA21 /GPIO135 PWMM Phase C Low

Since eTPU cannot be used, I scanned the documentation and communities for alternative solutions:

My questions @mariuslucianand:

  • How can I access the right GPIOM pins with eMIOS?
  • Can the pin-Assignment be rearranged?
  • If this is not possible, what else can I do? Write to GPIOM pins directly?

Thank you so much for reading such a long text and many thanks in advance for help. 

Nils 

 

 

Labels (2)
0 Kudos
Reply
5 Replies

1,368 Views
TLin3
Contributor III

Hi @NilsTro and Community,

I am in trying to figure out how it works - measuring the resolver and PWM signals.

Would you be able to advise how it work and its principle please?

Thanks

Chi

0 Kudos
Reply

1,364 Views
NilsTro
Contributor II

Hello TLin3,

It is great to hear from a peer. Unfortunately, we never succeeded with this and ended up using the C-Code firmware. However, recently we switched to Texas Instruments motor drivers which work excellent with Simulink. 

Sorry that I cant help you. We were more than disappointed by the wrong advertisement for this kit and the poor / not existing support. 

Best regards

Nils

0 Kudos
Reply

1,310 Views
MuhammedKoyuncu
Contributor II
Hello NilsTro,
Can you share the motor driver you use?
0 Kudos
Reply

1,427 Views
TLin3
Contributor III

Hi 

I am working on the same DevKit, and wondering that has this topic been fixed?

Would you please advise the way to work in the simulink model, please?

0 Kudos
Reply

1,771 Views
NilsTro
Contributor II

Hello Community, 

I am really wondering, if I am the only person around here that tries to use the MCSPTR2A5775E motor kit with MBDT. I would really appreciate any help. 

 

Nils

0 Kudos
Reply