Search found 6 matches

by torkleyy
Mon Sep 18, 2023 2:10 pm
Forum: ESP-IDF
Topic: UART data corrupted and events delayed while connecting to Wifi
Replies: 1
Views: 1667

UART data corrupted and events delayed while connecting to Wifi

I'm experiencing some weird issues when trying to receive data from UART while also connecting to a wifi.

Some details about my setup:

Board: Olimex ESP32-Gateway Rev. G
ESP IDF: 5.1.1
UART: UART1
Baud rate: 2400

My application is very time critical which is why I have configured all application ...
by torkleyy
Mon Sep 11, 2023 12:21 pm
Forum: ESP-IDF
Topic: How to use custom interrupt for handling UART
Replies: 11
Views: 6689

Re: How to use custom interrupt for handling UART

Thanks for the help, I was able to get it to work:

* install driver on task with CPU1 affinity
* set rx fifo full threshold to 1 and enable the corresponding interrupt
* block on DATA event (I use the events to detect a bunch of other conditions as well)
* do non blocking uart_read_bytes
* check ...
by torkleyy
Sun Sep 10, 2023 11:59 am
Forum: ESP-IDF
Topic: How to use custom interrupt for handling UART
Replies: 11
Views: 6689

Re: How to use custom interrupt for handling UART



That means, other tasks will need to yield before I'm able to receive the event. HAL provided by the IDF.


Not in ESP-IDF. We configure FreeRTOS as pre-emptive, meaning that if something happens (in an interrupt or otherwise) that un-blocks a task that is of higher priority than the one ...
by torkleyy
Sat Sep 09, 2023 6:38 pm
Forum: ESP-IDF
Topic: How to use custom interrupt for handling UART
Replies: 11
Views: 6689

Re: How to use custom interrupt for handling UART



event queues have more latency than that due to FreeRTOS context switches

Sounds quite implausible. Source?


From the FreeRTOS docs:

When a task attempts to read from an empty queue the task will be placed into the Blocked state (so it is not consuming any CPU time and other tasks can run ...
by torkleyy
Sat Sep 09, 2023 11:37 am
Forum: ESP-IDF
Topic: How to use custom interrupt for handling UART
Replies: 11
Views: 6689

Re: How to use custom interrupt for handling UART

Sorry, I wasn't clear about the uart_read_bytes . I called it busy looping on uart_read_bytes since the only option would be to call it with timeout NON_BLOCKING, since, as you say, otherwise the task will be suspended.

I cannot have the task get suspended because once I receive data on UART, it ...
by torkleyy
Fri Sep 08, 2023 10:53 am
Forum: ESP-IDF
Topic: How to use custom interrupt for handling UART
Replies: 11
Views: 6689

How to use custom interrupt for handling UART

Hi,

I would like to use custom interrupts for handling UART rx. The reason I cannot use event queues is that I will sometimes need to reply within 300us of receiving a byte (and event queues have more latency than that due to FreeRTOS context switches).

Note: I do not need high throughput, only ...

Go to advanced search