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

    M5stickc plus2 and Tft_espi problem.

    Scheduled Pinned Locked Moved M5 Stick/StickC
    13 Posts 2 Posters 9.4k 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.
    • K Offline
      Kazik
      last edited by

      Hi
      I was trying to compile esp32 marauder for m5stickc plus2 but I have problem with lcd. It stays black. Fw seems to work because cli works. I changed pins and driver for ST7789_2 in User_Setup.h for Plus2 and nothing. For esp32 marauder you have to use old tft_espi lib (2.3.70) to proper compilation process. Maybe someone used tft_espi lib with plus2? There is compiled fw for plus (not plus2). So I suppose for Plus2 it is possible too.

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

        Hello @Kazik

        the LCD backlight is probably missing. It's controlled via GPIO27 driving VLED. See schematic. Also in the GFX library GPIO27 is setup as PWM backlight. See here.

        Thanks
        Felix

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

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          Kazik @felmue
          last edited by Kazik

          @felmue said in M5stickc plus2 and Tft_espi problem.:

          Hello @Kazik

          the LCD backlight is probably missing. It's controlled via GPIO27 driving VLED. See schematic. Also in the GFX library GPIO27 is setup as PWM backlight. See here.

          Thanks
          Felix

          Thank You very much it helped. But now i must be connected over usb to show something on screen. Without usb screen blinks for sec and black. And navigation over menu is very poor

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

            Hello @Kazik

            please read the yellow note from the documentation.

            After triggering the wake up signal, the hold(G4) pin needs to be set to a high level (1) in program initialization to maintain the power supply, otherwise the device will enter the shutdown state again.

            Thanks
            Felix

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

            K 1 Reply Last reply Reply Quote 0
            • K Offline
              Kazik @felmue
              last edited by

              @felmue said in M5stickc plus2 and Tft_espi problem.:

              Hello @Kazik

              please read the yellow note from the documentation.

              After triggering the wake up signal, the hold(G4) pin needs to be set to a high level (1) in program initialization to maintain the power supply, otherwise the device will enter the shutdown state again.

              Thanks
              Felix

              I dont know where to put this in marauder code. I need advice. I managed to compile the code to work on plus 2. only works if the usb cable is connected. Marauder code is very problematic for M5Stickc.

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

                Hello @Kazik

                you'd put that at the beginning of setup().

                Thanks
                Felix

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

                K 1 Reply Last reply Reply Quote 0
                • K Offline
                  Kazik @felmue
                  last edited by

                  @felmue just simple like this?
                  // Set digital pin 4 (GPIO4) to high state
                  pinMode(4, OUTPUT);
                  digitalWrite(4, HIGH);

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

                    Hello @Kazik

                    yes, that should do it.

                    Thanks
                    Felix

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

                    K 2 Replies Last reply Reply Quote 0
                    • K Offline
                      Kazik @felmue
                      last edited by Kazik

                      @felmue
                      Nothing changed :( i have no clue what is wrong.
                      EDIT Now its working Thank You very much

                      1 Reply Last reply Reply Quote 0
                      • K Offline
                        Kazik @felmue
                        last edited by

                        @felmue hellol could you tell me is pins to connect sd card module to plus2 are the same as plus?
                        3V3 > 3V3
                        CS > GND
                        MOSI > G26
                        CLK > G0
                        MISO > G36
                        GND > GND.
                        Of course I must change pins in source code.

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

                          Hello @Kazik

                          from what I can tell looking at the documentation for the two M5Sticks here and here I would say the same GPIOs can be used for both.

                          Please note: I do not have an M5StickCPlus2 so I cannot test this myself.

                          Thanks
                          Felix

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

                          K 1 Reply Last reply Reply Quote 0
                          • K Offline
                            Kazik @felmue
                            last edited by Kazik

                            @felmue So I source code I must change CS pin to LOW? To match for GND?

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

                              Hello @Kazik

                              SPI bus can handle multiple (slave) devices. Each has its own CS. See here.

                              That said, if the SD card it the only slave device it's ok to connect its CS directly to GND. If you want to use a GPIO for CS then yes, set it to LOW.

                              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