Skip to main content
mscot.1
Associate II
Solved

ST MCW - MCSDK_v5.4.3 Bug? get compiler build error as PARK_ANGLE_COMPENSATION_FACTOR is not defined

On IAR & CubeIDE

For Sensorless configuration on a custom board.

This topic has been closed for replies.
Claire O.
Claire O.Best answer
ST Employee

ok, I can advise you to test with a ST board first , the one closest to your configuration.

The rational is that all ST boards available in the MCWorkbench have been tested by the ST team.

5 replies

Claire O.
ST Employee

Hello mscot.1,

Can you please describe a bit more your different steps?

Especially the custom board... did you use a known ST board to get started ?

Thanks,

Claire

mscot.1
mscot.1Author
Associate II

Hi Claire,

No I didn't, but if I try builds for Hall Sensors or Encoders are OK, that is they spin the motor via the Monitor etc.

Claire O.
Claire O.Best answer
ST Employee

ok, I can advise you to test with a ST board first , the one closest to your configuration.

The rational is that all ST boards available in the MCWorkbench have been tested by the ST team.

Luczia
Associate II

Hello,

I do have the same error with a nucleo f401RE and Ihm08-3Sh

In function 'FOC_CurrControllerM1':
C:/XXXXXX/Src/mc_tasks.c:770:50: error: 'PARK_ANGLE_COMPENSATION_FACTOR' undeclared (first use in this function); did you mean 'REV_PARK_ANGLE_COMPENSATION_FACTOR'?
 
 hElAngle += SPD_GetInstElSpeedDpp(speedHandle)*PARK_ANGLE_COMPENSATION_FACTOR;

It appears when unboxing hall sensors and quadrature encoder and activating Sensor-less (Observer+PLL) speed feedback.

STM32CubeMX 6.0.1

STM32 FW V1.25.1

STM32CubeIDE

DriveType : HAL

Visitor II

define PARK_ANGLE_COMPENSATION_FACTOR 0;