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

    [M5CoreS3] No UART on Port.C of DIN BASE

    Cores
    2
    5
    720
    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.
    • G
      Girgitt
      last edited by

      Hi There,
      I am having issue with CoreS3: UART on Port.C does not work in Platformio with Arduino framework.

      The same code works with Core2 v1

      Already tried swapping pin 17 and 18 but nothing on the oscilloscope.

      Already tried using serial2 instead of HardwareSerial 2.

      Did anyone face similar issue?

      main.cpp:

      #include <Arduino.h>
      #include <Wire.h>
      
      #include <M5Unified.h>
      
      #define CORE_S3
      
      #ifdef CORE_S3
      
          static const int SERVO_UART_TX = 17;
          static const int SERVO_UART_RX = 18;
      
      #elif defined CORE_2
      
          static const int SERVO_UART_TX = 13;
          static const int SERVO_UART_RX = 14; 
      #endif
      
      
      //HardwareSerial SerialServo(2);
      
      void setup() {
          M5.begin();  // Init M5Core.  εˆε§‹εŒ– M5Core
          // Serial2.begin(unsigned long baud, uint32_t config, int8_t rxPin, int8_t
          // txPin, bool invert)
          Serial.begin(115200);
          // Serial2.begin(115200, SERIAL_8N1, 13,
          //               14);  // Init serial port 2.  εˆε§‹εŒ–δΈ²ε£2
          Serial2.begin(1000000, SERIAL_8N1, SERVO_UART_TX, SERVO_UART_RX);  // Init serial port 2.  εˆε§‹εŒ–δΈ²ε£2
      
        M5.Lcd.printf("Started");
        delay(200);
      }
      
      void loop() {
          Serial.write("aaaaaaaaaaaaaaa");
          Serial2.write("bbbbbbbbbbbbbb");
          delay(100);
      }
      

      platformio.ini

      [env:m5stack-cores3]
      monitor_speed = 115200
      monitor_dtr = 0
      monitor_rts = 0
      platform = espressif32
      board = m5stack-cores3
      framework = arduino
      lib_deps = 
        m5stack/M5Unified@0.2.3
      
      felmueF 1 Reply Last reply Reply Quote 0
      • felmueF
        felmue @Girgitt
        last edited by

        Hello @Girgitt

        have you tried (as a test) to simply set the UART TX GPIO high or low?

        Could it be a contacts issue? Is the DIN Base stacked securely?

        Thanks
        Felix

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

        G 1 Reply Last reply Reply Quote 0
        • G
          Girgitt @felmue
          last edited by

          @felmue I tried different pins order, CoreS3 and Core2. Core2 works fine (UART on Port.C works) but CoreS3 gives no output on Port.C. I confirm each test result with a scope.

          The hardfware is stacked like this:
          [Core2/CoreS3]
          [stepmotor drivert v1.1]
          [din base]

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

            Hello @Girgitt

            sorry if I wasn't clear. I meant a simple blink program like the one below. Does that work on your M5CoreS3?

            If not, have you tried (as a test) without the Stepmotor Driver module?

            Thanks
            Felix

            #include <Arduino.h>
            
            #define TX_PIN GPIO_NUM_17
            
            void setup() {
              pinMode(TX_PIN, OUTPUT);
            }
            
            void loop() {
              digitalWrite(TX_PIN, HIGH);
              delay(1000);
              digitalWrite(TX_PIN, LOW);
              delay(2000);
            }
            

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

            G 1 Reply Last reply Reply Quote 0
            • G
              Girgitt @felmue
              last edited by

              @felmue I get output on pin 18 only (Port.C RX pin), pin 17 is always at 3.2V.

              When I tap directly into the pin header on CoreS3 the PC_TX is at 3.2V.

              It must be a faulty CoreS3 then.

              Thanks for your help.

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