How to use eTPU in MPC5746R

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

How to use eTPU in MPC5746R

1,290 Views
flyskyr丶
Contributor III

After had browsed many websites , I still don't understand eTPU.

Just got a way to use that, like the website, "eTPU Function Selector - NXP "

Can you tell me a way to use eTPU by my code instead of the library, like using Xgate in S12X.

Thanks!

4 Replies

905 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

eTPU is an complex I/O co-processor. You can use it two ways:

1) with using of eTPU functions prepared by NXP

2) to create your own function or modify NXP’s function

 

Ad 1)

For using eTPU functions pre-prepared by NXP (the ones you can download by eTPU Function Selector) without modification you don’t need any eTPU compiler. See

http://www.nxp.com/webapp/etpu/

 

Also there is some new version, currently containing only some functions:

http://www.nxp.com/webapp/etpu_cw/

 

Only download them, configure by eTPU graphical configuration tool (GCT), include all needed files to CodeWarrior or other compiler and use it.

 

GCT is the tool which is intended to configure most of functions prepared by NXP that can be downloaded as a pack here:

http://www.nxp.com/webapp/sps/download/license.jsp?colCode=ETPUGCT&Parent_nodeId=1311258915317726989...

 

Here you can example procedure how to use eTPU PWM function, step by step:

http://www.nxp.com/files/soft_dev_tools/doc/app_note/AN4687.pdf

 

Every eTPU FUNCTION has its own descriptive documents (application note), its software attachment usually contains some simple example code:

http://www.nxp.com/products/automotive-products/microcontrollers-and-processors/32-bit-power-archite...

 

 

Ad 2)

If you cannot fit our existing eTPU function to your application you can write your own function or modify the existing one you will need eTPU compiler and simulator.

 

Currently there are 2 options (preferred solution is no.1):

1) Ashware solution (compiler + simulator)

https://www.ashware.com/etpu2-simulators

 

2) NXP eTPU2 Development Suite (compiler + simulator)

http://www.nxp.com/products/automotive-products/microcontrollers-and-processors/32-bit-power-archite...

 

Buying of following book could be good start point for developing you own eTPU function or library:

https://www.ashware.com/etpu-programming-made-easy-book

905 Views
flyskyr丶
Contributor III

I have tried the ad1 above. Now I can using a little function, but also get some problem.

1) when using pwm function:

   configuration1 :

pastedImage_1.png

 can be used.

configuration2 :

pastedImage_2.png

can not be used. I  check  port configuration, no problem ....

Why? I guess it's too long for configuration ? No...This is impossible.

2)When using FPM function:

pastedImage_1.png

   In main:

pastedImage_2.png

   Not work , It run in the while loop. I'm using MPC5746R, and then check the file "mpc5746r_vars.h".

find :

pastedImage_3.png

can you tell me this address was right or not ?

Looking forward to your reply !

Thank you.

905 Views
jamesmurray
Contributor V

Yes, it can be done.

But first you'll need to buy or write a compiler or assembler for the eTPU code.

Then read, read and re-read the eTPU section of the Reference Manual Addendum.

James

0 Kudos

905 Views
flyskyr丶
Contributor III

Thanks for your reply !

I just use it simply, not so complicated.

~_'

0 Kudos