Skip to content

AW9523 interrupts not working on M5StamPLC #15

Description

@MaxiLargo

Describe the bug

Hi!

I'm trying to use the SYS_INT pin (G14) as an interrupt source to detect input changes from the AW9523 on the M5StampPLC.

However, when I toggle any of the physical inputs (IN1–IN8), G14 never changes state, always stays LOW, and the interrupt is never triggered.

To reproduce

This is a simple example:

#include <M5StamPLC.h>

volatile bool interrupt = false;

void IRAM_ATTR handleAwInterrupt() {
interrupt = true;
}

void setup() {
Serial.begin(115200);
M5StamPLC.begin();
pinMode(14, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(14), handleAwInterrupt, FALLING);
}

void loop() {
if (interrupt) {
interrupt = false;
Serial.println("Val changed");
}
}

Expected behavior

“When I get an input, the serial monitor will say ‘Val changed’.”

Screenshots

No response

Environment

  • OS:Windows 10 Home 22H2
  • IDE &IDE Version: Arduino IDE 2.3.6
  • Repository Version:

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • My report contains all necessary details

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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