cancel
Showing results for 
Search instead for 
Did you mean: 

Using STM32CubeMX 6.0.1 for the controller STM32L031K6Tx and I cant get the HAL_UART_Transmit_DMA to send data.

SHudi.1
Associate II

Let me start off with saying I am new to STM. I am a recent convert from NXP. I used the very cool STM32CubeMX 6.0.1 through the Keil IDE to generate what was mostly needed for my STM32L031K6Tx application. I/O and timers seem to be working fine but I hit a road block when I went to send a few bytes using HAL_UART_Transmit_DMA. I attached the cube generated file STCubeGenerated and the only src file I changed main.c.

// Here is the problem bit -

HAL_UART_Init(&huart2); // added as a test

HAL_UART_Transmit_DMA(&huart2, "buffer_tx", 5); // send "READY"

while (HAL_UART_GetState(&huart2) != HAL_UART_STATE_READY)

{

// Return value is HAL_UART_STATE_BUSY_TX = 0x21 forever

state = HAL_UART_GetState(&huart2) ; // stuck in this loop forever

}

1 REPLY 1
SHudi.1
Associate II

This question is closed.