Implement eTPU Resolver and PWM functions using the MBDT

cancel
Showing results for 
Search instead for 
Did you mean: 

Implement eTPU Resolver and PWM functions using the MBDT

899 Views
NilsTro
Contributor II

Hello,

I am trying to run/commission a motor development kit (MCSPTR2A5775E) with MPC5775E EVB and I want to use the MBDT for application development.

Is there any experience in this community on how to use/implement eTPU functions with the MBDT to evaluate/generate resolver and PWM signals? As I could not find any documentation and tutorials on this specific topic, any help would be appreciated. 

Thanks in advance

Nils

5 Replies

832 Views
NilsTro
Contributor II

Hello Guzman225, 

Thank you for your reply. I understand from your post that I do not require specific blocks in my simulink model to configure/access the eTPU functions. 

Though, it is still not really clear for me how to actually use the eTPU function "RESOLVER" that provides the rotor position based on sin/cos information? And similarly, which functions/blocks have to be used in Simulink to create the PWM output signals? 

Thanks in advance for any clarification.   

0 Kudos

819 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @NilsTro,

Unfortunately, the MBDT for MCP57xx Toolbox does not provide Simulink blocks for the eTPU peripheral.

For now, controlling the eTPU from Simulink could only be achieved by Custom C code insertion, as described in the following article: https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-...

Do you have already a C example code for the MPC57xx that you would like to replicate in Simulink?

Regards,

Marius

 

0 Kudos

758 Views
NilsTro
Contributor II

Hello @mariuslucianand ,

I would kindly like to ask again for your help in the implementation of the eTPU PWM and resolver functionalities in Simulink using C-Code. It would help a lot, if you/NXP could provide at least a simple example for a single signal. 

We are using the following C-Application MCSPTR2A5775E_Z7_0. 

Many thanks in advance

Nils

0 Kudos

815 Views
NilsTro
Contributor II

Hello @mariuslucianand,

thank your for your reply, the clarifying statement, and the link to the tutorial.

For your question, my goal is to get the MCSPTR2A5775E kit running. So, the corresponding application software 

https://www.nxp.com/design/development-boards/automotive-motor-control-solutions/mpc5xxx-solutions-/...

would be my "C-example". As far as I understand, the MBDT provides all AMCLIB functions to "replicate" the actual control algorithm. So, I would in particular need to solve the eTPU peripheral interface through C-Code. 

Best regards

Nils

 

 

0 Kudos

794 Views
NilsTro
Contributor II

Hello @mariuslucianand ,

I would kindly ask for support of the integration of the eTPU C-Code in Matlab. The BMS example is somewhat helpful to get a rough idea of the process. Unfortunately, I do not see how to transfer this to eTPU set up. It is not transparent for me, which headers and source files need to be included in which Matlab function and so forth. 

Looking forward to your response.  

Best regards

Nils