cancel
Showing results for 
Search instead for 
Did you mean: 

Clock settings are reset when loading IOC file

JFisher-Legato
Associate

Hello,

I am having an issue with my STM32WBA65MI-based project file (IOC file) and CubeMX (6.15.0). It also happens when configuring the IOC file in CubeIDE 1.19.0.

When I configure the clocks and then generate code and save the IOC file and then close the IOC file, the code is correctly generated. However, when I open the IOC file again, the clock settings are different:

  1. Cortex Clock Selection Mux
    CPU System Timer shows as LSE, despite previously having saved and generated as HCLK1 / 8. This means the CPU System Timer runs at 0.032768MHz rather than 12MHz.
  2. System Clock Mux
    The System Clock Mux shows as HSE, despite previously having saved and generated as PLLCLK. This sets the SYSCLK to 32MHz (and has consequences downstream for peripherals)
  3. Related to the System Clock Mux, the HPRE5 Prescaler gets reset from / 4 (which I had saved) to / 1.

If I were to generate code, it would replace the "correct" code with the new settings.

Double-checking the original generated code, it seems that the settings are properly used to generate code. However, maybe the IOC file isn't being saved right, or loaded right?

I'm happy to send my IOC file via email but I'd rather not upload it here.

Thank you,

Jonathan

2 REPLIES 2
Mahmoud Ben Romdhane
ST Employee

Hello @JFisher-Legato ,

 

Let me thank you for posting and welcome to the ST Community.

For more investigation, could you please share with me your Ioc.File through Email.

 

Thanks.

Mahmoud

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

JFisher-Legato
Associate

Hello,

I created a new project with a new IOC file and this issue seems to be related to the STM32_WPAN middleware. I've attached this sample IOC file. My steps to reproduce the issue:

  1. Load the attached file
  2. Verify that SYSCLK is at 100MHz
  3. Under Pinout & Configuration, expand Middleware and Software Packages
  4. Select STM32_WPAN
  5. Set BLE to "Start from the Simplest BLE Configuration"
  6. Go back to the Clock Configuration tab, note that the clock settings have changed. Change them back to the desired settings.
  7. Save the IOC file & close the project
  8. Re-open the IOC file
  9. Note that the clock settings have changed back

Thank you,

Jonathan