cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 6.4 bug. WWDG is enabled but init code is removed from main.c

FColl.1
Associate III

STM32H743. Attached ioc file. I have wwdg enabled but when I generate code the call to  MX_WWDG1_Init(); in main.c is removed. Has anyone seen something similar?

1 ACCEPTED SOLUTION

Accepted Solutions
Sara BEN HADJ YAHYA
ST Employee

Hello @FColl.1​ ,

Thanks for your feedback,

It seems that you checked the "Do not Generate Function Call" for WWDG and that is why the MX_WWDG1_Init() as well as the include are missing in main.c.

Please uncheck this field and the call will be generated.

0693W00000LxDOwQAN.pngAbout the second issue, it is the same described in this thread. It is actually related to a missing prescaler in ADC that caused an issue in its clock config. the clock source mux become grayed and the code is not generated. It is already raised to be fixed.

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly ��

Thanks for your contribution,

Sara.

View solution in original post

4 REPLIES 4
Amel NASRI
ST Employee

Hi @FColl.1​ ,

Current STM32CubeMX version is 6.5: could you please check if the issue is still there with this version?

@Sara BEN HADJ YAHYA​ any hint to add?

-Amel

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.

FColl.1
Associate III

I can't use 6.5 because of a similar issue. void PeriphCommonClock_Config(void); Is removed from main.c if I use 6.5. This is more of an issue for me so staying on 6.4 for now.

Sara BEN HADJ YAHYA
ST Employee

Hello @FColl.1​ ,

Thanks for your feedback,

It seems that you checked the "Do not Generate Function Call" for WWDG and that is why the MX_WWDG1_Init() as well as the include are missing in main.c.

Please uncheck this field and the call will be generated.

0693W00000LxDOwQAN.pngAbout the second issue, it is the same described in this thread. It is actually related to a missing prescaler in ADC that caused an issue in its clock config. the clock source mux become grayed and the code is not generated. It is already raised to be fixed.

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly ��

Thanks for your contribution,

Sara.

FColl.1
Associate III

@Sara BEN HADJ YAHYA Thanks! That was it. Sorry for wasting your time. I turned it off while trying to diagnose a startup watchdog and forgot to put it back on. I am (like every other professional) using revision control. I was easily able to see the missing code by the change in revision control. The change in the ioc file was very hard to spot though. Spot the difference between these two lines below! It would be very helpful if this part of the ioc file was a little more human readable (maybe split this intomulitple lines?). It is good that it is a txt file that can be diffed and that all the config is in one file. Please pass this feedback on to the MX team for consideration in future releases.

ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_ADC1_Init-ADC1-false-HAL-true,5-MX_ADC2_Init-ADC2-false-HAL-true,6-MX_ADC3_Init-ADC3-false-HAL-true,7-MX_I2C1_Init-I2C1-false-HAL-true,8-MX_I2C2_Init-I2C2-false-HAL-true,9-MX_I2C4_Init-I2C4-false-HAL-true,10-MX_TIM16_Init-TIM16-false-HAL-true,11-MX_TIM17_Init-TIM17-false-HAL-true,12-MX_TIM5_Init-TIM5-false-HAL-true,13-MX_TIM8_Init-TIM8-false-HAL-true,14-MX_USART2_UART_Init-USART2-false-HAL-true,15-MX_USART6_UART_Init-USART6-false-HAL-true,16-MX_WWDG1_Init-WWDG1-true-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_ADC1_Init-ADC1-false-HAL-true,5-MX_ADC2_Init-ADC2-false-HAL-true,6-MX_ADC3_Init-ADC3-false-HAL-true,7-MX_I2C1_Init-I2C1-false-HAL-true,8-MX_I2C2_Init-I2C2-false-HAL-true,9-MX_I2C4_Init-I2C4-false-HAL-true,10-MX_TIM16_Init-TIM16-false-HAL-true,11-MX_TIM17_Init-TIM17-false-HAL-true,12-MX_TIM5_Init-TIM5-false-HAL-true,13-MX_TIM8_Init-TIM8-false-HAL-true,14-MX_USART2_UART_Init-USART2-false-HAL-true,15-MX_USART6_UART_Init-USART6-false-HAL-true,16-MX_WWDG1_Init-WWDG1-false-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true