hello All,
I need to implement an interrupt when the Rx FIFO buffer is filled with a specific number of characters. However, I find it difficult to program it. As you can see the API reference says how should we do it, but the conventional isr handers are missing in these APIs. can someone send me a code snippet, indicating how to achieve this? I am rather stuck without. thank you
UART RX FULL interrupt implementation
UART RX FULL interrupt implementation
- Attachments
-
- esp.png (186.3 KiB) Viewed 6878 times
Re: UART RX FULL interrupt implementation
Same problem.
From docs/en/migration-guides/peripherals.rst :
- :cpp:member:`uart_isr_register` and :cpp:member:`uart_isr_free` have been removed as the UART interrupt handling is closely related to the driver implementation.
How to specify my own interrupt handler?
From docs/en/migration-guides/peripherals.rst :
- :cpp:member:`uart_isr_register` and :cpp:member:`uart_isr_free` have been removed as the UART interrupt handling is closely related to the driver implementation.
How to specify my own interrupt handler?
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: UART RX FULL interrupt implementation
@imdaad: You're not supposed to, the interrupt is handled in the driver. You'd set the threshold of the RX buffer in the UART configuration, then (possibly in a separate task) you do a (blocking) read from the uart.
@john: You can still use the generic ESP-IDF interrupt allocator to allocate your 'raw' UART interrupt.
@john: You can still use the generic ESP-IDF interrupt allocator to allocate your 'raw' UART interrupt.
Re: UART RX FULL interrupt implementation
Hi,
AS far as I know, first of all you need to set the threshold you want and activate that specific interrupt in https://www.espressif.com/sites/default ... f#page=347 UART_INT_RAW_REG resister, which is the first bit in your case.
then you will pass the ISR config pointer to
For ESP32 UART driver installation, I advice you to follow the following UART event example:
https://github.com/espressif/esp-idf/tr ... art_events
AS far as I know, first of all you need to set the threshold you want and activate that specific interrupt in https://www.espressif.com/sites/default ... f#page=347 UART_INT_RAW_REG resister, which is the first bit in your case.
Code: Select all
uart_intr_config_t UART_ISR_Config =
{
.intr_enable_mask = 0b00000001,
.rxfifo_full_thresh = 50 //Change this threshold to suit your code
}
Code: Select all
uart_intr_config(uart_port_t uart_num, const uart_intr_config_t *intr_conf);
https://github.com/espressif/esp-idf/tr ... art_events
You can always visit my YouTube channel for embedded systems related tutorials
https://youtube.com/user/wardzx1
https://youtube.com/user/wardzx1
Who is online
Users browsing this forum: Baidu [Spider] and 64 guests