Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Arduino 2.0.0 - Question: wants to use UART Rx interrupt but still keeps HardwareSerial API to handles data from Rx FIFO #5678

Copy link
Copy link
Closed
@MomePP

Description

@MomePP
Issue body actions

Hardware:

Board: ESP32 Dev Module
Core Installation version: 2.0.0
IDE name: PlatformIO
Flash Frequency: 40Mhz
PSRAM enabled: no
Upload Speed: 921600
Computer OS: Mac OSX

Description:

Currently, I got UART interrupt working fine. I have created new class to inherits HardwareSerial then overrides begin() to enables interrupt routine. As my understanding from ESP32 docs, when registered interrupt isr, its override default isr handler. This means the Rx HardwareSerial that relies on IDF's API (eg. read, available, etc.) will be unusable, need to handles from isr by user. So, I have override HardwareSerial functions to points to a new create buffer, queue that handles the data from isr (likes an old implementation in 1.0.6).

I have take a look at uart-event but if i want to unpack my serial packet per byte, i think isr still the way to go. correct me if i misunderstood.

Is there any other solution to workaround this if i still want to use HardwareSerial functions (some libraries that based on default HardwareSerial functions) while using UART interrupt.

Cheers,
MomePP

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done
Show more project fields

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.