Skip to main content
Senior
January 28, 2026
Solved

stm32f030cctx uart generated code bug

  • January 28, 2026
  • 1 reply
  • 216 views

hello,

now I am using stm32f030cct6 to design a simple program. i used all the 6 uarts of this chip. it works fine, but the interrupt code generated by STM32CubeMX has a simple bug. 

the code as below.

dqsh06_0-1769566375098.png

for the uart6, there is a useless (&huart6);  i think it is no effect to the function, but when building, there is a warning.

stm32f0xx_it.c:172:33: warning: statement with no effect [-Wunused-value]
[build]   172 |   HAL_UART_IRQHandler(&huart6);(&huart6);
[build]       |                                ~^~~~~~~~
 
I dont like the warning. 
so i think you can simplly fix this bug.
 
thanks.
Best answer by Ghofrane GSOURI

Hello @dqsh06 

After performing a test using STM32CubeMX 6.16.1, I obtained no compilation errors and STM32CubeMX behaved as expected.

Could you please retest on your side using STM32CubeMX 6.16.1?

I have attached my .ioc file for your reference, in case it helps reproduce the behavior.

GhofraneGSOURI_0-1769587769532.png

 

Thx

Ghofrane

1 reply

Ghofrane GSOURI
Ghofrane GSOURIBest answer
Technical Moderator
January 28, 2026

Hello @dqsh06 

After performing a test using STM32CubeMX 6.16.1, I obtained no compilation errors and STM32CubeMX behaved as expected.

Could you please retest on your side using STM32CubeMX 6.16.1?

I have attached my .ioc file for your reference, in case it helps reproduce the behavior.

GhofraneGSOURI_0-1769587769532.png

 

Thx

Ghofrane

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.
dqsh06Author
Senior
January 30, 2026

hello @Ghofrane GSOURI 

i used the stm32cubeMX version 6.15.0. i think your guys had already fixed it with the new version. it is good.

 

Thanks,

dqsh06