2022-03-17 01:56 AM
Hello,
I have found a new bug in CubeMX generated code.
My setup:
STM32WubeIDE 1.9.0
CubeMX 6.5.0
Chip STM32WB55VGYx
Firmware pack V1.13.2
If you configure your project to enable RCC interrupts, CubeMX will generate twice the lines
/* RCC_IRQn interrupt configuration */
HAL_NVIC_SetPriority(RCC_IRQn, 0, 0);
/* RCC_IRQn interrupt configuration */
HAL_NVIC_EnableIRQ(RCC_IRQn);
By searching through the template files in the CubeMX plugin sources for STM32CubeIDE, I was able to locate the source of the problem.
The following code is from the file "STM32CubeIDE/plugins/com.st.stm32cube.common.mx_6.5.0.202202251913/db/templates/stm32xx_hal_c.ftl"
The code is generated once in the section located in lines 161-183 and then generated a second time in section located in lines 184-207.
The second section especially targets the initialization of the RCC module, however it does contain exactly the same code as the previous section (including some conditions that will never be true because they targets interrupt vectors which are not RCC_IRQn). The only possibility would be that the secodn section of code would force the code to be generated even if the driver used for the RCC module is the LL driver instead of the LL driver. I do not know if this is an intended behaviour however.
A quick fix would be to remove section in lines 184-207 to go back to the behaviour of CubeMX 6.4.0.
Regards,
Morgan
Solved! Go to Solution.
2022-03-22 06:11 AM
Hello @MDiep.1 ,
I reproduced the issue and I confirm your findings. The issue is reported to the dev team to be fixed. I will keep you posted with updates.
Internal ticket number: 124946 (This is an internal tracking number and is not accessible or usable by customers).
If your issue is solved or reported, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)
Thanks for your contribution,
Best regards,
Aziz
2022-03-22 06:11 AM
Hello @MDiep.1 ,
I reproduced the issue and I confirm your findings. The issue is reported to the dev team to be fixed. I will keep you posted with updates.
Internal ticket number: 124946 (This is an internal tracking number and is not accessible or usable by customers).
If your issue is solved or reported, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)
Thanks for your contribution,
Best regards,
Aziz
2022-06-29 04:13 AM
Hello @MDiep.1,
Issue fixed in STM32CubeMX latest release.
V6.6.0 is now available under this Link.
Thank you for your contribution.
Best regards,
Aziz.