cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f030cctx uart generated code bug

dqsh06
Senior

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.
1 ACCEPTED SOLUTION

Accepted Solutions
Ghofrane GSOURI
ST Employee

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.

View solution in original post

2 REPLIES 2
Ghofrane GSOURI
ST Employee

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.

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