Skip to main content
Rchan.1
Associate
December 15, 2022
Question

STM32 fail to receive data with DMA under RTOS

  • December 15, 2022
  • 2 replies
  • 913 views

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]​ 

This topic has been closed for replies.

2 replies

gbm
Super User
December 15, 2022

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
Rchan.1Author
Associate
December 16, 2022

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