Skip to content

Latest commit

 

History

History
97 lines (71 loc) · 3.36 KB

README.md

File metadata and controls

97 lines (71 loc) · 3.36 KB

rs-watch

rs-watch - the Open Source rust 🦀 + embassy 🫶 + Slint 🚀 based smartwatch, running on the ZSWatch-HW.

Disclaimer

All credits for the ZSWatch-HW goes to contributors of that project, as well as all HW related question.
They have a Discord channel for questions, as well as a very good documentation.

The primary goal of this project is not to become a fully featured watch, but to make it a platform to learn the technologies it's build upon.

In most of the cases, I'm no trying to re-invent the wheel, hence I gladly make use of already freely available software and drivers.
Whenever needed, updates and fixes are done to best suite the async nature of the rs-watch firmware.

Current state

  • Display & Brightness control
  • Touch controller
  • Slint-UI integration
  • (ongoing) UI design and example implementations
  • BLE integration (using trouble)
  • External flash
  • RTC
  • Integration of other sensors
  • Power management
  • ... and more

Videos and other media of the current development state can be found in the Wiki page of this repo.

Development

FW Debugging

Setup

rustup target add thumbv8m.main-none-eabihf
cargo install probe-rs

Required VsCode slint extension:

code --install-extension Slint.slint

First HW bring-up

In order to communicate for the first time with the MCU, you need to perform a full erase of the chip to clean the permission settings:

probe-rs erase --chip nRF5340_xxAA --allow-erase-all

Regardless of this command times-out, without cutting the power on the MCU, flash the pre-built network core application:

probe-rs download --chip nRF5340_xxAA --binary-format hex --probe 1209:4853 binaries/zswatch_nrf5340_CPUNET.hex 

ZSWatch-HW

Build and run

In order to build & run the code for the DK:

cargo run --release

nrf5340-DK

Display

The following display with integrated touch-controlled works well: ER-TFT1.28-2-5670-5407

Pin configuration

The DK doesn't provide access to certain pins (without HW changes).
Therefore these pins are mapped slightly differently as the ZSWatch-HW.

Description ZSWatch-HW nrf5340-DK
Display reset P0.03 P0.21
Touch controller SCL P1.03 P1.08
Touch controller SDA P1.02 P1.07

All other pins are matching the ZSWatch-HW (v5)

Build and run

In order to build & run the code for the DK:

cargo run --release --no-default-features --features hw-board-dk

Now, you can perform the standard cargo run command to flash the application core (the chip and other parameters are stored in .cargo/config.toml as default):

cargo run

Drivers

Touch controller

The driver for the cst816s touch controller is based on the work done on the pinetime-rs project.
I only made the required adaptions to make it embassy and async friendly.