Skip to main content
ANahh
Associate II
January 7, 2019
Question

Programming Erorr

  • January 7, 2019
  • 3 replies
  • 1095 views

Dears

I'm using board "STEVAL SPIN3202" to drive a BLDC Motor. To program the microcontroller , I'm using STM32 Motor Control Workbench software. The mode of driving is sure FOC since I'm using this software. The problem, However, happens when I activate the "Hall sensors" for speed sensing. The problem doesn't happen when I'm generating the code in this software. The problem happens when I'm compiling the generated code in the IAR. When compiling, the next error message shows up:

Error[Pe020]: identifier "M1_HALL_H1_GPIO_Port" is undefined

Error[Pe020]: identifier "M1_HALL_H1_Pin" is undefined

Error[Pe020]: identifier "M1_HALL_H2_GPIO_Port" is undefined  

Error[Pe020]: identifier "M1_HALL_H2_Pin" is undefined

Error[Pe020]: identifier "M1_HALL_H3_GPIO_Port" is undefined

Error[Pe020]: identifier "M1_HALL_H3_Pin" is undefined

I believe that the MC workbench doesn't define the values for theses "Variables".

Could you please provide a solution for this problem ? How could I define the value of these variables ?

Best regards

Amr

    This topic has been closed for replies.

    3 replies

    S.Ma
    Principal
    January 7, 2019

    Not expert here, however, when a BLDC is sensored, 3 additional (timer?) pins are required.

    I guess the 3 pins (Pin and Port) must be defined in a header file or as a compile option.

    Better look into a functional example of sensored motor and grep (find in file) these define names to find out what is missing and where it should be defined.

    ANahh
    ANahhAuthor
    Associate II
    January 8, 2019

    Thanks for the help ! This solution did not work. I've managed to solve the problem by creating the project one more time and generate it with Hall sensors in the first time. The problem was happening because when you generate the code without hall sensors and then generate it again with hall sensors. The reason is that if you generate the code one time without hall sensors, the generator deletes the h files for the hall sensors.

    Chief Bridge Fuser
    Visitor II
    January 6, 2021

    Thanks for digging into this when you did. I'm seeing the same problem in MC WB 5.4.4.20160., for what it's worth. Now, off to figure out how to get it to generate that file by "starting over". :\