Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T-Watch S3 Support #2632

Merged
merged 19 commits into from
Jul 22, 2023
Merged

T-Watch S3 Support #2632

merged 19 commits into from
Jul 22, 2023

Conversation

thebentern
Copy link
Contributor

@thebentern thebentern commented Jul 19, 2023

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2023

🤖 Pull request artifacts

file commit
pr2632-firmware-2.1.20.71a54a5.zip 0694bf6

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 19, 2023
@thebentern
Copy link
Contributor Author

thebentern commented Jul 19, 2023

@mverch67 have you had issues with PlatformIO not flashing the device with the esp-builtin toolchain? It worked great the first time, but not subsequent upload attempts failed.

esptool.py v4.5.1
Wrote 0x1ff080 bytes to file /Users/thebentern/Documents/GitHub/firmware/.pio/build/t-watch-s3/firmware.factory.bin, ready to flash to offset 0x0
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-builtin, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esp-builtin
Uploading .pio/build/t-watch-s3/firmware.bin
Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:49)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1

adapter speed: 40000 kHz

Warn : Transport "jtag" was already selected
adapter speed: 12000 kHz

Error: esp_usb_jtag: could not find or open device!
** OpenOCD init failed **
shutdown command invoked

@mverch67
Copy link
Collaborator

mverch67 commented Jul 19, 2023

@mverch67 have you had issues with PlatformIO not flashing the device with the esp-builtin toolchain? It worked great the first time, but not subsequent upload attempts failed.

Yeah, I know that. There are two ways to flash successfully:

  • upload_protocol = esp-builtin ; requires boot mode (press boot-button while powering on), serial terminal could stay connected
  • upload_protocol = esptool: does not require boot mode, but serial terminal must be disconnected; often fails though ... then must switch back to esp-builtin

you may also try to use the "use_1200bps_touch": true ... and "wait_for_upload_port" : true ... maybe it helps

boards/t-watch-s3.json Outdated Show resolved Hide resolved
@thebentern
Copy link
Contributor Author

@lewisxhe are the GPIO pin references in the graphic at https://www.lilygo.cc/products/t-watch-s3 correct? I'm crashing on bootup because it's failing to init the SX1262, which 99% of the time is due to incorrect SPI pin numbers.

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 19, 2023
@mverch67
Copy link
Collaborator

mverch67 commented Jul 19, 2023

@lewisxhe are the GPIO pin references in the graphic at https://www.lilygo.cc/products/t-watch-s3 correct? I'm crashing on bootup because it's failing to init the SX1262, which 99% of the time is due to incorrect SPI pin numbers.

you could also try to set ST7789_SPI_HOST SPI3_HOST as TFT uses another SPI than LoRa

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 19, 2023
@thebentern
Copy link
Contributor Author

thebentern commented Jul 20, 2023

you could also try to set ST7789_SPI_HOST SPI3_HOST as TFT uses another SPI than LoRa

Ah good point. You think it might be SPI bus contention?

@lewisxhe
Copy link
Contributor

Screen and Radio use separate buses.

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 20, 2023
@thebentern
Copy link
Contributor Author

Screen and Radio use separate buses.

Thanks. We got past the radio issue and made some progress on other peripherals. I'm currently running into issues getting the tft.getTouch(x,y) to return something valid

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 20, 2023
@lewisxhe
Copy link
Contributor

lewisxhe commented Jul 21, 2023

You are using Bodmer's TFT_ ESPI built-in getTouch? TFT_ ESPI does not support capacitive screens and only supports xpt2046. The watch-s3 uses ft62xx

https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library/blob/t-watch-s3/src/LilyGoLib.cpp#L123-L123

@thebentern
Copy link
Contributor Author

You are using Bodmer's TFT_ ESPI built-in getTouch? TFT_ ESPI does not support capacitive screens and only supports xpt2046. The watch-s3 uses ft62xx

https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library/blob/t-watch-s3/src/LilyGoLib.cpp#L123-L123

Using LovyanGFX. That tip about the touch driver was the ticket. Thanks!
We were assuming a GT911 by default.

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 21, 2023
@thebentern
Copy link
Contributor Author

@lewisxhe last question. Trying to get the DRV2605 operational... I'm able to begin and issue commands but nothing is happening. I noticed that you have BLDO2 on for that in watch library. Is there anything else we need to be doing to allow the driver to actuate on drv.go()?

// DRV2605 power channel
PMU->setPowerChannelVoltage(XPOWERS_BLDO2, 3300);
PMU->enablePowerOutput(XPOWERS_BLDO2);

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 21, 2023
@lewisxhe
Copy link
Contributor

@lewisxhe last question. Trying to get the DRV2605 operational... I'm able to begin and issue commands but nothing is happening. I noticed that you have BLDO2 on for that in watch library. Is there anything else we need to be doing to allow the driver to actuate on drv.go()?

// DRV2605 power channel PMU->setPowerChannelVoltage(XPOWERS_BLDO2, 3300); PMU->enablePowerOutput(XPOWERS_BLDO2);

setWaveform(26) feels very slight and may not be felt, please try to run 75, or cycle test the most suitable value.

@thebentern thebentern marked this pull request as ready for review July 21, 2023 21:35
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 21, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 21, 2023
@thebentern thebentern changed the title T-Watch WIP T-Watch S3 Support Jul 22, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 22, 2023
@thebentern thebentern merged commit 0739bc0 into master Jul 22, 2023
50 of 51 checks passed
@thebentern thebentern deleted the t-watch-s3 branch July 22, 2023 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants