Page 1 of 1

How to enable AT command character detection interrupt in ESP-IDF 5.1.6 (ESP32-WROOM-32D)?

Posted: Fri Apr 11, 2025 7:12 am
by newbieEsp32
Hi everyone,

I'm working on a project using the ESP32-WROOM-32D with ESP-IDF v5.1.6, and I'm trying to implement UART-based SBUS decoding using inline assembly for FIFO access.

I want to trigger an interrupt whenever a specific character (e.g., 0x00) is received, so I can read and decode the full 25-byte SBUS frame from the UART FIFO.

I came across the function uart_set_at_cmd_detect_param() in old examples and references, but this function seems unavailable in my current ESP-IDF version. I also cannot find any related option in menuconfig under UART configurations – only CONFIG_UART_ISR_IN_IRAM is there.

My Questions:
Has uart_set_at_cmd_detect_param() been removed or moved to the ESP-AT framework?

Is uart_set_at_cmd_char() with UART_AT_CMD_CHAR_DET_INT_ENA_M still the recommended way to detect a special byte (e.g., SBUS end frame)?

Is there a way to configure the UART interrupt to only trigger on a specific character using ESP-IDF (not ESP-AT)?

Any help or examples would be much appreciated.
Thanks in advance!

Re: How to enable AT command character detection interrupt in ESP-IDF 5.1.6 (ESP32-WROOM-32D)?

Posted: Sat Apr 12, 2025 11:22 pm
by nopnop2002
>Is there a way to configure the UART interrupt to only trigger on a specific character using ESP-IDF (not ESP-AT)?

I think you can use uart_enable_pattern_det_baud_intr().