cancel
Showing results for 
Search instead for 
Did you mean: 

Possibly bug in USART configuration of advanced features CubeMx?

mads.l
Associate II

I notice that the code generator of CubeMx output these two lines in the usart configuration code:

 LL_USART_EnableOverrunDetect(USARTx);

 LL_USART_EnableDMADeactOnRxErr(USARTx);

This happens even if all the "Advanced Features" in the Usart configuration are disabled, including Overrun and DMA on RX Error.

However, marking Overrun and DMA on RX Error as enabled, removes the two line of configuration shown above.

Doing this exercise with other Advanced Features eg. "MSB First", inserts the enabling code line when enabled in cubeMX which seems correct.

The problems occures also on the LPUART.

CubeMx version is 4.24.0, and I have Low level code generation turned on for the Usarts.

6 REPLIES 6
Amel NASRI
ST Employee

Hi @mads.l​ ,

Several improvements were introduced on STM32CubeMX since the version 4.24.0 (current one is 4.27.0).

Could you please check if the problem you described is still there?

If yes, please share the .ioc file to reproduce it on our side.

-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.

Amel NASRI
ST Employee

I have just checked it on my side using the version 4.27.0 of STM32CubeMX and confirm the behavior you described.

I will report this issue to our STM32CubeMX, who can later provide more details about the planning to fix it.

Thanks for bringing it to our attention.

-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.

Nawres GHARBI
ST Employee

Hi @mads.l​ 

Thanks for the feedback, will be fixed next release

RMand
Senior

I am using version 6.0.0 (released a few days ago) and am seeing a similar error?

I am looking to write a very basic application with NO DMA whatsoever.

I have disabled 'DMA on RX error' and generate the code -- each peripheral in a separate '.c/.h' by itself.

The build fails with this error:

stm32l0xx_hal_driver\inc\stm32l0xx_hal_uart.h:223:3: error: unknown type name 'DMA_HandleTypeDef'

I can get over this issue by adding this line to my application code that manages the UART, but the whole point of my disabling ALL references to DMA in CubeMX was to not have to add such unintuitive lines of code.

#include "stm32l0xx_hal_dma.h"

Hello @RMand​ , could you please share your ioc file?

Regards,

Khouloud

RMand
Senior

Hi Khouloud

Thanks for reaching out. Unfortunately, I have moved on with my workarounds and it will not be possible for me to go back and recreate that specific ioc file at this time.

If I do run into such a situation again, I will make sure that I pass it along to you.

Cheers

Ramanand