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

    AXP2101 not working properly CoreS3 with battery.

    ESP - IDF
    2
    4
    37
    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.
    • R
      RubberDuck
      last edited by

      We are using the M5 Stack with ESP-IDF. We have a CoreS3, Battery module and a CatM module.

      After running in the field for a while. some device are not coming online anymore.

      We tried resetting the device on location without success.
      The only way to properly reset the functionality is to unmount the battery and remount is (Making sure no power is going to the M5Stack.)

      We can also not fix the device be rewriting firmware.

      It turns out the power chip (Axp2101) isn't responding properly anymore. When we send command to it, it doesn't seem to work. (Sending 0x01 to 0x10 should power off the device, this doesn't happen).

      It's not a I2C problem, we can succesfully contact the RTC and the IMU on the same bus.

      We can write new firmware and flash it and the problem still occusrs, i can run some tests to get to the bottom of it.

      We've compared registers in the AXP2101 from a good sample and a bad sample.

      register good sample bad sample
      0x00 0x38 0x30
      0x01 0x32 0x4E
      0x03 0x4A 0x0C
      0x04 0x00 0x78
      0x05 0x00 0x7E
      0x06 0x00 0xED
      0x07 0x00 0xF9
      0x10 0x30 0x64
      0x12 0x00 0x8D
      0x13 0x03 0x73
      0x14 0x65 0x7E
      0x15 0x06 0x95
      0x16 0x04 0xE3
      0x17 0x00 0x0E
      0x18 0x0A 0x70
      0x19 0x06 0xF4
      0x1A 0xA1 0x00
      0x20 0x04 0x00
      0x21 0x20 0x00
      0x23 0x3F 0x00
      0x24 0x00 0x00
      0x25 0x18 0x00
      0x26 0x08 0x00
      0x27 0x00 0x00
      0x28 0x00 0x00
      0x29 0x00 0x00
      0x2A 0x00 0x00
      0x2B 0x00 0x00
      0x30 0x0F 0x00
      0x34 0x0C 0x00
      0x35 0xD8 0x00
      0x36 0x81 0x00
      0x37 0xF8 0x00
      0x38 0x13 0x00
      0x39 0x62 0x00
      0x3A 0x0E 0x00
      0x3B 0x80 0x00
      0x3C 0x00 0x00
      0x3D 0x00 0x00
      0x40 0xFF 0x00
      0x41 0xFC 0x00
      0x42 0x5F 0x00
      0x48 0x50 0x00
      0x49 0xA3 0x00
      0x4A 0x28 0x00
      0x50 0x1A 0x00
      0x52 0x02 0x00
      0x53 0x01 0x00
      0x54 0x29 0x00
      0x55 0x58 0x00
      0x56 0x3E 0x00
      0x57 0x4C 0x00
      0x58 0x00 0x00
      0x59 0x14 0x00
      0x5A 0x37 0x00
      0x5B 0x1E 0x00
      0x61 0x05 0x00
      0x62 0x08 0x00
      0x63 0x15 0x00
      0x64 0x03 0x00
      0x65 0x02 0x00
      0x67 0xE6 0x00
      0x68 0x01 0x00
      0x69 0x11 0x00
      0x6A 0x03 0x00
      0x80 0x05 0x00
      0x81 0x00 0x00
      0x82 0x12 0x00
      0x83 0x46 0x00
      0x84 0x69 0x00
      0x85 0x64 0x00
      0x86 0x00 0x00
      0x90 0xBF 0x00
      0x91 0x00 0x00
      0x92 0x0D 0x00
      0x93 0x1C 0x00
      0x94 0x1C 0x00
      0x95 0x1C 0x00
      0x96 0x00 0x00
      0x97 0x00 0x00
      0x98 0x0E 0x00
      0x99 0x18 0x00
      0x9A 0x00 0x00
      0xA1 0xFA 0x00
      0xA2 0x00 0x00
      0xA3 0x32 0x00

      What could cause this behaviour?

      How can it be resolved (using software preferably)

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

        Hello @RubberDuck

        just curious, any particular reason you did not read out register 0x22? It is my understanding that this register determines whether the system powers off or does a reset when writing 0x01 to register 0x10.

        Also curious, when the issue happens, is the battery full or close to be fully discharged?

        The register values of the bad AXP2101 seem to be random. Have you tried to lower the I2C bus speed?

        In my experience seemingly random issues often stem from bad / not sufficient power supply. Is the battery in good shape?

        Thanks
        Felix

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

        R 1 Reply Last reply Reply Quote 0
        • R
          RubberDuck @felmue
          last edited by

          @felmue

          The data seems to be random indeed, however, it is always the same.
          We did notice shark fin like signals on the i2c lines on 400k. We reduced it to 100k but the results stayed the same. We do not believe that the bad signal quality is causing the current issue we are having. On a good working board the signals look identical.

          For reference, here is inmage of the signal quality of the SCL/SDA line on 400k speed on the good board.:

          Image.jpg

          The register values are taken with 100000 speed.
          I think i forgot register 0x22. I've tested it and added it here:

          reg good sample bad sample
          0x22 0x06 0x00

          We've also tested writing the value 0 to 10 on register 0x04. On the good board we can read back the correct value. But on the bad board it always returns 0x78

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

            Hello @RubberDuck

            I can confirm the shark fin like signals on my M5CoreS3. I am no I2C expert, but I think they might be marginal and so maybe just barely working on one M5CoreS3 but not on the other when talking to AXP2101. Maybe a stronger pull-up resistor might help?

            BTW: I checked the I2C SCL line on an M5Core2 and it is much more rectangular, e.g. much more like I would expect it.

            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