cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX hangs when opening .ioc files saved in previous versions?

E P
Associate III

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:

  1. The .ioc file I can open was last saved with MxCube.Version=6.0.1, MxDb.Version=DB.6.0.0, and ProjectManager.FirmwarePackage=STM32Cube FW_H7 V1.8.0
  2. The older version of that file, which will not open, was saved with MxCube.Version=5.6.1, MxDb.Version=DB.5.0.60, ProjectManager.FirmwarePackage=STM32Cube FW_H7 V1.7.0
  3. The other .ioc file, which was a different project and also won't open now, was saved with MxCube.Version=6.1.0, MxDb.Version=DB.6.0.10, ProjectManager.FirmwarePackage=STM32Cube FW_H7 V1.8.0

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

7 REPLIES 7
Pavel A.
Evangelist III

> 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.

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

Hello @E P​ ,

First let me thank you for your feedback.

Actually, I can't reproduce the issue from my side:

  • Trying to migrate from previous 6.0.1 version of CubeMX to the latest 6.3.0, the project is loaded correctly with the same old configuration.
  • Also, loading an old project created with CubeMX version 5.6.1, it was normally opened.

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.

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.

E P
Associate III

Hmm it looks like I can only attach one file? Here are the three files, zipped.

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:

0693W00000FD9ZzQAL.pngI 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:

  • For the H7-one.ioc , firstly open the .ioc with CubeMX version 6.1.0, then without doing any further modification Save the project (ctrl+s) and try to load it using the latest version 6.3.0 and Migrate option. The project will be opened successfully with some errors in the Clock Configuration.
  • Same for H7-two.ioc saved with the version 5.6.1.
  • Otherwise, try to correct the clock configuration to match the constraints stated in the reference manual and then choose whether to Migrate or to Continue to the latest CubeMX version 6.3.0.

Hope this clarifies the situation.

Khouloud.

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.