🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    StamPLC: Interrupt of IO expander AW9523

    General
    2
    2
    35
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      nvko23
      last edited by

      I have a M5Stack StamPLC. According to the PCB schema, the ESP G14 (SYS_INT) is connected to the AW9523 INTN. According to AW9523 specs INTN indicates state changes of IO ports and it should be 0 (low-level active), if new state (interrupt request). Unfortunately INTN is always active. It doesn't matter how the AW9523 interrupt enable register is configured or whether data was already read. It's always active. According to AW9523 specs, a 4.7 kΩ resistor is needed to make INTN work properly. I can't see that on the PCB schema of StamPLC. But why is INTN then connected to the ESP? Or is any other IC in the StamPLC putting SYS_INT constantly to 0? Any hints?

      felmueF 1 Reply Last reply Reply Quote 0
      • felmueF
        felmue @nvko23
        last edited by felmue

        Hello @nvko23

        well, according to the schematics, SYS_INT is connected to multiple ICs, including PI4IOE5V6408, RX8130, AW9523, LM75 and INA226.

        The required pull-up resistor (5.1k) is R10 - it's drawn near PI4IOE5V6408 on the CPU schematic.

        Edit: I ran some tests - this is what I found:

        • Without any connections to Inputs 1 - 8 SYS_INT is high (as expected).
        • However if any input is asserted while powering up M5StampPLC SYS_INT goes low even though AW9523 interrupts are disabled during its initialization. See here.

        Adding _io_expander_b->resetIrq(); in the M5StapPLC library after disabling interrupts changes SYS_INT back to high.

        My conclusion: AW9523 by default at power up has interrupts enabled and any interrupt sticks even when interrupts are disabled later on.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • First post
          Last post