2024-02-18 12:06 PM
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
Solved! Go to Solution.
2024-02-18 12:56 PM
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.
2024-02-18 12:56 PM
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.
2024-02-18 12:57 PM - edited 2024-02-18 12:59 PM
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.