esp-idf icon indicating copy to clipboard operation
esp-idf copied to clipboard

Need UART_RX_IDLE_THRHD usage (IDFGH-14983)

Open ToJIka4 opened this issue 9 months ago • 1 comments

Is your feature request related to a problem?

UART_RX_IDLE_THRHD When the receiver takes more time to receive Byte data than what this register indicates, it will produce a frame-end signal. (R/W)

As i understand this flag should help to organize things like Modbus 3.5 character time and helps to see silence on UART for some period of time.

Describe the solution you'd like.

I'd like to see any description of behaviour of UART with this flag and see ESP-IDF integration

Describe alternatives you've considered.

No response

Additional context.

No response

ToJIka4 avatar Mar 30 '25 09:03 ToJIka4

The workings of the threshold registers are described in the TRMs, and "ESP-IDF integration" is present via e.g. uart_set_rx_timeout().

BitsForPeople avatar Mar 30 '25 20:03 BitsForPeople

UART_RX_IDLE_THRHD When the receiver takes more time to receive Byte data than what this register indicates, it will produce a frame-end signal. (R/W)

Have confirmed that it can produce a frame-end signal, but no interrupt can be triggered from it. Therefore, I think it is not possible if you want to utilize this bit to distinguish where one message ends and another begins for Modbus protocol. You have to try with uart_set_rx_timeout(), this will produce the interrupt, and give out UART_DATA event with the timeout_flag set.

songruo avatar Apr 02 '25 03:04 songruo

@BitsForPeople @songruo thanks a lot for the answers!

ToJIka4 avatar Apr 02 '25 19:04 ToJIka4