S32k Encoder mode

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

S32k Encoder mode

220 Views
uky746
Contributor II

Tool : S32 Design Studio for arm 2.2

MCU  : S32k144 

use Application Note : 1) AN12235 (PMSM_1ch) 

                                    2) Board : MCSPTE1AK144    

I wanna use mcspte1ak144 with encoder mode   (change the encoder motor)

 STEP1 : main.c        #define ENCODER          1

 STEP2 : Change the setting in PE for the encoder (FTM2) 

 STEP3:  Set the number of counts in FreeMASTER (Sensors tab)

 STEP4 : Set the Encoder Sensor option in FreeMASTER

When I switch to encoder mode motor was vibrating.

How can I run motor with encoder mode

Add Motor spec / source code

0 Kudos
Reply
3 Replies

189 Views
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

You can refer to the same instructions as the following post:

https://community.nxp.com/t5/S32K/MCSPTE1AK344-encoder-mode/m-p/1592069

In this post a hollow shaft incremental encoder was coupled to the shaft without change the kit's motor. And the performance changed due to the influence of the coupling in terms of friction and inertia.

In your case that your motor is vibrating, is due to the fact that you are using a different motor and the issue is about tunning. To spin a custom motor properly, the appropriate electrical parameters must be entered and tune the parameters of the different control schemes.

I recommend you to take as reference the following training to learn how to use our MCAT Tool:

Motor Control Application Tuning (MCAT) Tool – PMSM Servo Tuning

Hope it helps you.

Have a nice day!

0 Kudos
Reply

175 Views
uky746
Contributor II

The setting is wrong  (My Motor encoder pulse 1,000 (1Cycle))

1) Change the setting in PE for the encoder (FTM2 value)  : 999  ->  1999 

2) Set the number of counts in FreeMASTER (Sensors tab) : 500  - > 1000

3)FTM_RMW_CNTIN(FTM2, 0x0000, 0xFC18)  ->   FTM_RMW_CNTIN(FTM2, 0x0000, 0xF830);

It's working well

Thanks for your response

   

 

 

 

 

 

201 Views
uky746
Contributor II

Set initial value of the FTM2 counter to -1000
FTM_RMW_CNTIN(FTM2, 0x0000, 0xFC18);
0 Kudos
Reply