2021-10-18 10:32 AM
I recently upgraded to STM32CubeMX 6.3.0 (from 6.0.1) so that I can make a change to an existing .ioc file. This is on Windows 10.
When I opened the .ioc file, everything seemed fine (after migrating) but the clock configuration tab claims that the clock setup in the .ioc file, which (as far as I can tell) has been working just fine for half a year, was invalid.
Thinking I had somehow screwed up the .ioc file, I tried opening a previous version of it, that was generated using Cube 5.6.1, but it won't open. If I double-click the .ioc file, the initial CubeMX window appears but blank aside from the File/Window/Help menus, and one CPU core is pegged at 100% (A similar case seems to be at https://community.st.com/s/question/0D53W00000uWYu6SAG/cubeide-hangs-when-starting-configurator). If I open CubeMX, wait a minute or two, then open the .ioc file using File->Open, it still hangs, but without a CPU core being pegged. I tried another old (but previously valid) .ioc file with the same results.
Details that might be helpful:
Any thoughts on what might be going on here? I'd like to get to the bottom of why the clock configuration is suddenly invalid but first I'd like to be able to just open the files. Based on the link mentioned above, I tried turning off automatic updates and various combinations of launching CubeMX by double-clicking the .ioc file vs launching the program directly, waiting, then opening a 'bad' file, or opening a 'good' file and then closing it and opening a 'bad' one, etc. I didn't see where the log file lives on Windows but will be happy to poke through it if you can point me to it.
Thanks
2021-10-18 11:43 AM
> but first I'd like to be able to just open the files.
As you wrote, the new Cube can open the file. Only the clock config tab makes trouble.
I would take a screenshot of the clocks view (if there's no saved .pdf report file) then reset the clock config and start over to restore the settings step by step.
2021-10-18 12:53 PM
The newest Cube is able to open one file, but it is not able to open other files that I will need access to, which is why I posted this question.
As for the clock settings - it appears that this version of Cube is creating/enforcing certain rules about clock frequencies that were not enforced in previous versions. For example: if the Power Regulator Voltage Scale is set to Scale 1, the Clock Configuration tab requires that the output of DIVP1 be <= 400MHz; in the past this was (apparently?) not enforced because in the previous configuration that output was 480MHz. There were a handful of these violations in the clock configuration when I opened it with the newest Cube. Looking through release notes for both Cube and the H7 code, I don't see any indication that the clock configuration rules changed, but I might have missed those.
Anyway - my immediate problem is that I need to open the .ioc file noted in #3 above, but can't.
Thanks
2021-10-19 03:40 AM
Hello @E P ,
First let me thank you for your feedback.
Actually, I can't reproduce the issue from my side:
Thus, to deblock the situation, could you please attach the .ioc file you want to open for further investigation ?
> As for the clock settings - it appears that this version of Cube is creating/enforcing certain rules about clock frequencies that were not enforced in previous versions.
In fact, there are surely some constraints applied to the clock frequencies to match conditions stated in the Reference Manual and Data Sheet of STM32H7 Devices (e.g. Table 122. General operating conditions of STM32H742xI/G STM32H743xI/G Data Sheet and Table 17. FLASH recommended number of wait states and programming delay of STM32H742xI/G STM32H743xI/G Reference Manual).
I doubt that the clock rules weren't applied in the previous CubeMX versions. Hence, it will be helpful if you precise the MCU you're using as well as the clock configuration.
Your feedback will be very important to track the root cause of this misbehavior.
Khouloud.
2021-10-19 03:03 PM
Hi,
Thanks again for the response. I'm attaching three .ioc files:
* H7-one.ioc is last saved with MxCube.Version 6.1.0, and the configuration is (as far as I know) just fine, but I can not open it with CubeMX.
* H7-two.ioc is an older one, last saved with MxCube.Version 5.6.1, and I also cannot open it with CubeMX.
* H7-three.ioc is a newer one that I can open with the current MxCube, if I select "Migrate" to use the latest firmware (if I say "Continue" to keep the older firmware, it will not open). This is the one where clock settings that were previously allowed are shown as invalid.
2021-10-19 03:03 PM
2021-10-20 05:36 AM
Hi @E P ,
Thanks a lot for those inputs.
Actually you're right, I was able to reproduce the same issue when trying to load your attached projects. The problem is mainly due to the Continue option.
In fact, with previous versions of CubeMX (6.1.0 / 5.6.1) there wasn't any clock constraint which wasn't correct. Backing to STM32H742, STM32H743/753 and STM32H750 Reference Manual > Table 59. Kernel clock distribution overview, each IP has its maximum allowed clock frequency depending on the Power Regulator Voltage scale value:
I assume that this misbehavior is due to the ADC clock frequency (120MHz) and SPI clock frequency (480 MHz) exceeding the maximum value stated in the Reference Manual. Thus, the implementation of the clock constraint in the latest CubeMX version may have impact on the loading of some IPs.
With this being said, this issue will be reported internally for review and fix. I'll keep you posted with the updates.
Sorry for any inconvenience that this may cause.
Meanwhile, I recommend you to use the Migrate option when opening your old projects.
Hereafter some workarounds to recover and load your projects:
Hope this clarifies the situation.
Khouloud.
2021-10-20 08:42 AM
Hi,
Thanks for this! I had not paid close attention to that part of the Reference Manual because I was letting CubeMX do that work for me :)
I will try this process today and post here again if there are still problems.