Re: UART Interrupt without UART driver
Posted: Thu Jan 02, 2025 8:18 pm
were you successful? I'm currently facing the same taskSuggest you read the technical reference manual (in as far as you haven't already) to handle interrupts on the UART side, but to connect the interrupt to an ISR, it'd be best to use esp_intr_alloc. You can do it by poking directly into the relevant registers as well, but since the ESP32 does run a RTOS and has other software running alongside yours as well, like it or not, you're best off using that function to get at least your interrupt routine set up.
Just a friendly warning: Generally, you're absolutely free to develop in whatever way you want, but I do hope you realize that 'bare metal' programming is one of the lesser trodden paths in ESP32 development; you're likely to find less examples and run into more gotchas than when you simply use ESP-IDF or another higher level SDK. Also, the WiFi stack does depend on the RTOS, so if your code doesn't play nice with that (e.g. in your code you're using ets_delay_us which is a spinloop) you're likely to run into issues there.