UM1036
Using STEVAL-IHM028V1 with STM32 FOC firmware library
Doc ID 18293 Rev 1
45/48
11.2 Hardware
requirements
To run the STEVAL-IHM028V1 together with the STM32 FOC firmware library, the following
is required:
●
The board: STEVAL-IHM028V1
●
High voltage insulated AC power supply up to 230 VAC
●
J-Link programmer - ST Link (not included in the package)
●
J-Link insulating board (not included in the package)
●
3-phase brushless motor with permanent magnet rotor (not included in the package)
●
Insulated oscilloscope (as required)
●
Insulated multimeter (as required).
11.3 Software
requirements
To customize, compile, and download the STM32 FOC firmware library v2.0 motor control
firmware, the IAR tool “EWARM v5.30” must be installed. The free 32 kB limited version
(referenced as “IAR KickStart Kit™” version) is available for download at:
http://supp.iar.com/Download/SW/?item=EWARM-KS32.
11.4 Software
modifications
The most convenient way to edit the parameters header file is through the use of the
“FOCGUI application” downloaded from:
http://www.st.com/internet/com/SOFTWARE_RESOURCES/TOOL/CONFIGURATION_UTI
LITY/focgui.zip.
The STM32 FOC firmware library v2.0 was designed in order to be compatible with the
L6386 drivers. In order to make the firmware compatible with IPM STGIPL14K60, the
polarity of the PWM driving the low-side transistors must be changed.
To achieve this task, perform the following steps:
1.
In 'stm32f10x_svpwm_3shunt.c' substitute line 177 with:
TIM1_OCInitStructure.TIM_OCNPolarity = TIM_OCNPolarity_Low
2.
In 'stm32f10x_svpwm_1shunt.c' substitute line 311 with:
TIM1_OCInitStructure.TIM_OCNPolarity = TIM_OCNPolarity_Low
3.
In 'stm32f10x_svpwm_3shunt.c' substitute line 88 with:
#define LOW_SIDE_POLARITY TIM_OCIdleState_Set
4.
In 'stm32f10x_svpwm_1shunt.c' substitute line 66 with:
#define LOW_SIDE_POLARITY TIM_OCIdleState_Set
5.
In 'MC_MotorControl_Param.h', set on line 73:
#define BUS_ADC_CONV_RATIO 0.0075
Note:
This sets the proper ratio for bus voltage sensing network.