Skip to main content
NSing.5
Associate III
February 12, 2023
Solved

UART DMA Transmitter and receiver issue

i'm using STM32F730 as uart receiver and STM32f0 as uart transmitter baud rate 9600, 8 bit data representation. i'm using DMA with interrupt for the communication. i'm using HAL for programming on IAR workbench.

The transmitter is continuously transmitting 20 bytes after a delay of 1 sec. i'm facing following issue:

  1. The receiver gets interrupted only once and after wards it is not getting interrupted.
  2. i've reused "HAL_UARTEx_ReceiveToIdle_DMA(&huart1,Rxr,20);" in interrupt callback function "HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)".

This topic has been closed for replies.
Javier1
Javier1Best answer
Principal
February 13, 2023

>>The receiver gets interrupted only once and after wards it is not getting interrupted.

Receiving buffer overflow?

hit me up in https://www.linkedin.com/in/javiermuñoz/

2 replies

Javier1
Javier1Best answer
Principal
February 13, 2023

>>The receiver gets interrupted only once and after wards it is not getting interrupted.

Receiving buffer overflow?

hit me up in https://www.linkedin.com/in/javiermuñoz/
NSing.5
NSing.5Author
Associate III
February 19, 2023

thanks a lot for your input, it was the overflow flag causing problem in the reception. plz tell me how i can clear it in the program.

i've one more question related to transmission using DMA. i'm facing a strange situation.

  1. it works perfectly when i use "HAL_UART_Transmit_DMA(&huart1, TxBuf, 5);" in the main program.
  2. However in my project i've crated a separate file for my application program, which i include in the main program, and when i call "HAL_UART_Transmit_DMA(&huart1, TxBuf, 5);" from my application program, only first two bytes are transferred as per my data rest all bytes are corrupted.

Regards