🤖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

    Scheduled Pinned Locked Moved General
    2 Posts 2 Posters 1.3k Views
    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 Offline
      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 Offline
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post