S32K396 Resolver custom configuration parameters

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K396 Resolver custom configuration parameters

1,714 次查看
agus_idiada
Contributor III

Hello,

I am using S32K396-BGA-DC1 board, with Simulink in matlab2024a. I am working on the S32K396_MBDT_BASED_MC_0_9_0 Motor Control Example Project.

In my setup I have the nxp connected with a HIL-RT hardware emulating the power stage and a motor.

My question is regarding the Resolver SW, how can I change the resolver parameters (resolver pole pairs, offset, etc) in order to adjust to my application?

At the moment, I am able to read the SIN/COS signal and I get a speed value that is stable but it is not the real one (see figure 1). Motor has 3 pp.

I tried modifying the MCAT parameters without success. I also notice in the etpu_gct.h file the are some lines referring this:
#define ETPUDATA 0x800000
#define ATOFRE 20000 /* ATO frequency */
#define MOTOR_PP (3.0F)
#define MOTOR_PP_GAIN FRAC32(0.75)
#define MOTOR_PP_SHIFT (2)

but trying to modify the MOTOR_PP then the control in open loop for some reason does not works as before an become more unstable.

Can you please give me support on this and tell me what is missing or wrong in the config?

Thanks, Agustin.

标记 (3)
0 项奖励
回复
4 回复数

1,293 次查看
agus_idiada
Contributor III

Hello @MayurB51 , is there any insights about this?

Thanks,

0 项奖励
回复

1,493 次查看
agus_idiada
Contributor III

Hello @MayurB51 , sorry to bother you but this topic is still open. The code does not respond to a change in resolver pole pair. Moreover is it limiting the maximum electrical speed to around 3600rad/s. So, i try to modify the WEL_MAX variable in the appconfig.h but nothing change also.

Can you please help me with this topic? Thanks.

Captura de pantalla 2024-11-19 114308.png

0 项奖励
回复

1,656 次查看
MayurB51
NXP Employee
NXP Employee

Hi @agus_idiada,

Can you please try the below method to change the resolver setting in freemaster: 

first you need to open the freemaster, click on the below icon.

MayurB51_2-1730719445484.png

then you have to go to the "Sensors" option as shown below and have to click on the checkbox of the Resolver or the sensor you want to use.

MayurB51_0-1730717892218.png

After above step you have to click on the "Tab menu" and check the checkbox of "Sensors" option as shown below: 

MayurB51_1-1730717942368.png

After all these steps you have click on the "Apply" and "OK" button and you will see a new window with the name of "Sensors" will apear where you can do changs the Resolver parameters.

MayurB51_4-1730719729209.png

after all these changes you can "Update Target", "Store Data" and go to the "Output File" menu and "Generate Configuration File". Go to S32DS Build, compile and flash the code again.

Thanks,

Mayur

 

 

 

0 项奖励
回复

1,612 次查看
agus_idiada
Contributor III

Thanks for the answer @MayurB51, I tried your suggestion without success. I got an error when I follow your steps (fig 2). I also noticed that there is not any variable in the data dictionary referring the Resolver parameters (fig 3). Maybe I can directly change them manually in the code if you can guide me where. Thanks.

fig2.png

fig3.png

  

标记 (1)
0 项奖励
回复