cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4xx with DMA receive timeout on UART

mmahmood
Associate
Posted on November 07, 2016 at 19:44

Hello,

I'm trying to setup DMA with a timer to check a timeout for my UART 1 on STM32L476G-EVAL board. The conditions are:

1. I've setup the DMA receive buffer to be 32 bytes.

2. If I start receiving data, I want to start the timer.

3. If I do not completely receive 32 bytes of data within 1 second, I want the timer to timeout.

I've looked at the example from AN3103 which is for STM32F1x CPU but am having a hard time converting to STM32L4 code. Can someone help to setup a timer that will working with input capture reset mode as suggested in AN3103?

Thanks,

#!stm32l4 #!stm32-!cubemx #!dma #!uart
1 REPLY 1
Posted on November 08, 2016 at 08:50

AN3103 appears to be unrelated (''Fully integrated microstepping motor driver using the L6470'').

Nevertheless, there is a substantial difference between 'F1xx and all other STM32 families in that while in 'F1 there might have been pins shared as input between timer and USART, other families' GPIO matrix strictly assigns pins to one selected IO module. You have to connect the USART Rx pin to a timer's pin to achieve the mentioned functionality.

JW