Using STM32CubeMX 6.0.1 for the controller STM32L031K6Tx and I cant get the HAL_UART_Transmit_DMA to send data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-16 9:20 AM
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
}
- Labels:
-
DMA
-
STM32CubeMX
-
STM32L0 Series
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-18 6:38 AM
This question is closed.
