cancel
Showing results for 
Search instead for 
Did you mean: 

How to change speed resolution in FOC code

BTrem.1
Senior II

I wasn't sure if this was the correct forum for FOC code questions.

I need to use the smallest speed resolution available in the ST FOC code. In the file mc_stm_types.h I set the following define:

#define SPEED_UNIT _001HZ

My understanding is I should be able to measure & set speed with a resolution of 0.01Hz doing this.

I'm running a motor and the RPM displayed in the GUI is toggling between the two values 1996 and 2000. Also, using procedure MC_GetMecSpeedAverageMotor1() I record values of only 3328 and 3334. This is equivalent to 33.28Hz and 33.34Hz which is 0.06Hz resolution.

Do I have something set wrong in the code? Is there any way to improve upon this?

Thanks,

Brian

1 REPLY 1
Laurent Ca...
Lead II

Dear @BTrem.1​ 

Welcome to the STM32 Community

Could you give more details to the STM32 Community about your setup -the material you use- ?

(HW and also SW: CPU(s), tools and versions, board(s), motor(s) and so on)

And more especially did you use STM32 MC tools (such as MC_suite, STM32 MC Motor Profile, STM32 MC SDK, STM32 MC Workbench, the used example, the origin of the base of your application source code, and so on)?

Best regards