m5stack / M5Core-Ink

M5Stack CoreInk Arduino Library
MIT License
42 stars 33 forks source link

Serial does not work #24

Closed stephankoelle closed 3 months ago

stephankoelle commented 3 months ago

Describe the bug

When using any example serial does not print any out.

To reproduce

void setup() {
  M5.begin();
  while (!Serial);
  Serial.printf("this will not be printed\n");
}

Expected behavior

Serial should always work.

when I remove remove pinMode(1, OUTPUT); from M5CoreInk.cpp it works, what should the line do?

Its also important to know, that serial is inited with: 115200, that was unexpected.

Screenshots

No response

Environment

No response

Additional context

No response

Issue checklist

Tinyu-Zhao commented 3 months ago

It works very well, please try to upgrade the warehouse used, and use the correct board.

image
stephankoelle commented 3 months ago

New Platfromio Project: with:

[env:m5stack-coreink]
platform = espressif32
board = m5stack-coreink
framework = arduino
monitor_speed = 115200
lib_deps= m5stack/M5GFX@^0.1.16, m5stack/M5Core-Ink@^1.0.0 

code from: https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/Button/Button.ino

Screenshot 2024-06-12 at 11 34 20

=> serial after reset: no


remove the line:
pinMode(1, OUTPUT);

Screenshot 2024-06-12 at 11 42 40

=> serial after reset: yes

Here is one other person having a similar problem: https://forum.arduino.cc/t/serial-print-not-working-correctly-with-m5stack-coreink/1184227

The demo app itself work on the device.

Tinyu-Zhao commented 3 months ago

Using the coreink library on the master branch on GitHub, using your INI file, test the button example.

image
stephankoelle commented 3 months ago

What could be the difference? Maybe here?

PLATFORM: Espressif 32 (6.7.0) > M5Stack-Core Ink
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20016.0 (2.0.16) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Tinyu-Zhao commented 3 months ago

Try cloning the coreink repository into the lib in platformio.

Processing M5CoreInk (platform: espressif32; board: m5stack-coreink; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-coreink.html
PLATFORM: Espressif 32 (6.6.0) > M5Stack-Core Ink
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 125 compatible libraries
Scanning dependencies...
^CBuild interrupted.
AbortedByUser: Aborted by user

 *  终端进程“platformio 'run', '--environment', 'M5CoreInk'”已终止,退出代码: 1。 
 *  终端将被任务重用,按任意键关闭。 

 *  正在执行任务: platformio run --environment M5CoreInk 

Processing M5CoreInk (platform: espressif32; board: m5stack-coreink; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-coreink.html
PLATFORM: Espressif 32 (6.6.0) > M5Stack-Core Ink
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 125 compatible libraries
stephankoelle commented 3 months ago

could you try with the 1.0.0 release core-ink lib? like: lib_deps= m5stack/M5GFX@^0.1.16, m5stack/M5Core-Ink@^1.0.0 I have seen there are some commits after: M5Core-Ink@^1.0.0 release. Maybe the current version should be tagged as release?

stephankoelle commented 3 months ago

I have switched to master, no change for me ther

Tinyu-Zhao commented 3 months ago

I want to ask what model your computer is, is it from the Apple M3 chip series? If you still have the packaging, could you provide me with the SN code on the packaging.

eg: 10241718330352_ pic

Tinyu-Zhao commented 3 months ago

The problem has been identified, this issue will occur after Espressif 32 (6.6.0) version, it will not occur in 6.6.0 and below, I will fix it.