cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 fail to receive data with DMA under RTOS

Rchan.1
Associate

Hi guys,

On STM32H7, try to receive data with UART in DMA normal mode under FreeRTOS, Tx works OK but receive nothing with keli5 (CubeMX setting as reference )

I use HAL library,also tried LL library but not working.

Already checked DMA is initialized before UART, no access to RTOS semaphores/queues, and use UART Tx in only one task.

Any suggestion?

The link contains my code

https://drive.google.com/drive/folders/1zbQeSjJ21GSl_MLdOm8hokdCSkUVaVTA?usp=share_link

#[STM32 MCUs]​ #DMA​ #RTOS​ #[UART/USART]​ 

2 REPLIES 2
gbm
Lead III

At least a dozen of ideas of what you did wrong, however without seeing your code it's impossible to say anything reasonable. Did you enable the UART and DMA interupts? Do you access RTOS semaphores/queues from the callback? What are the IRQ priorities? Do you use UART Tx in only one task?

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Rchan.1
Associate

@gbm , thanks for the feedback based on vague description. I try my best to expain more and attach my code with link. Hope it would be easier to understand.