how can i use PMF to trigger PTU in MC9S12ZVM256

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i use PMF to trigger PTU in MC9S12ZVM256

27 Views
Alan_Smith
Contributor I

  I use the S12ZVMC256 chip, and I want to through PMF to trigger  PTU.I have configured the program which generated by PE.And I can trigger TG0 through PMF reload event,but I can't trigger TG1.I observed that PTU reload override interrupt flag (PTUIFH_PTUROIF) has been set to 1.There may be a problem in the configuration process.I see that multiple trigger values can be set,And how do I verify that multiple triggers have been implemented.Here are the settings in my PE.

1.png

2.png

3.png

4.png

5.png

6.png

7.png

 The following are the register parameters of the module after initialization

a.jpg

b.jpg

c.jpg

 

 

Tags (1)
0 Kudos
1 Reply

18 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Alan,

I would recommend starting with an existing demo project for motor control.

https://www.nxp.com/design/development-boards/automotive-motor-control-solutions/magniv-and-s12-solu...

danielmartynek_0-1614164978137.png

Or you can refer to the attached S12ZVM hands-on labs.

The processor expert is good for the initialization only.

As you can see below, the PTUROIF flag is set if PTULDOK is not set when the reload event occurs.

danielmartynek_1-1614165283352.png

You can scope the triggers and the reload signal on external pins.

danielmartynek_3-1614165422278.png

 

Regards,

Daniel

 

 

 

 

0 Kudos