cancel
Showing results for 
Search instead for 
Did you mean: 

UART DMA Transmitter and receiver issue

NSing.5
Senior

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)".

1 ACCEPTED SOLUTION

Accepted Solutions
Javier1
Principal

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

Receiving buffer overflow?

we dont need to firmware by ourselves, lets talk

View solution in original post

2 REPLIES 2
Javier1
Principal

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

Receiving buffer overflow?

we dont need to firmware by ourselves, lets talk

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