Skip to content

Are interrupts queued after call to noInterrupts()? #3312

@alexsr

Description

@alexsr

Hello everyone,
I am using an ESP32 DevKit C to communicate with an IMU.
This external device sends data when a data-ready pin is active. Therefore I trigger an interrupt on this pin.
However, I need to read the data that is sent by the IMU and send it to a different device. This would be susceptible to race conditions though.
I was wondering if using noInterrupts() followed by a data copy and interrupts() works here.
Especially, whether or not an interrupt, that is triggered while noInterrupts() is active, is queued and triggered once interrupts are enabled again.

Thank you.
Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions