cancel
Showing results for 
Search instead for 
Did you mean: 

[Bug Report] HAL_UART_Transmit_DMA doesn't transmit a character.

Takemasa
Associate III

I have inserted this simple code to the main() of the CubeIDE generated code.

  /* USER CODE BEGIN 2 */
 
  HAL_StatusTypeDef status = HAL_UART_Transmit_DMA(
		  & huart3,
		  buf,
		  sizeof(buf));
 
  /* USER CODE END 2 */

It should transmit a short message through the STlink console, and then, cause interrupt. But none of these occurred.

I have checked on Nucleo F733ZE and Nucleo G431RB( 64pin ).

The demonstration program of this problem is attached as zipped. file. To see the demo of the problem.

  1. Start the tty program for the STLINK console.
  2. Include two project ( for Nucleo F722ZE and G431RB ).
  3. Build them
  4. Set break point to the interrupt handler of the DMA and UART ( stm32f7xx_it.c and stm32g4xx_it.c)
  5. Run the test program.

If the program run correctly, you will see the message on the terminal program on host, and program stop at break point on interrupt handler. I could not see these behavior.

The environment is :

  • Ubuntu 16.04 LTS
  • Cube IDE 1.1.0
  • STM32Cube FW_F7 v1.15.0
  • STM32Cube FW_G4 v1.1.0
  • Nucleo F722
  • Nucleo G431 (46pin)

Please kindly check.

4 REPLIES 4
Piranha
Chief II

https://community.st.com/s/question/0D50X0000Bmob3uSQA/dma-not-working-in-cubemx-generated-code-order-of-initialization

> The generated code is sometimes wrong

I would say that there are some parts of HAL/CubeMX code, that are not flawed, but absolutely all that code is bloated and inflexible.

Thanks KnarfB

I've checked linked paged and understood what happen.

The workaround by KnarfB works fine.

Takemasa
Associate III

Thanks Piranha.

Hope ST releases the updated CubeIDE soon.