Possible Issue in Cube MX 6.17
Dear all and ST Tech Support,
I am writing to report a concerning inconsistency I encountered while migrating an older project to the latest version of STM32CubeMX (v6.17.0).
Background: I recently reopened a project originally created about two years ago with STM32CubeMX v6.8.1 for the STM32H742VGTx MCU. My goal was to review the Timer 4 settings to use them as a reference for a new design.
The Issue: Upon inspecting the Clock Configuration tab, I noticed that the APB1 Timer Clock was displayed as 120 MHz. Based on my original project notes, this value should have been 240 MHz.
When I calculated the Timer 4 period using the 120 MHz figure, the resulting timing was twice as slow as it should be. While checking the documentation, I confirmed that Timer 4 is connected to the APB1 bus. In the CubeMX interface:
The D2PPRE1 divider was set to /2, resulting in an bus clock of 120 MHz (which is the limit).
However, the Timer Multiplier was stuck at x1, leading to an APB1 Timer Clock of 120 MHz.
Observations:
The multiplier (x1/x2) is not user-configurable; it is handled automatically by the software.
I opened another similar project from the same era, and in that file, the APB1 Timer Clock correctly showed 240 MHz with the x2 multiplier active.
I tried to resolve the issue, I manually changed the D2PPRE1 divider from /2 to /1 (which triggered a red error highlight due to frequency limits) and then changed it back to /2. After this "reset," CubeMX correctly recalculated the values, the multiplier automatically jumped to x2, and the Timer Clock returned to the correct 240 MHz.
Concerns: This behavior is quite alarming. If a developer needs to make a minor change and regenerate code for a legacy project, such "silent" shifts in clock calculation could lead to critical timing errors in production code without any explicit warning.
I have attached screenshots showing the state before and after the manual refresh. I kindly request the CubeMX team to investigate why these multipliers occasionally fail to update correctly during project migration or when loading older .ioc files.
Best regards,


