2024-07-02 04:16 AM
Hello,
I am using the STSPIN32G4 IOC file from MC Workbench for a motor control example. However, I encounter the following errors during the build process. Since these files are auto-generated, I can't directly fix them by declaring the missing elements
Error: C:/MCB Example/MtrCtrlMdlGen/temp/stm32g431rb_ihm16m1/Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:1007:47: error: 'OPAMP_POWERMODE_NORMALSPEED' undeclared (first use in this function); did you mean 'LL_OPAMP_POWERMODE_NORMALSPEED'? 1007 | #define OPAMP_POWERMODE_NORMAL OPAMP_POWERMODE_NORMALSPEED | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Solved! Go to Solution.
2024-07-03 02:38 AM
Hello @AsimAsrar
Thanks for your inputs.
The issue you reported is known and already described in the release notes.
In the section known limitations you can find the following statement:
I did a quick test with STM32CubeMX 6.11 and it seems that now it is fixed.
Regards
Cedric
2024-07-02 06:44 AM
Hello @AsimAsrar,
Your issue probably comes from a misalignment between the HAL version and your cubeMX version.
Could you please give the version of the tools you are using : MCSDK, CUBEMX, Cube package (HAL)
Thanks
Cedric
2024-07-02 08:49 AM
Hello Cedric, Below are the details.
CUBEMX Version: 6.10.0
Motor Control WorkBench: 6.3.0
While generating the IOC file I am selecting LL and not HAL.
2024-07-02 09:51 PM
2024-07-03 02:38 AM
Hello @AsimAsrar
Thanks for your inputs.
The issue you reported is known and already described in the release notes.
In the section known limitations you can find the following statement:
I did a quick test with STM32CubeMX 6.11 and it seems that now it is fixed.
Regards
Cedric
2024-07-03 06:37 AM
Hello,
Thank you for your suggestion. Setting the OPAMP to HAL did resolve the opamp error. However, I am still encountering an error related to 'TIM'. When I configure it as HAL, I receive the following error:
Note: I had to change few peripherals to LL as I was getting the above error for them as well.
Alternatively, when I set it to LL, I get this error:
Could you please advise on how to resolve this issue?
Thank you.
2024-07-03 07:04 AM
Hi,
Your attached IOC is not the one generated by the motor control workbench, so no chance that the project built from it can contain the Motor control FW lib (which contain the declaration of the missing constants, plus obviously all the motor control FW algorithm).
Regards
Cedric
2024-07-03 10:54 AM
Hello,
It's the same IOC file, but I made a few modifications for my example. I disabled the motor control, adjusted some parameters of ADC2, and added LPUART.
Thank you.
2024-07-04 03:05 AM
I had to change few parameters of TIM, and it's working now. Thank You.