Skip to main content
Associate II
Oct 27, 2021 8:28 AM UTC
Question

CubeMX generates a wrong case init in void SystemClock_Config(void) (main.c). I changed this line manually, is there workaround or an automation for this ?

/** Initializes the CPU, AHB and APB buses clocks
 */
 //RCC_ClkInitStruct.ClockType = ClockTypeHCLK|ClockTypeSysClk
 // |ClockTypePCLK1|ClockTypePCLK2;
 
 //Has to be:
 RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK| RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;

This topic has been closed for replies.

2 replies

TDK
Oct 27, 2021 1:58 PM UTC

It looks like a bug.

Perhaps include steps to reproduce so that someone can look at it if they wanted.

"If you feel a post has answered your question, please click ""Accept as Solution""."
ST Technical Moderator
Nov 1, 2021 4:42 PM UTC

Hello @Brieuc​ ,

Can you please describe precisely the steps and what configuration you made ?

If possible please share the ioc file, this will help to reproduce exactly the same scenario.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks