cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_UARTEx_ReceiveToIdle_DMA() timeout

Lex
Associate III

Hi folks,

I'm using HAL_UARTEx_ReceiveToIdle_DMA() on STM32L4. If I use minicom and type a few characters, HAL obviously detects an idle state after each single character I typed.

I'd like to configure a idle timeout value used in HAL_UARTEx_ReceiveToIdle_DMA(), so it would suite my use case.

Could someone point me to the right place such a fix?

 

Cheers

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

The IDLE flag is a hardware feature and is not adjustable.

You can make code to process each character, record the timestamp, and set an interrupt to go off X milliseconds in the future if you don't see another character, or some similar code feature.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

The IDLE flag is a hardware feature and is not adjustable.

You can make code to process each character, record the timestamp, and set an interrupt to go off X milliseconds in the future if you don't see another character, or some similar code feature.

If you feel a post has answered your question, please click "Accept as Solution".
TLin.5
Associate III

The IDLE interrupt is not configurable with a timeout. 
If you want something like that, I suggest tying the input line to an IO and timer trigger, but you'd have to write that on your own.

To clarify, the IDLE in question here is that of the receiving UART line.