<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Arteeh</id>
	<title>PINE64 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Arteeh"/>
	<link rel="alternate" type="text/html" href="https://wiki.pine64.org/wiki/Special:Contributions/Arteeh"/>
	<updated>2026-05-25T09:43:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_Hardware_Wishlist&amp;diff=14634</id>
		<title>PineTime Hardware Wishlist</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_Hardware_Wishlist&amp;diff=14634"/>
		<updated>2022-11-07T10:49:36Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Improve and expand Ox64 suggestion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains a list of things people wish PineTime did differently&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
&lt;br /&gt;
* Long pressing the button should power-cycle the watch without any software being involved&lt;br /&gt;
* Other display technology could be explored.&lt;br /&gt;
**[//en.Wikipedia.org/wiki/Transflective_liquid-crystal_display A transflective LCD]&lt;br /&gt;
*** Increased readability in bright daylight&lt;br /&gt;
**[//en.wikipedia.org/wiki/OLED OLED]&lt;br /&gt;
*** Self-emissive display (pixels emit their own light)&lt;br /&gt;
*** Allows for lower power usage with mostly black screens&lt;br /&gt;
*** Allows for low power visual notifications (imagine an always-on small red square in the corner to indicate a notification)&lt;br /&gt;
* Touchscreen with configurable sensitivity&lt;br /&gt;
** Ideal for gloved fingers and water droplet resistance&lt;br /&gt;
** Preferably it should remain capacitive, as a resistive touchscreen would have too many trade-offs.&lt;br /&gt;
* A slightly bigger 256×256 pixel display&lt;br /&gt;
** This resolution is preferable for its binary alignment for low-level simplicity&lt;br /&gt;
** It has the property that its X and Y coordinates are each addressable with a single byte, with no bounds checking&lt;br /&gt;
** Its total number of pixels is a power of 2 (65536), and each pixel is addressable with exactly 2 bytes.&lt;br /&gt;
** The [http://Pelulamu.net/ibniz IBNIZ (Ideally Bare Numeric Impression giZmo) virtual machine], designed for minimalist demoscene graphics, has chosen 256×256 for its virtual display specifically for code efficiency.&lt;br /&gt;
** If PineTime also chose 256×256 then it would be a target platform for unclipped IBNIZ demoscene programmes, which would be really fun to play around with on one's wrist!&lt;br /&gt;
* Full screen refresh is very slow&lt;br /&gt;
** A full 16-bit redraw on the display takes at worst 120ms, which is 8Hz&lt;br /&gt;
** Modest optimization is possible by adopting 12-bit color&lt;br /&gt;
** A smooth scrolling/usage/animation experience would be 30Hz minimum, preferably 60hz&lt;br /&gt;
** Display redraw is currently bottlenecked by the nRF52832 maximum SPI clock (8MHz).&lt;br /&gt;
** The nRF528(33/40) has one high speed SPI master which supports 32MHz, still well below the ST7789 maximum&lt;br /&gt;
** Parallel data transfer could be an option, but using more GPIOs (which don't look available)&lt;br /&gt;
* Some sort of scroll wheel would be nice for convenience.&lt;br /&gt;
* Changed GPIO assignment so more functionality is available (i.e. NFC and VSYNC)&lt;br /&gt;
* Wireless charging, or Qi Charging capability&lt;br /&gt;
* nRF5840 update&lt;br /&gt;
** 32MHz HS SPI, QuadSPI, CryptoCell + Secure Key Storage, more RAM, a coprocessor and the possibility to expose USB through power pins&lt;br /&gt;
* Preferably a pre-certified MCU module with a ceramic antenna&lt;br /&gt;
* Version without sensors but maybe bigger battery&lt;br /&gt;
* Pins on the programmer connector to allow UART while developing (currently there is a TX test point on PCB). (Note: There's ARM SemiHosting, ITM and Segger RTT)&lt;br /&gt;
* Connect SDO of ST7889 LCD controller to MCU.&lt;br /&gt;
** Allows MCU to execute READ commands&lt;br /&gt;
** Possibility of leveraging ST7889 RAM to save MCU RAM?&lt;br /&gt;
* LCD must be centered on case. Currently is not and watchfaces seems different when clock is put on the other wrist.&lt;br /&gt;
* A NFC antenna around the case, connected to the NFC pins.&lt;br /&gt;
* Used sensors should be NDA-free and preferably also blob-free for easier development&lt;br /&gt;
** Possibly replace BMA421 accelerometer&lt;br /&gt;
*** The BMA421 doesn't have a public datasheet&lt;br /&gt;
*** Special attention should be paid to advanced features, such as step counting integration or flick detection.&lt;br /&gt;
* PineTime SoC could support USB or have a FTDI chip with the relevant pins exposed.&lt;br /&gt;
** It could allow flashing a sealed device, just like Arduinos work.&lt;br /&gt;
** Alternatively, an USB-C port could be added that provides these features. &lt;br /&gt;
* A bigger pulldown resistor for the power button&lt;br /&gt;
** 100k still leaks a noticeable amount of power when the button is always on.&lt;br /&gt;
* Ceramic Bluetooth antenna for better signal reception&lt;br /&gt;
* An external RTC circuit&lt;br /&gt;
** Allows the main MCU go to deep-sleep while retaining time.&lt;br /&gt;
** Allows time retention through MCU reset.&lt;br /&gt;
* Ultra low quiescent current PMIC&lt;br /&gt;
** In theory could provide a hard reset capability based on button press&lt;br /&gt;
** Better deep sleep/shipping/storage/off lifetime&lt;br /&gt;
*** A nano-power system timer IC could in theory provide a RTC, MOSFET-controlled deep sleep, watchdog timer and button-controlled reset&lt;br /&gt;
** Built-in &amp;quot;fuel gauge&amp;quot; for better estimation of battery capacity&lt;br /&gt;
* Small Piezo Buzzer&lt;br /&gt;
** Use case would be for very short beeps (think old-school casio watch) as notification.&lt;br /&gt;
** Of course developers can PWM other frequency to make it sing, but piezos tend to be shrill.&lt;br /&gt;
* More RAM and external flash storage&lt;br /&gt;
** Currently, the 64 KB of RAM significantly restricts the possible complexity of the UI and other software.&lt;br /&gt;
** At least 1 MB of RAM would be required to enable more advanced features like text input with spelling checking and more images in the UI.&lt;br /&gt;
** At least 8 MB of flash storage would also be beneficial, as it would significantly increase the potential number of apps and possible functionality of the watch.&lt;br /&gt;
* A built-in microphone&lt;br /&gt;
** Would allow phone call functionality to be built into the watch.&lt;br /&gt;
** Could potentially allow for speech recognition for text input.&lt;br /&gt;
* PineTime Pro based on the Ox64/BL808&lt;br /&gt;
** Open hardware RISC-V based MCU&lt;br /&gt;
** Significant jump in performance&lt;br /&gt;
** Significant jump in memory and storage, allowing for more features and better UI's&lt;br /&gt;
** Bluetooth 5.2 with BLE&lt;br /&gt;
** SPI with up to 80MHz clock speed, addressing the bottleneck issue posted above&lt;br /&gt;
** Only a small jump in price&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTime]]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_Hardware_Wishlist&amp;diff=14633</id>
		<title>PineTime Hardware Wishlist</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_Hardware_Wishlist&amp;diff=14633"/>
		<updated>2022-11-07T10:10:26Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Add Ox64 based pinetime idea&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains a list of things people wish PineTime did differently&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
&lt;br /&gt;
* Long pressing the button should power-cycle the watch without any software being involved&lt;br /&gt;
* Other display technology could be explored.&lt;br /&gt;
**[//en.Wikipedia.org/wiki/Transflective_liquid-crystal_display A transflective LCD]&lt;br /&gt;
*** Increased readability in bright daylight&lt;br /&gt;
**[//en.wikipedia.org/wiki/OLED OLED]&lt;br /&gt;
*** Self-emissive display (pixels emit their own light)&lt;br /&gt;
*** Allows for lower power usage with mostly black screens&lt;br /&gt;
*** Allows for low power visual notifications (imagine an always-on small red square in the corner to indicate a notification)&lt;br /&gt;
* Touchscreen with configurable sensitivity&lt;br /&gt;
** Ideal for gloved fingers and water droplet resistance&lt;br /&gt;
** Preferably it should remain capacitive, as a resistive touchscreen would have too many trade-offs.&lt;br /&gt;
* A slightly bigger 256×256 pixel display&lt;br /&gt;
** This resolution is preferable for its binary alignment for low-level simplicity&lt;br /&gt;
** It has the property that its X and Y coordinates are each addressable with a single byte, with no bounds checking&lt;br /&gt;
** Its total number of pixels is a power of 2 (65536), and each pixel is addressable with exactly 2 bytes.&lt;br /&gt;
** The [http://Pelulamu.net/ibniz IBNIZ (Ideally Bare Numeric Impression giZmo) virtual machine], designed for minimalist demoscene graphics, has chosen 256×256 for its virtual display specifically for code efficiency.&lt;br /&gt;
** If PineTime also chose 256×256 then it would be a target platform for unclipped IBNIZ demoscene programmes, which would be really fun to play around with on one's wrist!&lt;br /&gt;
* Full screen refresh is very slow&lt;br /&gt;
** A full 16-bit redraw on the display takes at worst 120ms, which is 8Hz&lt;br /&gt;
** Modest optimization is possible by adopting 12-bit color&lt;br /&gt;
** A smooth scrolling/usage/animation experience would be 30Hz minimum, preferably 60hz&lt;br /&gt;
** Display redraw is currently bottlenecked by the nRF52832 maximum SPI clock (8MHz).&lt;br /&gt;
** The nRF528(33/40) has one high speed SPI master which supports 32MHz, still well below the ST7789 maximum&lt;br /&gt;
** Parallel data transfer could be an option, but using more GPIOs (which don't look available)&lt;br /&gt;
* Some sort of scroll wheel would be nice for convenience.&lt;br /&gt;
* Changed GPIO assignment so more functionality is available (i.e. NFC and VSYNC)&lt;br /&gt;
* Wireless charging, or Qi Charging capability&lt;br /&gt;
* nRF5840 update&lt;br /&gt;
** 32MHz HS SPI, QuadSPI, CryptoCell + Secure Key Storage, more RAM, a coprocessor and the possibility to expose USB through power pins&lt;br /&gt;
* PineTime Pro based on the Ox64&lt;br /&gt;
** RISV-V based MCU with high performance, lots of memory, bluetooth 5.2 and peripherals (SPI, I2C, USB)&lt;br /&gt;
* Preferably a pre-certified MCU module with a ceramic antenna&lt;br /&gt;
* Version without sensors but maybe bigger battery&lt;br /&gt;
* Pins on the programmer connector to allow UART while developing (currently there is a TX test point on PCB). (Note: There's ARM SemiHosting, ITM and Segger RTT)&lt;br /&gt;
* Connect SDO of ST7889 LCD controller to MCU.&lt;br /&gt;
** Allows MCU to execute READ commands&lt;br /&gt;
** Possibility of leveraging ST7889 RAM to save MCU RAM?&lt;br /&gt;
* LCD must be centered on case. Currently is not and watchfaces seems different when clock is put on the other wrist.&lt;br /&gt;
* A NFC antenna around the case, connected to the NFC pins.&lt;br /&gt;
* Used sensors should be NDA-free and preferably also blob-free for easier development&lt;br /&gt;
** Possibly replace BMA421 accelerometer&lt;br /&gt;
*** The BMA421 doesn't have a public datasheet&lt;br /&gt;
*** Special attention should be paid to advanced features, such as step counting integration or flick detection.&lt;br /&gt;
* PineTime SoC could support USB or have a FTDI chip with the relevant pins exposed.&lt;br /&gt;
** It could allow flashing a sealed device, just like Arduinos work.&lt;br /&gt;
** Alternatively, an USB-C port could be added that provides these features. &lt;br /&gt;
* A bigger pulldown resistor for the power button&lt;br /&gt;
** 100k still leaks a noticeable amount of power when the button is always on.&lt;br /&gt;
* Ceramic Bluetooth antenna for better signal reception&lt;br /&gt;
* An external RTC circuit&lt;br /&gt;
** Allows the main MCU go to deep-sleep while retaining time.&lt;br /&gt;
** Allows time retention through MCU reset.&lt;br /&gt;
* Ultra low quiescent current PMIC&lt;br /&gt;
** In theory could provide a hard reset capability based on button press&lt;br /&gt;
** Better deep sleep/shipping/storage/off lifetime&lt;br /&gt;
*** A nano-power system timer IC could in theory provide a RTC, MOSFET-controlled deep sleep, watchdog timer and button-controlled reset&lt;br /&gt;
** Built-in &amp;quot;fuel gauge&amp;quot; for better estimation of battery capacity&lt;br /&gt;
* Small Piezo Buzzer&lt;br /&gt;
** Use case would be for very short beeps (think old-school casio watch) as notification.&lt;br /&gt;
** Of course developers can PWM other frequency to make it sing, but piezos tend to be shrill.&lt;br /&gt;
* More RAM and external flash storage&lt;br /&gt;
** Currently, the 64 KB of RAM significantly restricts the possible complexity of the UI and other software.&lt;br /&gt;
** At least 1 MB of RAM would be required to enable more advanced features like text input with spelling checking and more images in the UI.&lt;br /&gt;
** At least 8 MB of flash storage would also be beneficial, as it would significantly increase the potential number of apps and possible functionality of the watch.&lt;br /&gt;
* A built-in microphone&lt;br /&gt;
** Would allow phone call functionality to be built into the watch.&lt;br /&gt;
** Could potentially allow for speech recognition for text input.&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTime]]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_Development&amp;diff=14632</id>
		<title>PineTime Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_Development&amp;diff=14632"/>
		<updated>2022-11-07T09:27:09Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Change wasp-os companion app to a more active fork&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reprogramming ==&lt;br /&gt;
&lt;br /&gt;
[[PineTime devkit wiring|Wire it up]] and then [[Reprogramming the PineTime| flash something]].&lt;br /&gt;
&lt;br /&gt;
== Available firmware and projects ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! FreeRTOS&lt;br /&gt;
|https://www.freertos.org&lt;br /&gt;
| https://sourceforge.net/projects/freertos/&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[[InfiniTime]] (GitHub: [https://github.com/JF002/Pinetime JF002/Pinetime])&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Zephyr&lt;br /&gt;
| https://www.zephyrproject.org&lt;br /&gt;
| https://github.com/zephyrproject-rtos/zephyr&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/najnesnaj/pinetime-zephyr najnesnaj/pinetime-zephyr]&lt;br /&gt;
|- &lt;br /&gt;
|[https://github.com/SuperPrower/pinetime_zephyr_sample_fw SuperPrower/pinetime_zephyr_sample_fw]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/Dejvino/pinetime-hermes-firmware Dejvino/pinetime-hermes-firmware]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/endian-albin/pinetime-hypnos endian-albin/pinetime-hypnos]&lt;br /&gt;
|-&lt;br /&gt;
|[https://zephyrlabs.github.io/Watchfaces/OmegaTime/ omegatime watchface]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! mynewt&lt;br /&gt;
| https://mynewt.apache.org/about/&lt;br /&gt;
| https://github.com/apache/mynewt-core&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/lupyuen/pinetime-rust-mynewt lupyuen/pinetime-rust-mynewt](Discontinued by Creator)&lt;br /&gt;
|-&lt;br /&gt;
|[https://gitlab.com/caspermeijn/klok caspermeijn/klok]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MbedOS&lt;br /&gt;
| https://os.mbed.com&lt;br /&gt;
| https://github.com/ARMmbed/mbed-os&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/sethitow/mbed-pinetime sethitow/mbed-pinetime]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/geoffrey-vl/mbed-pinetime geoffrey.vl/mbed-pinetime]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! RIOT&lt;br /&gt;
| http://riot-os.org/&lt;br /&gt;
| https://github.com/RIOT-OS/RIOT/&lt;br /&gt;
| [https://github.com/bosmoment/PineTime-apps bosmoment/PineTime-apps]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! TinyGo&lt;br /&gt;
| https://tinygo.org&lt;br /&gt;
| https://github.com/tinygo-org/tinygo&lt;br /&gt;
| [https://github.com/aykevl/go-smartwatch aykevl/go-smartwatch]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! wasp-os (MicroPython)&lt;br /&gt;
| https://wasp-os.readthedocs.io/&lt;br /&gt;
| https://github.com/daniel-thompson/wasp-os&lt;br /&gt;
| [https://wasp-os.readthedocs.io/en/latest/install.html#pine64-pinetime-developer-edition WaspOS PineTime install guide]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Rust + RTFM&lt;br /&gt;
| https://rtfm.rs/&lt;br /&gt;
| [https://github.com/rtfm-rs/cortex-m-rtfm rtfm-rs/cortex-m-rtfm]&lt;br /&gt;
| https://github.com/dbrgn/pinetime-rtfm/&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Bare Metal&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|https://github.com/xriss/timecake&lt;br /&gt;
|-&lt;br /&gt;
|https://github.com/Arc13/Pyrus&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/xriss/timecake xriss/timecake]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/Arc13/Pyrus Arc13/Pyrus]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! AdaFruit bootloader&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/adafruit/Adafruit_nRF52_Bootloader&lt;br /&gt;
| [https://github.com/daniel-thompson/wasp-bootloader daniel-thompson/wasp-bootloader]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Useful drivers&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/sethitow/mbed-pinetime&lt;br /&gt;
| [https://github.com/sethitow/mbed-pinetime/tree/master/drivers https://github.com/sethitow/mbed-pinetime]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Gadgetbridge (Android companion app)&lt;br /&gt;
| https://gadgetbridge.org/&lt;br /&gt;
| https://codeberg.org/Freeyourgadget/Gadgetbridge&lt;br /&gt;
| InfiniTime support in mainline&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Arduino&lt;br /&gt;
| https://youtu.be/4aFDjymXjOw&lt;br /&gt;
| https://github.com/atc1441/ATCwatch&lt;br /&gt;
| https://github.com/atc1441/ATCwatch&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! OTA Update Flasher / DaFlasher&lt;br /&gt;
| https://youtu.be/gUVEz-pxhgg&lt;br /&gt;
| https://github.com/atc1441/DaFlasherFiles&lt;br /&gt;
| https://github.com/atc1441/DaFlasherFiles&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! InfiniTime companion app for Linux&lt;br /&gt;
| [https://github.com/alexr4535/siglo alexr4535/siglo]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Wasp-os companion app for Linux&lt;br /&gt;
| [https://github.com/Siroj42/wasp-companion Siroj42/wasp-companion]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! UI design proposal&lt;br /&gt;
| [https://github.com/arteeh/pinetime arteeh/pinetime]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Flashing app for Linux&lt;br /&gt;
| [https://github.com/arteeh/pinetime-flasher arteeh/pinetime-flasher]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Flashing app for Windows&lt;br /&gt;
| [https://github.com/ZephyrLabs/PinetimeFlasher ZephyrLabs/PinetimeFlasher]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! ESP32 / ESP8266 SWD WebFlasher&lt;br /&gt;
| https://youtu.be/Iu6RoXRZxOk&lt;br /&gt;
| https://github.com/atc1441/ESP32_nRF52_SWD&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! InfiniTime companion daemon for Linux&lt;br /&gt;
| [https://gitea.arsenm.dev/Arsen6331/itd Arsen6331/itd]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Manuals ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/JF002/Pinetime InfiniTime installation]&lt;br /&gt;
* [https://github.com/najnesnaj/pinetime-zephyr Zephyr installation] Beginner manual which explains how to install Zephyr (by najnesnaj).&lt;br /&gt;
* [https://wasp-os.readthedocs.io/en/latest/ Wasp-OS installation] Full manual with install instructions and an application writer's guide.&lt;br /&gt;
&lt;br /&gt;
== How to write battery friendly software? ==&lt;br /&gt;
&lt;br /&gt;
The key to save battery is to enable only what you need when you need it. nRF52832 has a lot of functionalities allowing you to draw as little current as possible. Here are some tips and tricks:&lt;br /&gt;
&lt;br /&gt;
* Disable / shutdown / put in sleep mode '''all devices around the MCU''' (display controller, touch controller, external memory,...). &lt;br /&gt;
* Disable all '''peripheral inside the MCU''' when you don't need them (SPI, TWI(I²C),...). The power management of the NRF52832 is very smart and will completely shut down (power off and disable the clock) the peripheral when the software disables it.&lt;br /&gt;
* Put the MCU to sleep as soon and as often as possible. If you are not using a RTOS, this is done by calling ''WFE'' (wait for event) instruction. Most of the time, RTOS implement this functionality. For example, FreeRTOS calls it the ''tickless mode'' : it puts the CPU in sleep mode when no task is planned for execution for more than a specified time, and wakes up as soon as an event is detected or when a task is ready to run.&lt;br /&gt;
* Do not use logging (JLink RTT, SWO, semihosting,...), it uses a lot of power.&lt;br /&gt;
* Ensure that the debug circuitry of the MCU is not enabled when you measuring the battery life. The debug peripheral is enabled as soon as you connect a debugger to the device, and '''is not automatically disabled''', even if you disconnect the debugger you will have to wait for the battery to go flat to disable to port. The software running in the NRF52832 cannot disable the debug peripheral. How to disable the debug circuitry:&lt;br /&gt;
  - using ''nrfjprog --reset''&lt;br /&gt;
  - using JLinkExe : issue the command ''writeDP 1 0''&lt;br /&gt;
&lt;br /&gt;
  or with OpenOCD&lt;br /&gt;
  - issue the command ''halt''&lt;br /&gt;
  - issue the command ''flash fillw 0x10001208 0xFFFFFF00 0x01''&lt;br /&gt;
  - issue the command ''reset''&lt;br /&gt;
&lt;br /&gt;
  you can check if the debug port is enabled using the following code&lt;br /&gt;
  DWT-&amp;gt;CYCCNT ? &amp;quot;NO&amp;quot;:&amp;quot;YES&amp;quot;&lt;br /&gt;
* Read [https://infocenter.nordicsemi.com/pdf/nRF52832_Rev_2_Errata_v1.1.pdf the errata sheet of the MCU] and apply workarounds if they apply to your software.&lt;br /&gt;
&lt;br /&gt;
== Wishlist ==&lt;br /&gt;
&lt;br /&gt;
In order to keep track of features and changes to the hardware people would like to see, check out this article: [[PineTime Hardware Wishlist]]&lt;br /&gt;
&lt;br /&gt;
== Compatibility with other projects ==&lt;br /&gt;
&lt;br /&gt;
Different firmware running using different bootloaders and Bluetooth stacks on the nRF52832 have different requirements on how they should be initialised and what should be placed where in the internal flash.&lt;br /&gt;
&lt;br /&gt;
To keep track of what, how and why things work like they do across the different projects, check out the [[PineTime SD MCUBoot|PineTime SoftDevice and MCUBoot compatibility]] article.&lt;br /&gt;
&lt;br /&gt;
== Compatibility with companions apps and Bluetooth communication ==&lt;br /&gt;
&lt;br /&gt;
There are a lot of different firmware running on the Pinetime that implement different BLE APIs (time synchronization, notifications, ...). Companion apps must be able to differentiate between different firmware and forks of the same firmware. See [[PineTime Bluetooth]].&lt;br /&gt;
&lt;br /&gt;
== PineTime equivalents and jailbreaking ==&lt;br /&gt;
&lt;br /&gt;
This page contains a list of PineTime-like smartwatches that might be &amp;quot;jailbreakable&amp;quot; or a good source for ideas for the PineTime: [[PineTime Equivalents]]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTime]]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_Hardware_Wishlist&amp;diff=10005</id>
		<title>PineTime Hardware Wishlist</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_Hardware_Wishlist&amp;diff=10005"/>
		<updated>2021-04-23T07:15:21Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: FTDI chip idea&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains a list of things people wish PineTime did differently&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
&lt;br /&gt;
* Long pressing the button should power-cycle the watch without any software being involved&lt;br /&gt;
* Other display tech could be explored. [//en.Wikipedia.org/wiki/Transflective_liquid-crystal_display A transflective LCD] would probably be a nice option. Or potentially OLED?&lt;br /&gt;
* Touchscreen should possibly have a configurable sensitivity level for both glove-wearing and droplet-resistance. Preferably it should still be a capacitive one, a resistive touchscreen would have too many trade-offs.&lt;br /&gt;
* A slightly bigger 256×256 pixel graphics display size is preferable for its binary alignment, affording some low-level simplicity – it has the property that its X and Y coordinates are each addressable with a single byte, with no out-of-bounds; its total number of pixels is 65536 (another power of 2), and each pixel is addressable with exactly 2 bytes, with perfect efficiency. The [http://Pelulamu.net/ibniz IBNIZ (Ideally Bare Numeric Impression giZmo) virtual machine], designed for fun minimalist demoscene graphics, has chosen 256×256 for its virtual display, and makes use of these simplicity advantages. If PineTime also chose 256×256 then it would be a target platform for unclipped IBNIZ demoscene programmes, which would be really fun to play around with on one's wrist!&lt;br /&gt;
* A full redraw on the display takes 120ms at the very least, which is 8Hz. A smooth scrolling/usage/animation experience would be 30Hz minimum, preferably 60. I heard a rumor that the SPI connection to the display is a bottleneck.&lt;br /&gt;
* Some sort of scroll wheel would be nice for convenience.&lt;br /&gt;
* Changed GPIO assignment so more functionality is available (i.e. NFC and VSYNC)&lt;br /&gt;
* Wireless charging, or Qi Charging capability&lt;br /&gt;
* An external RTC circuit saving the current time to allow the main MCU go to deep-sleep.&lt;br /&gt;
* nRF5340 update: QSPI, CryptoCell + Secure Key Storage, has more RAM, a coprocessor and the possibility to expose USB through power pins&lt;br /&gt;
* Preferably a pre-certified MCU module with a ceramic antenna&lt;br /&gt;
* Version without sensors but maybe bigger battery&lt;br /&gt;
* A couple of pins on the programmer connector to allow UART while developing (currently there is a TX test point on PCB). (Note: There's ARM SemiHosting and Segger RTT)&lt;br /&gt;
* Connect the pin of LCD controller that allows RD/WR from it in order to save RAM on the MCU.&lt;br /&gt;
* LCD must be centered on case. Currently is not and watchfaces seems different when clock is put on the other wrist.&lt;br /&gt;
* A NFC antenna around the case, connected to the NFC pins.&lt;br /&gt;
* Used sensors should be NDA-free and preferably also blob-free. For example the BMA421 accelerometer doesn't have a datasheet (it seems private to some hardware integrators): a more open one would be much easier to develop for. Special attention should be paid to advanced features, such as step counting integration or flick detection.&lt;br /&gt;
* A future PineTime could have a built in FTDI chip connected to a USB-C port, which will allow flashing a sealed device, just like Arduino. The same USB-C could also be used for charging.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTime]]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_Development&amp;diff=9854</id>
		<title>PineTime Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_Development&amp;diff=9854"/>
		<updated>2021-04-13T15:42:41Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Update my links; clarify Siglo is a companion app&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reprogramming ==&lt;br /&gt;
&lt;br /&gt;
[[PineTime devkit wiring|Wire it up]] and then [[Reprogramming the PineTime| flash something]].&lt;br /&gt;
&lt;br /&gt;
== Available firmware and projects ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! FreeRTOS&lt;br /&gt;
|https://www.freertos.org&lt;br /&gt;
| https://sourceforge.net/projects/freertos/&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[[InfiniTime]] (GitHub: [https://github.com/JF002/Pinetime JF002/Pinetime])&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Zephyr&lt;br /&gt;
| https://www.zephyrproject.org&lt;br /&gt;
| https://github.com/zephyrproject-rtos/zephyr&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/najnesnaj/pinetime-zephyr najnesnaj/pinetime-zephyr]&lt;br /&gt;
|- &lt;br /&gt;
|[https://github.com/SuperPrower/pinetime_zephyr_sample_fw SuperPrower/pinetime_zephyr_sample_fw]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/Dejvino/pinetime-hermes-firmware Dejvino/pinetime-hermes-firmware]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/endian-albin/pinetime-hypnos endian-albin/pinetime-hypnos]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! mynewt&lt;br /&gt;
| https://mynewt.apache.org/about/&lt;br /&gt;
| https://github.com/apache/mynewt-core&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/lupyuen/pinetime-rust-mynewt lupyuen/pinetime-rust-mynewt]&lt;br /&gt;
|-&lt;br /&gt;
|[https://gitlab.com/caspermeijn/klok caspermeijn/klok]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MbedOS&lt;br /&gt;
| https://os.mbed.com&lt;br /&gt;
| https://github.com/ARMmbed/mbed-os&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/sethitow/mbed-pinetime sethitow/mbed-pinetime]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/geoffrey-vl/mbed-pinetime geoffrey.vl/mbed-pinetime]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! RIOT&lt;br /&gt;
| http://riot-os.org/&lt;br /&gt;
| https://github.com/RIOT-OS/RIOT/&lt;br /&gt;
| [https://github.com/bosmoment/PineTime-apps bosmoment/PineTime-apps]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! TinyGo&lt;br /&gt;
| https://tinygo.org&lt;br /&gt;
| https://github.com/tinygo-org/tinygo&lt;br /&gt;
| [https://github.com/aykevl/go-smartwatch aykevl/go-smartwatch]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! wasp-os (MicroPython)&lt;br /&gt;
| https://wasp-os.readthedocs.io/&lt;br /&gt;
| https://github.com/daniel-thompson/wasp-os&lt;br /&gt;
| [https://wasp-os.readthedocs.io/en/latest/install.html#pine64-pinetime-developer-edition WaspOS PineTime install guide]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Rust + RTFM&lt;br /&gt;
| https://rtfm.rs/&lt;br /&gt;
| [https://github.com/rtfm-rs/cortex-m-rtfm rtfm-rs/cortex-m-rtfm]&lt;br /&gt;
| https://github.com/dbrgn/pinetime-rtfm/&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Bare Metal&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|https://github.com/xriss/timecake&lt;br /&gt;
|-&lt;br /&gt;
|https://github.com/Arc13/Pyrus&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/xriss/timecake xriss/timecake]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/Arc13/Pyrus Arc13/Pyrus]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! AdaFruit bootloader&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/adafruit/Adafruit_nRF52_Bootloader&lt;br /&gt;
| [https://github.com/daniel-thompson/wasp-bootloader daniel-thompson/wasp-bootloader]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Useful drivers&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/sethitow/mbed-pinetime&lt;br /&gt;
| [https://github.com/sethitow/mbed-pinetime/tree/master/drivers https://github.com/sethitow/mbed-pinetime]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Android companion app&lt;br /&gt;
| https://gadgetbridge.org/&lt;br /&gt;
| https://codeberg.org/Freeyourgadget/Gadgetbridge&lt;br /&gt;
| [https://github.com/JF002/Pinetime InfiniTime] [https://codeberg.org/Freeyourgadget/Gadgetbridge/commit/9b8f4d329e49cafdfe0497ed38a715faa9f844c6 initial support added]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Arduino&lt;br /&gt;
| https://youtu.be/4aFDjymXjOw&lt;br /&gt;
| https://github.com/atc1441/ATCwatch&lt;br /&gt;
| https://github.com/atc1441/ATCwatch&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! OTA Update Flasher / DaFlasher&lt;br /&gt;
| https://youtu.be/gUVEz-pxhgg&lt;br /&gt;
| https://github.com/atc1441/DaFlasherFiles&lt;br /&gt;
| https://github.com/atc1441/DaFlasherFiles&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! InfiniTime companion app for Linux&lt;br /&gt;
| [https://github.com/alexr4535/siglo alexr4535/siglo]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Wasp-os companion app for Linux&lt;br /&gt;
| [https://github.com/arteeh/wasp-companion arteeh/wasp-companion]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! UI design proposal&lt;br /&gt;
| [https://github.com/arteeh/pinetime arteeh/pinetime]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Flashing app for Linux&lt;br /&gt;
| [https://github.com/arteeh/pinetime-flasher arteeh/pinetime-flasher]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Flashing app for Windows&lt;br /&gt;
| [https://github.com/ZephyrLabs/PinetimeFlasher ZephyrLabs/PinetimeFlasher]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Manuals ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/JF002/Pinetime InfiniTime installation]&lt;br /&gt;
* [https://github.com/najnesnaj/pinetime-zephyr Zephyr installation] Beginner manual which explains how to install Zephyr (by najnesnaj).&lt;br /&gt;
* [https://wasp-os.readthedocs.io/en/latest/ Wasp-OS installation] Full manual with install instructions and an application writer's guide.&lt;br /&gt;
&lt;br /&gt;
== How to write battery friendly software? ==&lt;br /&gt;
&lt;br /&gt;
The key to save battery is to enable only what you need when you need it. nRF52832 has a lot of functionalities allowing you to draw as little current as possible. Here are some tips and tricks:&lt;br /&gt;
&lt;br /&gt;
* Disable / shutdown / put in sleep mode '''all devices around the MCU''' (display controller, touch controller, external memory,...). &lt;br /&gt;
* Disable all '''peripheral inside the MCU''' when you don't need them (SPI, TWI(I²C),...). The power management of the NRF52832 is very smart and will completely shut down (power off and disable the clock) the peripheral when the software disables it.&lt;br /&gt;
* Put the MCU to sleep as soon and as often as possible. If you are not using a RTOS, this is done by calling ''WFE'' (wait for event) instruction. Most of the time, RTOS implement this functionality. For example, FreeRTOS calls it the ''tickless mode'' : it puts the CPU in sleep mode when no task is planned for execution for more than a specified time, and wakes up as soon as an event is detected or when a task is ready to run.&lt;br /&gt;
* Do not use logging (JLink RTT, SWO, semihosting,...), it uses a lot of power.&lt;br /&gt;
* Ensure that the debug circuitry of the MCU is not enabled when you measuring the battery life. The debug peripheral is enabled as soon as you connect a debugger to the device, and '''is not automatically disabled''', even if you disconnect the debugger you will have to wait for the battery to go flat to disable to port. The software running in the NRF52832 cannot disable the debug peripheral. How to disable the debug circuitry:&lt;br /&gt;
  - using ''nrfjprog --reset''&lt;br /&gt;
  - using JLinkExe : issue the command ''writeDP 1 0''&lt;br /&gt;
&lt;br /&gt;
  or with OpenOCD&lt;br /&gt;
  - issue the command ''halt''&lt;br /&gt;
  - issue the command ''flash fillw 0x10001208 0xFFFFFF00 0x01''&lt;br /&gt;
  - issue the command ''reset''&lt;br /&gt;
&lt;br /&gt;
  you can check if the debug port is enabled using the following code&lt;br /&gt;
  DWT-&amp;gt;CYCCNT ? &amp;quot;NO&amp;quot;:&amp;quot;YES&amp;quot;&lt;br /&gt;
* Read [https://infocenter.nordicsemi.com/pdf/nRF52832_Rev_2_Errata_v1.1.pdf the errata sheet of the MCU] and apply workarounds if they apply to your software.&lt;br /&gt;
&lt;br /&gt;
== Wishlist ==&lt;br /&gt;
&lt;br /&gt;
In order to keep track of features and changes to the hardware people would like to see, check out this article: [[PineTime Hardware Wishlist]]&lt;br /&gt;
&lt;br /&gt;
== Compatibility with other projects ==&lt;br /&gt;
&lt;br /&gt;
Different firmware running using different bootloaders and Bluetooth stacks on the nRF52832 have different requirements on how they should be initialised and what should be placed where in the internal flash.&lt;br /&gt;
&lt;br /&gt;
To keep track of what, how and why things work like they do across the different projects, check out the [[PineTime SD MCUBoot|PineTime SoftDevice and MCUBoot compatibility]] article.&lt;br /&gt;
&lt;br /&gt;
== Compatibility with companions apps and Bluetooth communication ==&lt;br /&gt;
&lt;br /&gt;
There are a lot of different firmware running on the Pinetime that implement different BLE APIs (time synchronization, notifications, ...). Companion apps must be able to differentiate between different firmware and forks of the same firmware. See [[PineTime Bluetooth]].&lt;br /&gt;
&lt;br /&gt;
== PineTime equivalents and jailbreaking ==&lt;br /&gt;
&lt;br /&gt;
This page contains a list of PineTime-like smartwatches that might be &amp;quot;jailbreakable&amp;quot; or a good source for ideas for the PineTime: [[PineTime Equivalents]]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTime]]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_Development&amp;diff=9291</id>
		<title>PineTime Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_Development&amp;diff=9291"/>
		<updated>2021-02-15T19:06:05Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Fix arteeh's links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reprogramming ==&lt;br /&gt;
&lt;br /&gt;
[[PineTime devkit wiring|Wire it up]] and then [[Reprogramming the PineTime| flash something]].&lt;br /&gt;
&lt;br /&gt;
== Available firmware and projects ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! FreeRTOS&lt;br /&gt;
|https://www.freertos.org&lt;br /&gt;
| https://sourceforge.net/projects/freertos/&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[[InfiniTime]] (GitHub: [https://github.com/JF002/Pinetime JF002/Pinetime])&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Zephyr&lt;br /&gt;
| https://www.zephyrproject.org&lt;br /&gt;
| https://github.com/zephyrproject-rtos/zephyr&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/najnesnaj/pinetime-zephyr najnesnaj/pinetime-zephyr]&lt;br /&gt;
|- &lt;br /&gt;
|[https://github.com/SuperPrower/pinetime_zephyr_sample_fw SuperPrower/pinetime_zephyr_sample_fw]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/Dejvino/pinetime-hermes-firmware Dejvino/pinetime-hermes-firmware]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/endian-albin/pinetime-hypnos endian-albin/pinetime-hypnos]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! mynewt&lt;br /&gt;
| https://mynewt.apache.org/about/&lt;br /&gt;
| https://github.com/apache/mynewt-core&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/lupyuen/pinetime-rust-mynewt lupyuen/pinetime-rust-mynewt]&lt;br /&gt;
|-&lt;br /&gt;
|[https://gitlab.com/caspermeijn/klok caspermeijn/klok]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MbedOS&lt;br /&gt;
| https://os.mbed.com&lt;br /&gt;
| https://github.com/ARMmbed/mbed-os&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/sethitow/mbed-pinetime sethitow/mbed-pinetime]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/geoffrey-vl/mbed-pinetime geoffrey.vl/mbed-pinetime]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! RIOT&lt;br /&gt;
| http://riot-os.org/&lt;br /&gt;
| https://github.com/RIOT-OS/RIOT/&lt;br /&gt;
| [https://github.com/bosmoment/PineTime-apps bosmoment/PineTime-apps]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! TinyGo&lt;br /&gt;
| https://tinygo.org&lt;br /&gt;
| https://github.com/tinygo-org/tinygo&lt;br /&gt;
| [https://github.com/aykevl/go-smartwatch aykevl/go-smartwatch]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! wasp-os (MicroPython)&lt;br /&gt;
| https://wasp-os.readthedocs.io/&lt;br /&gt;
| https://github.com/daniel-thompson/wasp-os&lt;br /&gt;
| [https://wasp-os.readthedocs.io/en/latest/install.html#pine64-pinetime-developer-edition WaspOS PineTime install guide]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! wasp-os Companion app for Linux&lt;br /&gt;
| [https://gitlab.com/arteeh/wasp-companion arteeh/wasp-companion]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Rust + RTFM&lt;br /&gt;
| https://rtfm.rs/&lt;br /&gt;
| [https://github.com/rtfm-rs/cortex-m-rtfm rtfm-rs/cortex-m-rtfm]&lt;br /&gt;
| https://github.com/dbrgn/pinetime-rtfm/&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Bare Metal&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|https://github.com/xriss/timecake&lt;br /&gt;
|-&lt;br /&gt;
|https://github.com/Arc13/Pyrus&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/xriss/timecake xriss/timecake]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/Arc13/Pyrus Arc13/Pyrus]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! AdaFruit bootloader&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/adafruit/Adafruit_nRF52_Bootloader&lt;br /&gt;
| [https://github.com/daniel-thompson/wasp-bootloader daniel-thompson/wasp-bootloader]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Useful drivers&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/sethitow/mbed-pinetime&lt;br /&gt;
| [https://github.com/sethitow/mbed-pinetime/tree/master/drivers https://github.com/sethitow/mbed-pinetime]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! UI concepts and drawings&lt;br /&gt;
| [https://gitlab.com/arteeh/pinetime-os arteeh/pinetime-os]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Flashing app for Linux&lt;br /&gt;
| [https://gitlab.com/arteeh/pinetime-flasher arteeh/pinetime-flasher]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Android companion app&lt;br /&gt;
| https://gadgetbridge.org/&lt;br /&gt;
| https://codeberg.org/Freeyourgadget/Gadgetbridge&lt;br /&gt;
| [https://github.com/JF002/Pinetime InfiniTime] [https://codeberg.org/Freeyourgadget/Gadgetbridge/commit/9b8f4d329e49cafdfe0497ed38a715faa9f844c6 initial support added]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Arduino&lt;br /&gt;
| https://youtu.be/4aFDjymXjOw&lt;br /&gt;
| https://github.com/atc1441/ATCwatch&lt;br /&gt;
| https://github.com/atc1441/ATCwatch&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! OTA Update Flasher / DaFlasher&lt;br /&gt;
| https://youtu.be/gUVEz-pxhgg&lt;br /&gt;
| https://github.com/atc1441/DaFlasherFiles&lt;br /&gt;
| https://github.com/atc1441/DaFlasherFiles&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Manuals ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/JF002/Pinetime InfiniTime installation]&lt;br /&gt;
* [https://github.com/najnesnaj/pinetime-zephyr Zephyr installation] Beginner manual which explains how to install Zephyr (by najnesnaj).&lt;br /&gt;
* [https://wasp-os.readthedocs.io/en/latest/ Wasp-OS installation] Full manual with install instructions and an application writer's guide.&lt;br /&gt;
&lt;br /&gt;
== How to write battery friendly software? ==&lt;br /&gt;
&lt;br /&gt;
The key to save battery is to enable only what you need when you need it. nRF52832 has a lot of functionalities allowing you to draw as little current as possible. Here are some tips and tricks:&lt;br /&gt;
&lt;br /&gt;
* Disable / shutdown / put in sleep mode '''all devices around the MCU''' (display controller, touch controller, external memory,...). &lt;br /&gt;
* Disable all '''peripheral inside the MCU''' when you don't need them (SPI, TWI(I²C),...). The power management of the NRF52832 is very smart and will completely shut down (power off and disable the clock) the peripheral when the software disables it.&lt;br /&gt;
* Put the MCU to sleep as soon and as often as possible. If you are not using a RTOS, this is done by calling ''WFE'' (wait for event) instruction. Most of the time, RTOS implement this functionality. For example, FreeRTOS calls it the ''tickless mode'' : it puts the CPU in sleep mode when no task is planned for execution for more than a specified time, and wakes up as soon as an event is detected or when a task is ready to run.&lt;br /&gt;
* Do not use logging (JLink RTT, SWO, semihosting,...), it uses a lot of power.&lt;br /&gt;
* Ensure that the debug circuitry of the MCU is not enabled when you measuring the battery life. The debug peripheral is enabled as soon as you connect a debugger to the device, and '''is not automatically disabled''', even if you disconnect the debugger you will have to wait for the battery to go flat to disable to port. The software running in the NRF52832 cannot disable the debug peripheral. How to disable the debug circuitry:&lt;br /&gt;
  - using ''nrfjprog --reset''&lt;br /&gt;
  - using JLinkExe : issue the command ''writeDP 1 0''&lt;br /&gt;
&lt;br /&gt;
  or with OpenOCD&lt;br /&gt;
  - issue the command ''halt''&lt;br /&gt;
  - issue the command ''flash fillw 0x10001208 0xFFFFFF00 0x01''&lt;br /&gt;
  - issue the command ''reset''&lt;br /&gt;
&lt;br /&gt;
  you can check if the debug port is enabled using the following code&lt;br /&gt;
  DWT-&amp;gt;CYCCNT ? &amp;quot;NO&amp;quot;:&amp;quot;YES&amp;quot;&lt;br /&gt;
* Read [https://infocenter.nordicsemi.com/pdf/nRF52832_Rev_2_Errata_v1.1.pdf the errata sheet of the MCU] and apply workarounds if they apply to your software.&lt;br /&gt;
&lt;br /&gt;
== Wishlist ==&lt;br /&gt;
&lt;br /&gt;
In order to keep track of features and changes to the hardware people would like to see, check out this article: [[PineTime Hardware Wishlist]]&lt;br /&gt;
&lt;br /&gt;
== Compatibility with other projects ==&lt;br /&gt;
&lt;br /&gt;
Different firmware running using different bootloaders and Bluetooth stacks on the nRF52832 have different requirements on how they should be initialised and what should be placed where in the internal flash.&lt;br /&gt;
&lt;br /&gt;
To keep track of what, how and why things work like they do across the different projects, check out the [[PineTime SD MCUBoot|PineTime SoftDevice and MCUBoot compatibility]] article.&lt;br /&gt;
&lt;br /&gt;
== Compatibility with companions apps and Bluetooth communication ==&lt;br /&gt;
&lt;br /&gt;
There are a lot of different firmware running on the Pinetime that implement different BLE APIs (time synchronization, notifications, ...). Companion apps must be able to differentiate between different firmware and forks of the same firmware. See [[PineTime Bluetooth]].&lt;br /&gt;
&lt;br /&gt;
== PineTime equivalents and jailbreaking ==&lt;br /&gt;
&lt;br /&gt;
This page contains a list of PineTime-like smartwatches that might be &amp;quot;jailbreakable&amp;quot; or a good source for ideas for the PineTime: [[PineTime Equivalents]]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTime]]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime&amp;diff=6708</id>
		<title>PineTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime&amp;diff=6708"/>
		<updated>2020-08-21T12:06:31Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Update links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
'''Read these first!'''&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Frequently_asked_questions_about_the_PineTime Frequently asked questions about the devkit]&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Reprogramming_the_PineTime Programming the PineTime]&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Lup_Yuen_Lee_Q%26A_about_PineTime Q&amp;amp;A about Rust and MyNewt for PineTime by Lup Yuen Lee]&lt;br /&gt;
* [[Reprogramming the PineTime]]&lt;br /&gt;
* [[PineTime devkit wiring]]&lt;br /&gt;
&lt;br /&gt;
== Current default OS ==&lt;br /&gt;
&lt;br /&gt;
The current default operating system on the PineTime is called [[InfiniTime]], first devkits shipped with a proprietary custom firmware. The project was started by JF002 and is shipped with the latest edition of PineTime. You can use various companion apps with the OS, for example Gadgetbridge.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
'''Dimensions:''' 37.5 x 40 x 11mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' 38 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''IP Rating:''' IP67 (waterproof to 1 meter) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 1.3 inches (33mm) diagonal&lt;br /&gt;
: '''Type:''' IPS capacitive touchscreen, RGB 65K colors&lt;br /&gt;
: '''Display Controller:''' ST7789&lt;br /&gt;
: '''Resolution:''' 240x240 pixels &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' Nordic Semiconductor nRF52832 &amp;lt;br&amp;gt;&lt;br /&gt;
'''Flash:''' 512KB with additional 4MB SPI NOR &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 64KB &amp;lt;br&amp;gt;&lt;br /&gt;
'''Bluetooth:''' 5.0 (including Bluetooth Low Energy) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sensors:''' Accelerometer, Heart rate sensor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Feedback:''' Vibration motor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' 170-180mAh LiPo&lt;br /&gt;
&lt;br /&gt;
== Driving the peripherals ==&lt;br /&gt;
&lt;br /&gt;
=== Display ===&lt;br /&gt;
&lt;br /&gt;
Note: The factory-default software on the PineTime does not auto-detect the display being disconnected when it has already booted. That can cause garbled output, to fix it just restart the PineTime.&lt;br /&gt;
&lt;br /&gt;
The display is driven using the ST7789 display controller. Use the following pins to drive the screen:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! PineTime pin&lt;br /&gt;
! ST7789 pin&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SCK (P0.02)&lt;br /&gt;
| SPI clock&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SDI (P0.03)&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RS (P0.18)&lt;br /&gt;
| Clock/data pin (CD)&lt;br /&gt;
|-&lt;br /&gt;
| LCD_CS (P0.25)&lt;br /&gt;
| Chip select&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RESET (P0.26)&lt;br /&gt;
| Display reset&lt;br /&gt;
|-&lt;br /&gt;
| LCD_BACKLIGHT_{LOW,MID,HIGH}&lt;br /&gt;
| Backlight (active low)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Chip select must be held low while driving the display. It must be high when using other SPI devices on the same bus (such as external flash storage) so that the display controller won't respond to the wrong commands.&lt;br /&gt;
* SPI must be used in mode 3. Mode 0 (the default) won't work.&lt;br /&gt;
* LCD_DISPLAY_* is used to enable the backlight. Set at least one to low to see anything on the screen.&lt;br /&gt;
* Use SPI at 8MHz (the fastest clock available on the nRF52832) because otherwise refreshing will be super slow.&lt;br /&gt;
&lt;br /&gt;
'''References''':&lt;br /&gt;
&lt;br /&gt;
[https://github.com/adafruit/Adafruit-ST7735-Library/ Adafruit ST7789 driver in cpp]&lt;br /&gt;
&lt;br /&gt;
=== Battery measurement ===&lt;br /&gt;
&lt;br /&gt;
Reading whether the PineTime has power attached is easy: simply read the charge indication pin (P0.12). When it is high it is running on battery, when it is low it is charging.&lt;br /&gt;
&lt;br /&gt;
Reading the battery voltage is a bit harder. For that you can use the battery voltage pin on P0.31 (AIN7). The returned value is 12 bits, which means it is 0..4095. You can get the measured voltage with the following formula, assuming a reference voltage of 3.3V (this is configurable in the ADC):&lt;br /&gt;
&lt;br /&gt;
 adcVoltage = adcValue / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
The measured voltage is actually half of the actual battery voltage, because the ADC is connected between a voltage divider where both resistors are 1MΩ. This can be corrected by multiplying the value:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2 / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
It's often better to avoid floating point values on embedded systems and in this case there is no reason to use float at all, we can just represent the value in millivolts. Therefore the formula can be simplified to:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / (4095 / 3.3)&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / 1241&lt;br /&gt;
&lt;br /&gt;
Converting this voltage to an estimated capacity in percent requires a more complicated algorithm, because Lithium-ion batteries have a non-linear discharge curve.&lt;br /&gt;
&lt;br /&gt;
=== How to write battery friendly software? === &lt;br /&gt;
&lt;br /&gt;
The key to save battery is to enable only what you need when you need it. NRF52832 has a lot of functionalities allowing you to draw as little current as possible. Here are some tips and tricks:&lt;br /&gt;
&lt;br /&gt;
* Disable / shutdown / put in sleep mode '''all devices around the MCU''' (display controller, touch controller, external memory,...). &lt;br /&gt;
* Disable all '''peripheral inside the MCU''' when you don't need them (SPI, TWI(I²C),...). The power management of the NRF52832 is very smart and will completely shut down (power off and disable the clock) the peripheral when the software disables it.&lt;br /&gt;
* Put the MCU to sleep as soon and as often as possible. If you are not using a RTOS, this is done by calling ''WFE'' (wait for event) instruction. Most of the time, RTOS implement this functionality. For example, FreeRTOS calls it the ''tickless mode'' : it puts the CPU in sleep mode when no task is planned for execution for more than a specified time, and wakes up as soon as an event is detected or when a task is ready to run.&lt;br /&gt;
* Do not use logging (JLink RTT, SWO, semihosting,...), it uses a lot of power.&lt;br /&gt;
* Ensure that the debug circuitry of the MCU is not enabled when you measuring the battery life. The debug peripheral is enabled as soon as you connect a debugger to the device, and '''is not automatically disabled''', even if you disconnect the debugger you will have to wait for the battery to go flat to disable to port. The software running in the NRF52832 cannot disable the debug peripheral. How to disable the debug circuitry:&lt;br /&gt;
  - using ''nrfjprog --reset''&lt;br /&gt;
  - using JLinkExe : issue the command ''writeDP 1 0''&lt;br /&gt;
&lt;br /&gt;
  or with OpenOCD&lt;br /&gt;
  - issue the command ''halt''&lt;br /&gt;
  - issue the command ''flash fillw 0x10001208 0xFFFFFF00 0x01''&lt;br /&gt;
  - issue the command ''reset''&lt;br /&gt;
&lt;br /&gt;
  you can check if the debug port is enabled using the following code&lt;br /&gt;
  DWT-&amp;gt;CYCCNT ? &amp;quot;NO&amp;quot;:&amp;quot;YES&amp;quot;&lt;br /&gt;
* Read [https://infocenter.nordicsemi.com/pdf/nRF52832_Rev_2_Errata_v1.1.pdf the errata sheet of the MCU] and apply workarounds if they apply to your software.&lt;br /&gt;
&lt;br /&gt;
=== Button ===&lt;br /&gt;
&lt;br /&gt;
The button on the side of the PineTime is disabled by default. To enable it, drive the button out pin (P0.15) high.&lt;br /&gt;
&lt;br /&gt;
While enabled, the button in pin (P0.13) will be high when the button is pressed, and low when it is not pressed.&lt;br /&gt;
&lt;br /&gt;
=== Touch panel ===&lt;br /&gt;
&lt;br /&gt;
The touch panel is controlled by a Hynitron CST816S chips. Unfortunately, there is not much information about this chip on the internet apart from the datasheet below and a [https://github.com/lupyuen/hynitron_i2c_cst0xxse/ reference driver]. This is enough to implement a basic driver, but crucial information needed to implement advanced functionalities are missing (I²C protocol and registers, timings, power modes,...).&lt;br /&gt;
&lt;br /&gt;
==== Pins ====&lt;br /&gt;
&lt;br /&gt;
* P0.10 : Reset&lt;br /&gt;
* P0.28 : Interrupt (signal to the CPU when a touch event is detected)&lt;br /&gt;
* P0.06 : I²C SDA&lt;br /&gt;
* P0.07 : I²C SCL&lt;br /&gt;
&lt;br /&gt;
==== I²C ====&lt;br /&gt;
&lt;br /&gt;
* Device address : 0x15&lt;br /&gt;
* Frequency : from 10Khz to 400Khz&lt;br /&gt;
&lt;br /&gt;
'''NOTE : ''' The controller go to sleep when no event is detected. In sleep mode, the controller does not communicate on the I²C bus (it appears disconnected). So, for the communication to work, you need to tap on the screen so that the chip wakes-up.&lt;br /&gt;
&lt;br /&gt;
==== Touch events ====&lt;br /&gt;
&lt;br /&gt;
Touch informations are available in the 63 first registers of the controller. Remember : the device is in sleep mode when no touch event is detected. It means that you can read the register only when the touch controller detected an event. You can use the ''Interrupt'' pin to detect such event in the software. &lt;br /&gt;
&lt;br /&gt;
These 63 bytes contain up to 10 touch point (X, Y, event type, pressure,...) : &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Byte&lt;br /&gt;
! Bit7&lt;br /&gt;
! Bit6&lt;br /&gt;
! Bit5&lt;br /&gt;
! Bit4&lt;br /&gt;
! Bit3&lt;br /&gt;
! Bit2&lt;br /&gt;
! Bit1&lt;br /&gt;
! Bit0&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|GestureID : (Gesture code ,&lt;br /&gt;
&lt;br /&gt;
0x00: no gesture,&lt;br /&gt;
&lt;br /&gt;
0x01: Slide down,&lt;br /&gt;
&lt;br /&gt;
0x02: Slide up,&lt;br /&gt;
&lt;br /&gt;
0x03: Slide left,&lt;br /&gt;
&lt;br /&gt;
0x04: Slide right,&lt;br /&gt;
&lt;br /&gt;
0x05: Single click,&lt;br /&gt;
&lt;br /&gt;
0x0B: Double click,&lt;br /&gt;
&lt;br /&gt;
0x0C: Long press) &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|? &lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Number of touch points &lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Event (0 = Down, 1 = Up, 2 = Contact)&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|X (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|X (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Touch ID&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Y (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Y (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Pressure (?)&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Miscellaneous (?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bytes 3 to 8 are repeated 10 times (10*6 + 3 = 63 bytes).&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
&lt;br /&gt;
* The touch controller seems to report only 1 touch point&lt;br /&gt;
* Fields X, Y, Number of touch points and touch ID are updated. The others are always 0.&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
&lt;br /&gt;
The reference driver specifies some registers and value, but there is no information about them: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!Register&lt;br /&gt;
!Address&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_INT_CNT&lt;br /&gt;
|0x8F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FLOW_WORK_CNT&lt;br /&gt;
|0x91&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_WORKMODE &lt;br /&gt;
|0x00&lt;br /&gt;
|0 = WORK, 0x40 = FACTORY&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID&lt;br /&gt;
|0xA3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID2&lt;br /&gt;
|0x9F&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_POWER_MODE&lt;br /&gt;
|0xA5&lt;br /&gt;
|0x03 = SLEEP (reset the touchpanel using the reset pin before using this register : pin_low, delay 5ms, pin_high, delay 50ms then write 3 to register 0xA5)&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FW_VER&lt;br /&gt;
|0xA6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_VENDOR_ID&lt;br /&gt;
|0xA8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_LCD_BUSY_NUM&lt;br /&gt;
|0xAB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FACE_DEC_MODE_EN&lt;br /&gt;
|0xB0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GLOVE_MODE_EN&lt;br /&gt;
|0xC0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_COVER_MODE_EN&lt;br /&gt;
|0xC1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHARGER_MODE_EN&lt;br /&gt;
|0x8B&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_EN&lt;br /&gt;
|0xD0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_OUTPUT_ADDRESS&lt;br /&gt;
|0xD3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_ESD_SATURATE 0xED&lt;br /&gt;
|0xED&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''WARNING : ''' &amp;lt;del&amp;gt;Writing the SLEEP command (write 0x05 in HYN_REG_POWER_MODE) seems to freeze the controller (it returns only static values) until the battery is totally drained and the whole system reset. Analysis and debugging is more than welcome!&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manuals / Articles ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/najnesnaj/pinetime-zephyr Beginner manual explained how you to programs and install zephyr on PineTime Dev Kit, big thanks to najnesnaj :-)]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/swlh/sneak-peek-of-pinetime-smart-watch-and-why-its-perfect-for-teaching-iot-81b74161c159 Sneak Peek of PineTime Smart Watch… And why it’s perfect for teaching IoT]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/building-a-rust-driver-for-pinetimes-touch-controller-cbc1a5d5d3e9 Building a Rust Driver for PineTime’s Touch Controller]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/porting-druid-rust-widgets-to-pinetime-smart-watch-7e1d5a5d977a Porting (druid) Rust Widgets to PineTime Smart Watch]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/optimising-pinetimes-display-driver-with-rust-and-mynewt-3ba269ea2f5c Optimising PineTime’s Display Driver with Rust and Mynewt]&lt;br /&gt;
&lt;br /&gt;
* [https://www.zephyrproject.org/getting-started-with-zephyr-rtos-on-nordic-nrf52832-hackable/ Getting Started with Zephyr RTOS on Nordic nRF52832 hackaBLE]&lt;br /&gt;
&lt;br /&gt;
* [https://blog.aegrel.ee/absniffer-cmsis-dap-sniffer.html Removing the lock and installing another firmware on the nRF52832 using CMSIS-DAP dongle on Linux]&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/JF002/nrf52-baseproject/wiki/Build,-program-and-debug-NRF52-project-with-JLink,-CMake-and-CLion Build, program and debug NRF52 project with JLink, CMake and CLion]&lt;br /&gt;
&lt;br /&gt;
* [https://www.nrbtech.io/blog/2020/1/4/using-clion-for-nordic-nrf52-projects Using CLion for Nordic nRF52 projects]&lt;br /&gt;
&lt;br /&gt;
* [https://dev.to/aaronc81/flashing-your-pinetime-using-an-st-link-and-openocd-54dd Flashing your PineTime using an ST-Link and OpenOCD]&lt;br /&gt;
&lt;br /&gt;
== Development efforts ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! FreeRTOS&lt;br /&gt;
|https://www.freertos.org&lt;br /&gt;
| https://sourceforge.net/projects/freertos/&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[[InfiniTime]] ([https://github.com/JF002/Pinetime JF002/Pinetime])&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Zephyr&lt;br /&gt;
| https://www.zephyrproject.org&lt;br /&gt;
| https://github.com/zephyrproject-rtos/zephyr&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/najnesnaj/pinetime-zephyr najnesnaj/pinetime-zephyr]&lt;br /&gt;
|- &lt;br /&gt;
|[https://github.com/SuperPrower/pinetime_zephyr_sample_fw SuperPrower/pinetime_zephyr_sample_fw]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/Dejvino/pinetime-hermes-firmware Dejvino/pinetime-hermes-firmware]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/endian-albin/pinetime-hypnos endian-albin/pinetime-hypnos]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! mynewt&lt;br /&gt;
| https://mynewt.apache.org/about/&lt;br /&gt;
| https://github.com/apache/mynewt-core&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/lupyuen/pinetime-rust-mynewt lupyuen/pinetime-rust-mynewt]&lt;br /&gt;
|-&lt;br /&gt;
|[https://gitlab.com/caspermeijn/klok caspermeijn/klok]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MbedOS&lt;br /&gt;
| https://os.mbed.com&lt;br /&gt;
| https://github.com/ARMmbed/mbed-os&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/sethitow/awesome-pinetime sethitow/mbed-pinetime]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/geoffrey-vl/mbed-pinetime geoffrey.vl/mbed-pinetime]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! RIOT&lt;br /&gt;
| http://riot-os.org/&lt;br /&gt;
| https://github.com/RIOT-OS/RIOT/&lt;br /&gt;
| [https://github.com/bosmoment/PineTime-apps bosmoment/PineTime-apps]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! TinyGo&lt;br /&gt;
| https://tinygo.org&lt;br /&gt;
| https://github.com/tinygo-org/tinygo&lt;br /&gt;
| [https://github.com/aykevl/go-smartwatch aykevl/go-smartwatch]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! wasp-os (MicroPython)&lt;br /&gt;
| https://wasp-os.readthedocs.io/&lt;br /&gt;
| https://github.com/daniel-thompson/wasp-os&lt;br /&gt;
| [https://wasp-os.readthedocs.io/en/latest/install.html#pine64-pinetime-developer-edition PineTime install guide]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Rust + RTFM&lt;br /&gt;
| https://rtfm.rs/&lt;br /&gt;
| [https://github.com/rtfm-rs/cortex-m-rtfm rtfm-rs/cortex-m-rtfm]&lt;br /&gt;
| https://github.com/dbrgn/pinetime-rtfm/&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Bare Metal&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|https://github.com/xriss/timecake&lt;br /&gt;
|-&lt;br /&gt;
|https://github.com/Arc13/Pyrus&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/xriss/timecake xriss/timecake]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/Arc13/Pyrus Arc13/Pyrus]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
! AdaFruit bootloader&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/adafruit/Adafruit_nRF52_Bootloader&lt;br /&gt;
| [https://github.com/daniel-thompson/wasp-bootloader daniel-thompson/wasp-bootloader]&lt;br /&gt;
|-&lt;br /&gt;
! Useful drivers&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/sethitow/mbed-pinetime&lt;br /&gt;
| [https://github.com/sethitow/mbed-pinetime/tree/master/drivers https://github.com/sethitow/mbed-pinetime]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! UI concepts and drawings&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [https://gitlab.com/arteeh/pinetime-os arteeh/pinetime-os]&lt;br /&gt;
|-&lt;br /&gt;
! Linux companion app&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [https://gitlab.com/arteeh/pinetime-companion arteeh/pinetime-companion]&lt;br /&gt;
|-&lt;br /&gt;
! Arduino&lt;br /&gt;
| https://youtu.be/4aFDjymXjOw&lt;br /&gt;
| https://github.com/atc1441/ATCwatch&lt;br /&gt;
| https://github.com/atc1441/ATCwatch&lt;br /&gt;
|-&lt;br /&gt;
! OTA Update Flasher / DaFlasher&lt;br /&gt;
| https://youtu.be/gUVEz-pxhgg&lt;br /&gt;
| https://github.com/atc1441/DaFlasherFiles&lt;br /&gt;
| https://github.com/atc1441/DaFlasherFiles&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Wishlist ===&lt;br /&gt;
&lt;br /&gt;
In order to keep track of features and changes to the hardware people would like to see, check out this article: [[PineTime hardware wishlist]]&lt;br /&gt;
&lt;br /&gt;
=== Compatibility with other projects ===&lt;br /&gt;
&lt;br /&gt;
Different firmware running using different bootloaders and Bluetooth stacks on the nRF52832 have different requirements on how they should be initialised and what should be placed where in the internal flash.&lt;br /&gt;
&lt;br /&gt;
To keep track of what, how and why things work like they do across the different projects, check out the [[PineTime SD MCUBoot|PineTime SoftDevice and MCUBoot compatibility]] article.&lt;br /&gt;
&lt;br /&gt;
== Datasheets and Schematics ==&lt;br /&gt;
&lt;br /&gt;
=== Schematics ===&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Schematic-V1.0a-20191103.pdf PineTime Schematic ver1.0a]&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Port%20Assignment%20rev1.0.pdf PineTime GPIO Port Assignment ver1.0]&lt;br /&gt;
&lt;br /&gt;
Note: The part number for the SPI FLASH in the schematic diagram is not correct, the PineTime features a larger external FLASH device, see below.&lt;br /&gt;
&lt;br /&gt;
=== Chip Datasheets ===&lt;br /&gt;
* NORDIC nRF52832 information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/nRF52832%20product%20brief.pdf nRF52832 Product Brief]&lt;br /&gt;
** [https://infocenter.nordicsemi.com/pdf/nRF52832_PS_v1.1.pdf nRF52832 Product Specification v1.1]&lt;br /&gt;
* ARMv7-M information:&lt;br /&gt;
** [https://static.docs.arm.com/ddi0403/eb/DDI0403E_B_armv7m_arm.pdf ARMv7-M Architecture Reference Manual]&lt;br /&gt;
&lt;br /&gt;
=== Component Datasheets ===&lt;br /&gt;
* PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGM40561.pdf SGMicro SGM40561 Single Cell Charger Datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGMICRO-SGM2036.pdf SGMicro SGM2036 3.3V Low Power Low Dropout RF Linear Regulator Datasheet]&lt;br /&gt;
* SPI Flash information:&lt;br /&gt;
** [https://www.elnec.com/en/device/XTX/XT25F32B+%28QuadSPI%29+%5BSOP8-200%5D/ XTX XT25F32B 32Mb(4MB) SPI NOR Flash] (data sheets for this part are hard to find but it acts similar to other QuadSPI SPI NOR Flash such as [https://www.macronix.com/Lists/Datasheet/Attachments/7426/MX25L3233F,%203V,%2032Mb,%20v1.6.pdf Macronix 32Mb(4MB) SPI NOR Flash])&lt;br /&gt;
** IDs for XT25F32B are: manufacturer (0x0b), device (0x15), memory type (0x40), density (0x16)&lt;br /&gt;
* LCD Panel:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20LCD%20Panel.jpg 1.3&amp;quot; 240x240 IPS LCD Panel Specification for PineTime]&lt;br /&gt;
** [https://wiki.pine64.org/images/5/54/ST7789V_v1.6.pdf 11.6&amp;quot; Sitronix LCD Driver/Controller Datasheet]&lt;br /&gt;
* Touchpad information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20Touch%20Panel.jpg Touchpad Specification for PineTimel]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/CST816S数据手册V1.1.pdf 11.6&amp;quot; Hynitron CST816S Capacitive Touch Controller Datasheet in Chinese]&lt;br /&gt;
*** [https://wiki.pine64.org/images/5/51/CST816S%E6%95%B0%E6%8D%AE%E6%89%8B%E5%86%8CV1.1.en.pdf English Translation]&lt;br /&gt;
* Sensor:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf BOSCH BMA421 Triaxial VAcceleration Sensor Product Brief]&lt;br /&gt;
** [https://wiki.pine64.org/images/c/cc/Bst-bma400-ds000.pdf BOSCH BMA400 3-axes ultra-low power accelerometer datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/HRS3300%20Heart%20Rate%20Sensor.pdf TianYiHeXin HRS3300 PPG Heart Rate Sensor Data Sheet]&lt;br /&gt;
&lt;br /&gt;
= Community =&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=134 PineTime forum]&lt;br /&gt;
* [https://app.element.io/#/room/#pinetime:matrix.org Matrix Channel] (No login required to read)&lt;br /&gt;
* IRC Server: [ircs://irc.pine64.org#pinetime irc.pine64.org] Channel: PineTime&lt;br /&gt;
* [https://t.me/pinetime Telegram group]&lt;br /&gt;
* [https://discordapp.com/invite/DgB7kzr Discord server invite link]&lt;br /&gt;
&lt;br /&gt;
= PineTime equivalents and jailbreaking =&lt;br /&gt;
&lt;br /&gt;
This page contains a list of PineTime-like smartwatches that might be &amp;quot;jailbreakable&amp;quot; or a good source for ideas for the PineTime: [[PineTime Equivalents]]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime&amp;diff=6684</id>
		<title>PineTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime&amp;diff=6684"/>
		<updated>2020-08-19T13:52:06Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Add arteeh companion app&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
'''Read these first!'''&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Frequently_asked_questions_about_the_PineTime Frequently asked questions about the devkit]&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Reprogramming_the_PineTime Programming the PineTime]&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Lup_Yuen_Lee_Q%26A_about_PineTime Q&amp;amp;A about Rust and MyNewt for PineTime by Lup Yuen Lee]&lt;br /&gt;
* [[Reprogramming the PineTime]]&lt;br /&gt;
* [[PineTime devkit wiring]]&lt;br /&gt;
&lt;br /&gt;
== Current default OS ==&lt;br /&gt;
&lt;br /&gt;
The current default operating system on the PineTime is called [[InfiniTime]], first devkits shipped with a proprietary custom firmware. The project was started by JF002 and is shipped with the latest edition of PineTime. You can use various companion apps with the OS, for example Gadgetbridge.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
'''Dimensions:''' 37.5 x 40 x 11mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' 38 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''IP Rating:''' IP67 (waterproof to 1 meter) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 1.3 inches (33mm) diagonal&lt;br /&gt;
: '''Type:''' IPS capacitive touchscreen, RGB 65K colors&lt;br /&gt;
: '''Display Controller:''' ST7789&lt;br /&gt;
: '''Resolution:''' 240x240 pixels &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' Nordic Semiconductor nRF52832 &amp;lt;br&amp;gt;&lt;br /&gt;
'''Flash:''' 512KB with additional 4MB SPI NOR &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 64KB &amp;lt;br&amp;gt;&lt;br /&gt;
'''Bluetooth:''' 5.0 (including Bluetooth Low Energy) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sensors:''' Accelerometer, Heart rate sensor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Feedback:''' Vibration motor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' 170-180mAh LiPo&lt;br /&gt;
&lt;br /&gt;
== Driving the peripherals ==&lt;br /&gt;
&lt;br /&gt;
=== Display ===&lt;br /&gt;
&lt;br /&gt;
Note: The factory-default software on the PineTime does not auto-detect the display being disconnected when it has already booted. That can cause garbled output, to fix it just restart the PineTime.&lt;br /&gt;
&lt;br /&gt;
The display is driven using the ST7789 display controller. Use the following pins to drive the screen:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! PineTime pin&lt;br /&gt;
! ST7789 pin&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SCK (P0.02)&lt;br /&gt;
| SPI clock&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SDI (P0.03)&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RS (P0.18)&lt;br /&gt;
| Clock/data pin (CD)&lt;br /&gt;
|-&lt;br /&gt;
| LCD_CS (P0.25)&lt;br /&gt;
| Chip select&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RESET (P0.26)&lt;br /&gt;
| Display reset&lt;br /&gt;
|-&lt;br /&gt;
| LCD_BACKLIGHT_{LOW,MID,HIGH}&lt;br /&gt;
| Backlight (active low)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Chip select must be held low while driving the display. It must be high when using other SPI devices on the same bus (such as external flash storage) so that the display controller won't respond to the wrong commands.&lt;br /&gt;
* SPI must be used in mode 3. Mode 0 (the default) won't work.&lt;br /&gt;
* LCD_DISPLAY_* is used to enable the backlight. Set at least one to low to see anything on the screen.&lt;br /&gt;
* Use SPI at 8MHz (the fastest clock available on the nRF52832) because otherwise refreshing will be super slow.&lt;br /&gt;
&lt;br /&gt;
'''References''':&lt;br /&gt;
&lt;br /&gt;
[https://github.com/adafruit/Adafruit-ST7735-Library/ Adafruit ST7789 driver in cpp]&lt;br /&gt;
&lt;br /&gt;
=== Battery measurement ===&lt;br /&gt;
&lt;br /&gt;
Reading whether the PineTime has power attached is easy: simply read the charge indication pin (P0.12). When it is high it is running on battery, when it is low it is charging.&lt;br /&gt;
&lt;br /&gt;
Reading the battery voltage is a bit harder. For that you can use the battery voltage pin on P0.31 (AIN7). The returned value is 12 bits, which means it is 0..4095. You can get the measured voltage with the following formula, assuming a reference voltage of 3.3V (this is configurable in the ADC):&lt;br /&gt;
&lt;br /&gt;
 adcVoltage = adcValue / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
The measured voltage is actually half of the actual battery voltage, because the ADC is connected between a voltage divider where both resistors are 1MΩ. This can be corrected by multiplying the value:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2 / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
It's often better to avoid floating point values on embedded systems and in this case there is no reason to use float at all, we can just represent the value in millivolts. Therefore the formula can be simplified to:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / (4095 / 3.3)&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / 1241&lt;br /&gt;
&lt;br /&gt;
Converting this voltage to an estimated capacity in percent requires a more complicated algorithm, because Lithium-ion batteries have a non-linear discharge curve.&lt;br /&gt;
&lt;br /&gt;
=== How to write battery friendly software? === &lt;br /&gt;
&lt;br /&gt;
The key to save battery is to enable only what you need when you need it. NRF52832 has a lot of functionalities allowing you to draw as little current as possible. Here are some tips and tricks:&lt;br /&gt;
&lt;br /&gt;
* Disable / shutdown / put in sleep mode '''all devices around the MCU''' (display controller, touch controller, external memory,...). &lt;br /&gt;
* Disable all '''peripheral inside the MCU''' when you don't need them (SPI, TWI(I²C),...). The power management of the NRF52832 is very smart and will completely shut down (power off and disable the clock) the peripheral when the software disables it.&lt;br /&gt;
* Put the MCU to sleep as soon and as often as possible. If you are not using a RTOS, this is done by calling ''WFE'' (wait for event) instruction. Most of the time, RTOS implement this functionality. For example, FreeRTOS calls it the ''tickless mode'' : it puts the CPU in sleep mode when no task is planned for execution for more than a specified time, and wakes up as soon as an event is detected or when a task is ready to run.&lt;br /&gt;
* Do not use logging (JLink RTT, SWO, semihosting,...), it uses a lot of power.&lt;br /&gt;
* Ensure that the debug circuitry of the MCU is not enabled when you measuring the battery life. The debug peripheral is enabled as soon as you connect a debugger to the device, and '''is not automatically disabled''', even if you disconnect the debugger you will have to wait for the battery to go flat to disable to port. The software running in the NRF52832 cannot disable the debug peripheral. How to disable the debug circuitry:&lt;br /&gt;
  - using ''nrfjprog --reset''&lt;br /&gt;
  - using JLinkExe : issue the command ''writeDP 1 0''&lt;br /&gt;
&lt;br /&gt;
  or with OpenOCD&lt;br /&gt;
  - issue the command ''halt''&lt;br /&gt;
  - issue the command ''flash fillw 0x10001208 0xFFFFFF00 0x01''&lt;br /&gt;
  - issue the command ''reset''&lt;br /&gt;
&lt;br /&gt;
  you can check if the debug port is enabled using the following code&lt;br /&gt;
  DWT-&amp;gt;CYCCNT ? &amp;quot;NO&amp;quot;:&amp;quot;YES&amp;quot;&lt;br /&gt;
* Read [https://infocenter.nordicsemi.com/pdf/nRF52832_Rev_2_Errata_v1.1.pdf the errata sheet of the MCU] and apply workarounds if they apply to your software.&lt;br /&gt;
&lt;br /&gt;
=== Button ===&lt;br /&gt;
&lt;br /&gt;
The button on the side of the PineTime is disabled by default. To enable it, drive the button out pin (P0.15) high.&lt;br /&gt;
&lt;br /&gt;
While enabled, the button in pin (P0.13) will be high when the button is pressed, and low when it is not pressed.&lt;br /&gt;
&lt;br /&gt;
=== Touch panel ===&lt;br /&gt;
&lt;br /&gt;
The touch panel is controlled by a Hynitron CST816S chips. Unfortunately, there is not much information about this chip on the internet apart from the datasheet below and a [https://github.com/lupyuen/hynitron_i2c_cst0xxse/ reference driver]. This is enough to implement a basic driver, but crucial information needed to implement advanced functionalities are missing (I²C protocol and registers, timings, power modes,...).&lt;br /&gt;
&lt;br /&gt;
==== Pins ====&lt;br /&gt;
&lt;br /&gt;
* P0.10 : Reset&lt;br /&gt;
* P0.28 : Interrupt (signal to the CPU when a touch event is detected)&lt;br /&gt;
* P0.06 : I²C SDA&lt;br /&gt;
* P0.07 : I²C SCL&lt;br /&gt;
&lt;br /&gt;
==== I²C ====&lt;br /&gt;
&lt;br /&gt;
* Device address : 0x15&lt;br /&gt;
* Frequency : from 10Khz to 400Khz&lt;br /&gt;
&lt;br /&gt;
'''NOTE : ''' The controller go to sleep when no event is detected. In sleep mode, the controller does not communicate on the I²C bus (it appears disconnected). So, for the communication to work, you need to tap on the screen so that the chip wakes-up.&lt;br /&gt;
&lt;br /&gt;
==== Touch events ====&lt;br /&gt;
&lt;br /&gt;
Touch informations are available in the 63 first registers of the controller. Remember : the device is in sleep mode when no touch event is detected. It means that you can read the register only when the touch controller detected an event. You can use the ''Interrupt'' pin to detect such event in the software. &lt;br /&gt;
&lt;br /&gt;
These 63 bytes contain up to 10 touch point (X, Y, event type, pressure,...) : &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Byte&lt;br /&gt;
! Bit7&lt;br /&gt;
! Bit6&lt;br /&gt;
! Bit5&lt;br /&gt;
! Bit4&lt;br /&gt;
! Bit3&lt;br /&gt;
! Bit2&lt;br /&gt;
! Bit1&lt;br /&gt;
! Bit0&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|GestureID : (Gesture code ,&lt;br /&gt;
&lt;br /&gt;
0x00: no gesture,&lt;br /&gt;
&lt;br /&gt;
0x01: Slide down,&lt;br /&gt;
&lt;br /&gt;
0x02: Slide up,&lt;br /&gt;
&lt;br /&gt;
0x03: Slide left,&lt;br /&gt;
&lt;br /&gt;
0x04: Slide right,&lt;br /&gt;
&lt;br /&gt;
0x05: Single click,&lt;br /&gt;
&lt;br /&gt;
0x0B: Double click,&lt;br /&gt;
&lt;br /&gt;
0x0C: Long press) &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|? &lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Number of touch points &lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Event (0 = Down, 1 = Up, 2 = Contact)&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|X (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|X (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Touch ID&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Y (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Y (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Pressure (?)&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Miscellaneous (?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bytes 3 to 8 are repeated 10 times (10*6 + 3 = 63 bytes).&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
&lt;br /&gt;
* The touch controller seems to report only 1 touch point&lt;br /&gt;
* Fields X, Y, Number of touch points and touch ID are updated. The others are always 0.&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
&lt;br /&gt;
The reference driver specifies some registers and value, but there is no information about them: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!Register&lt;br /&gt;
!Address&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_INT_CNT&lt;br /&gt;
|0x8F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FLOW_WORK_CNT&lt;br /&gt;
|0x91&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_WORKMODE &lt;br /&gt;
|0x00&lt;br /&gt;
|0 = WORK, 0x40 = FACTORY&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID&lt;br /&gt;
|0xA3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID2&lt;br /&gt;
|0x9F&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_POWER_MODE&lt;br /&gt;
|0xA5&lt;br /&gt;
|0x03 = SLEEP (reset the touchpanel using the reset pin before using this register : pin_low, delay 5ms, pin_high, delay 50ms then write 3 to register 0xA5)&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FW_VER&lt;br /&gt;
|0xA6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_VENDOR_ID&lt;br /&gt;
|0xA8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_LCD_BUSY_NUM&lt;br /&gt;
|0xAB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FACE_DEC_MODE_EN&lt;br /&gt;
|0xB0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GLOVE_MODE_EN&lt;br /&gt;
|0xC0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_COVER_MODE_EN&lt;br /&gt;
|0xC1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHARGER_MODE_EN&lt;br /&gt;
|0x8B&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_EN&lt;br /&gt;
|0xD0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_OUTPUT_ADDRESS&lt;br /&gt;
|0xD3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_ESD_SATURATE 0xED&lt;br /&gt;
|0xED&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''WARNING : ''' &amp;lt;del&amp;gt;Writing the SLEEP command (write 0x05 in HYN_REG_POWER_MODE) seems to freeze the controller (it returns only static values) until the battery is totally drained and the whole system reset. Analysis and debugging is more than welcome!&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manuals / Articles ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/najnesnaj/pinetime-zephyr Beginner manual explained how you to programs and install zephyr on PineTime Dev Kit, big thanks to najnesnaj :-)]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/swlh/sneak-peek-of-pinetime-smart-watch-and-why-its-perfect-for-teaching-iot-81b74161c159 Sneak Peek of PineTime Smart Watch… And why it’s perfect for teaching IoT]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/building-a-rust-driver-for-pinetimes-touch-controller-cbc1a5d5d3e9 Building a Rust Driver for PineTime’s Touch Controller]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/porting-druid-rust-widgets-to-pinetime-smart-watch-7e1d5a5d977a Porting (druid) Rust Widgets to PineTime Smart Watch]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/optimising-pinetimes-display-driver-with-rust-and-mynewt-3ba269ea2f5c Optimising PineTime’s Display Driver with Rust and Mynewt]&lt;br /&gt;
&lt;br /&gt;
* [https://www.zephyrproject.org/getting-started-with-zephyr-rtos-on-nordic-nrf52832-hackable/ Getting Started with Zephyr RTOS on Nordic nRF52832 hackaBLE]&lt;br /&gt;
&lt;br /&gt;
* [https://blog.aegrel.ee/absniffer-cmsis-dap-sniffer.html Removing the lock and installing another firmware on the nRF52832 using CMSIS-DAP dongle on Linux]&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/JF002/nrf52-baseproject/wiki/Build,-program-and-debug-NRF52-project-with-JLink,-CMake-and-CLion Build, program and debug NRF52 project with JLink, CMake and CLion]&lt;br /&gt;
&lt;br /&gt;
* [https://www.nrbtech.io/blog/2020/1/4/using-clion-for-nordic-nrf52-projects Using CLion for Nordic nRF52 projects]&lt;br /&gt;
&lt;br /&gt;
* [https://dev.to/aaronc81/flashing-your-pinetime-using-an-st-link-and-openocd-54dd Flashing your PineTime using an ST-Link and OpenOCD]&lt;br /&gt;
&lt;br /&gt;
== Development efforts ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! FreeRTOS&lt;br /&gt;
|https://www.freertos.org&lt;br /&gt;
| https://sourceforge.net/projects/freertos/&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[[InfiniTime]] ([https://github.com/JF002/Pinetime JF002/Pinetime])&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Zephyr&lt;br /&gt;
| https://www.zephyrproject.org&lt;br /&gt;
| https://github.com/zephyrproject-rtos/zephyr&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/najnesnaj/pinetime-zephyr najnesnaj/pinetime-zephyr]&lt;br /&gt;
|- &lt;br /&gt;
|[https://github.com/SuperPrower/pinetime_zephyr_sample_fw SuperPrower/pinetime_zephyr_sample_fw]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/Dejvino/pinetime-hermes-firmware Dejvino/pinetime-hermes-firmware]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/endian-albin/pinetime-hypnos endian-albin/pinetime-hypnos]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! mynewt&lt;br /&gt;
| https://mynewt.apache.org/about/&lt;br /&gt;
| https://github.com/apache/mynewt-core&lt;br /&gt;
| [https://github.com/lupyuen/pinetime-rust-mynewt lupyuen/pinetime-rust-mynewt]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MbedOS&lt;br /&gt;
| https://os.mbed.com&lt;br /&gt;
| https://github.com/ARMmbed/mbed-os&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/sethitow/awesome-pinetime sethitow/mbed-pinetime]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/geoffrey-vl/mbed-pinetime geoffrey.vl/mbed-pinetime]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! RIOT&lt;br /&gt;
| http://riot-os.org/&lt;br /&gt;
| https://github.com/RIOT-OS/RIOT/&lt;br /&gt;
| [https://github.com/bosmoment/PineTime-apps bosmoment/PineTime-apps]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! TinyGo&lt;br /&gt;
| https://tinygo.org&lt;br /&gt;
| https://github.com/tinygo-org/tinygo&lt;br /&gt;
| [https://github.com/aykevl/go-smartwatch aykevl/go-smartwatch]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! wasp-os (MicroPython)&lt;br /&gt;
| https://wasp-os.readthedocs.io/&lt;br /&gt;
| https://github.com/daniel-thompson/wasp-os&lt;br /&gt;
| [https://wasp-os.readthedocs.io/en/latest/install.html#pine64-pinetime-developer-edition PineTime install guide]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Rust + RTFM&lt;br /&gt;
| https://rtfm.rs/&lt;br /&gt;
| [https://github.com/rtfm-rs/cortex-m-rtfm rtfm-rs/cortex-m-rtfm]&lt;br /&gt;
| https://github.com/dbrgn/pinetime-rtfm/&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Bare Metal&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|https://github.com/xriss/timecake&lt;br /&gt;
|-&lt;br /&gt;
|https://github.com/Arc13/Pyrus&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{|&lt;br /&gt;
|[https://github.com/xriss/timecake xriss/timecake]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/Arc13/Pyrus Arc13/Pyrus]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
! AdaFruit bootloader&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/adafruit/Adafruit_nRF52_Bootloader&lt;br /&gt;
| [https://github.com/daniel-thompson/wasp-bootloader daniel-thompson/wasp-bootloader]&lt;br /&gt;
|-&lt;br /&gt;
! Useful drivers&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/sethitow/mbed-pinetime&lt;br /&gt;
| [https://github.com/sethitow/mbed-pinetime/tree/master/drivers https://github.com/sethitow/mbed-pinetime]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! UI concepts and drawings&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [https://gitlab.com/arteeh/pinetimeos arteeh/pinetimeos]&lt;br /&gt;
|-&lt;br /&gt;
! Linux companion app&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [https://gitlab.com/arteeh/pinetimecompanion arteeh/pinetimecompanion]&lt;br /&gt;
|-&lt;br /&gt;
! Arduino&lt;br /&gt;
| https://youtu.be/4aFDjymXjOw&lt;br /&gt;
| https://github.com/atc1441/ATCwatch&lt;br /&gt;
| https://github.com/atc1441/ATCwatch&lt;br /&gt;
|-&lt;br /&gt;
! OTA Update Flasher / DaFlasher&lt;br /&gt;
| https://youtu.be/gUVEz-pxhgg&lt;br /&gt;
| https://github.com/atc1441/DaFlasherFiles&lt;br /&gt;
| https://github.com/atc1441/DaFlasherFiles&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Wishlist ===&lt;br /&gt;
&lt;br /&gt;
In order to keep track of features and changes to the hardware people would like to see, check out this article: [[PineTime hardware wishlist]]&lt;br /&gt;
&lt;br /&gt;
=== Compatibility with other projects ===&lt;br /&gt;
&lt;br /&gt;
Different firmware running using different bootloaders and Bluetooth stacks on the nRF52832 have different requirements on how they should be initialised and what should be placed where in the internal flash.&lt;br /&gt;
&lt;br /&gt;
To keep track of what, how and why things work like they do across the different projects, check out the [[PineTime SD MCUBoot|PineTime SoftDevice and MCUBoot compatibility]] article.&lt;br /&gt;
&lt;br /&gt;
== Datasheets and Schematics ==&lt;br /&gt;
&lt;br /&gt;
=== Schematics ===&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Schematic-V1.0a-20191103.pdf PineTime Schematic ver1.0a]&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Port%20Assignment%20rev1.0.pdf PineTime GPIO Port Assignment ver1.0]&lt;br /&gt;
&lt;br /&gt;
Note: The part number for the SPI FLASH in the schematic diagram is not correct, the PineTime features a larger external FLASH device, see below.&lt;br /&gt;
&lt;br /&gt;
=== Chip Datasheets ===&lt;br /&gt;
* NORDIC nRF52832 information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/nRF52832%20product%20brief.pdf nRF52832 Product Brief]&lt;br /&gt;
** [https://infocenter.nordicsemi.com/pdf/nRF52832_PS_v1.1.pdf nRF52832 Product Specification v1.1]&lt;br /&gt;
* ARMv7-M information:&lt;br /&gt;
** [https://static.docs.arm.com/ddi0403/eb/DDI0403E_B_armv7m_arm.pdf ARMv7-M Architecture Reference Manual]&lt;br /&gt;
&lt;br /&gt;
=== Component Datasheets ===&lt;br /&gt;
* PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGM40561.pdf SGMicro SGM40561 Single Cell Charger Datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGMICRO-SGM2036.pdf SGMicro SGM2036 3.3V Low Power Low Dropout RF Linear Regulator Datasheet]&lt;br /&gt;
* SPI Flash information:&lt;br /&gt;
** [https://www.elnec.com/en/device/XTX/XT25F32B+%28QuadSPI%29+%5BSOP8-200%5D/ XTX XT25F32B 32Mb(4MB) SPI NOR Flash] (data sheets for this part are hard to find but it acts similar to other QuadSPI SPI NOR Flash such as [https://www.macronix.com/Lists/Datasheet/Attachments/7426/MX25L3233F,%203V,%2032Mb,%20v1.6.pdf Macronix 32Mb(4MB) SPI NOR Flash])&lt;br /&gt;
** IDs for XT25F32B are: manufacturer (0x0b), device (0x15), memory type (0x40), density (0x16)&lt;br /&gt;
* LCD Panel:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20LCD%20Panel.jpg 1.3&amp;quot; 240x240 IPS LCD Panel Specification for PineTime]&lt;br /&gt;
** [https://wiki.pine64.org/images/5/54/ST7789V_v1.6.pdf 11.6&amp;quot; Sitronix LCD Driver/Controller Datasheet]&lt;br /&gt;
* Touchpad information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20Touch%20Panel.jpg Touchpad Specification for PineTimel]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/CST816S数据手册V1.1.pdf 11.6&amp;quot; Hynitron CST816S Capacitive Touch Controller Datasheet in Chinese]&lt;br /&gt;
*** [https://wiki.pine64.org/images/5/51/CST816S%E6%95%B0%E6%8D%AE%E6%89%8B%E5%86%8CV1.1.en.pdf English Translation]&lt;br /&gt;
* Sensor:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf BOSCH BMA421 Triaxial VAcceleration Sensor Product Brief]&lt;br /&gt;
** [https://wiki.pine64.org/images/c/cc/Bst-bma400-ds000.pdf BOSCH BMA400 3-axes ultra-low power accelerometer datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/HRS3300%20Heart%20Rate%20Sensor.pdf TianYiHeXin HRS3300 PPG Heart Rate Sensor Data Sheet]&lt;br /&gt;
&lt;br /&gt;
= Community =&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=134 PineTime forum]&lt;br /&gt;
* [https://app.element.io/#/room/#pinetime:matrix.org Matrix Channel] (No login required to read)&lt;br /&gt;
* IRC Server: [ircs://irc.pine64.org#pinetime irc.pine64.org] Channel: PineTime&lt;br /&gt;
* [https://t.me/pinetime Telegram group]&lt;br /&gt;
* [https://discordapp.com/invite/DgB7kzr Discord server invite link]&lt;br /&gt;
&lt;br /&gt;
= PineTime equivalents and jailbreaking =&lt;br /&gt;
&lt;br /&gt;
This page contains a list of PineTime-like smartwatches that might be &amp;quot;jailbreakable&amp;quot; or a good source for ideas for the PineTime: [[PineTime Equivalents]]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=6633</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=6633"/>
		<updated>2020-08-16T15:04:11Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: More complete &amp;quot;now what?&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== How do I install new software on it? ===&lt;br /&gt;
&lt;br /&gt;
See [[Reprogramming_the_PineTime|this page to see various methods of reprogramming the devkit PineTime]].&lt;br /&gt;
&lt;br /&gt;
=== Does the PineTime run Linux? ===&lt;br /&gt;
&lt;br /&gt;
No. Please read this forum article for information about Linux on PineTime: https://forum.pine64.org/showthread.php?tid=8112&lt;br /&gt;
&lt;br /&gt;
=== How long does it take to ship my PineTime? ===&lt;br /&gt;
&lt;br /&gt;
That depends on whether you chose for Standard or Express shipping. Standard shipping for the dev kit may take up to a few weeks.&lt;br /&gt;
&lt;br /&gt;
=== My PineTime arrived, now what? ===&lt;br /&gt;
&lt;br /&gt;
You should start by testing out all the features of the watch, to make sure everything works. You can do this using the software that was preinstalled on your device. Before doing any programming, setting up a dev cradle is recommended to keep the watch, its wires and your programmer nicely in place (Check out Lup Yuen Lee's first PineTime article for dev cradle inspiration: https://medium.com/swlh/sneak-peek-of-pinetime-smart-watch-and-why-its-perfect-for-teaching-iot-81b74161c159). Finally, you should remove the device's flash protection, after which you can flash your own software or someone else's to the device.&lt;br /&gt;
&lt;br /&gt;
=== How do I remove flash protection? ===&lt;br /&gt;
&lt;br /&gt;
The flash protection can be removed using multiple different methods. If you don't have anything except the PineTime, not even a Raspberry Pi, then you have to order a programmer online: you can use a J-Link, CMSIS-DAP dongle and various other programmers. See [[Reprogramming_the_PineTime|this page to see various methods of reprogramming the PineTime]].&lt;br /&gt;
&lt;br /&gt;
=== How do I connect the PineTime to a programmer? ===&lt;br /&gt;
&lt;br /&gt;
The wire that comes with the dev kit works fine for removing the flash protection and flashing code. You only have to plug it into the holes holding it still gently. If you're experienced with soldering extremely small pins, you can solder the wires to the board to ensure a stable connection. '''Don't solder wires to the pins unless you really know how to do so safely!''' Soldering errors are the primary cause of death of PineTimes.&lt;br /&gt;
&lt;br /&gt;
=== Why can't you use ST-Link to remove nRF52 Flash Protection? ===&lt;br /&gt;
&lt;br /&gt;
Because ST-Link is a High Level Adapter. It doesn't really implement all SWD functions, just a subset. For performance I think. More details in the section &amp;quot;Why Visual Studio Code with ST-Link (instead of nRFgo Studio with J-LINK)&amp;quot; in the article &amp;quot;Coding nRF52 with Rust and Apache Mynewt on Visual Studio Code&amp;quot; here: https://medium.com/@ly.lee/coding-nrf52-with-rust-and-apache-mynewt-on-visual-studio-code-9521bcba6004?source=friends_link&amp;amp;sk=bb4e2523b922d0870259ab3fa696c7da&lt;br /&gt;
&lt;br /&gt;
=== Since we need a low level SWD adapter like Raspberry Pi anyway, can we do everything on a Pi instead of ST-Link + Windows? ===&lt;br /&gt;
&lt;br /&gt;
Current progress with Pi and PineTime is here https://medium.com/@ly.lee/debug-rust-mynewt-firmware-for-pinetime-on-raspberry-pi-4b9ac2d093a9?source=friends_link&amp;amp;sk=edb508c31e43d3ec40ecd8554f3405f6&lt;br /&gt;
&lt;br /&gt;
=== What's the OS that's preinstalled on the PineTime by default? ===&lt;br /&gt;
&lt;br /&gt;
The watch, and its preinstalled OS, is built by a friend of TL. The software is proprietary and not made by Pine64 or its community. It can interact with the &amp;quot;Da Fit&amp;quot; app on Android. The dev kit contains this OS (and as a result, the flash protection) so that developers can test if all the hardware on their device is working correctly before they flash the device and start working on their own software.&lt;br /&gt;
&lt;br /&gt;
The next version of the dev kit will be preloaded with Infinitime: https://github.com/JF002/Pinetime&lt;br /&gt;
&lt;br /&gt;
=== Can we use this OS or its source code? ===&lt;br /&gt;
&lt;br /&gt;
While it's not what the dev kit is for, you are of course free to use the watch with its preinstalled software as is. The preinstalled OS is proprietary, and its owner will not release the source code, so we cannot use this OS as a starting point.&lt;br /&gt;
&lt;br /&gt;
=== Why is the back exposed? Is it supposed to snap on? ===&lt;br /&gt;
&lt;br /&gt;
The back cover of the PineTime dev kit is exposed so that you can flash and debug the device with the SWD pins. The main unit and cover does not snap (lock) together. If you want to attach the back cover anyway, you can use glue or tape.&lt;br /&gt;
&lt;br /&gt;
=== What hardware should I use to flash code to the PineTime? ===&lt;br /&gt;
&lt;br /&gt;
There are several ways you can do this, check out [[Reprogramming the PineTime]]&lt;br /&gt;
&lt;br /&gt;
=== I have experience developing on Arduino. How does the PineTime compare? ===&lt;br /&gt;
&lt;br /&gt;
Arduino provides the Arduino IDE (or you use the avr-gcc and avrdude command-line tools) which you can use to compile and upload code to an Arduino board. The PineTime and its ARM processor doesn't have this, so you'll have to familiarize yourself with tools like GCC for AVR, and OpenOCD. Some experience with Arduino does translate over to the PineTime, especially if you've worked with LCD's, or SPI. The PineTime is at least four times faster than an Arduino Uno (even faster at certain specific workloads due to hardware acceleration), and it has 32 times more RAM and 16 times more flash storage.&lt;br /&gt;
&lt;br /&gt;
=== My PineTime has the stock proprietary software on it, how do I set the time? ===&lt;br /&gt;
&lt;br /&gt;
You can use either nRF Connect, custom GadgetBridge build or the proprietary Da Fit app.&lt;br /&gt;
&lt;br /&gt;
=== My PineTime's screen shows garbage, how do I fix it? ===&lt;br /&gt;
&lt;br /&gt;
This is usually caused by unplugging the device after it has booted, it needs to be reinitialised. To do so just restart the watch by removing power to it.&lt;br /&gt;
&lt;br /&gt;
=== Is there a 3D model of PineTime available somewhere? ===&lt;br /&gt;
&lt;br /&gt;
Not yet. Someone did design a cover you can snap on to keep the back shut: https://www.thingiverse.com/thing:4172849&lt;br /&gt;
&lt;br /&gt;
=== Is there a standard agreed method of pushing OTA updates so that one could seal the PineTime dev kit nicely? ===&lt;br /&gt;
&lt;br /&gt;
Infinitime is implementing OTA updates and a bootloader, allowing for other software to be flashed over Bluetooth.&lt;br /&gt;
&lt;br /&gt;
=== What is ARM Semihosting? ===&lt;br /&gt;
&lt;br /&gt;
So we know that we use the SWD (Single Wire Debug) protocol created by Arm for flashing and debugging Arm embedded CPUs. SWD being derived from standard JTAG, but with fewer wires&lt;br /&gt;
With Arm CPUs you can trigger an software interrupt, and allow the debugger (OpenOCD) to do something really nifty&lt;br /&gt;
Display a message, read console input, dump out a file, even read a file! That's called ARM Semihosting http://www.keil.com/support/man/docs/armcc/armcc_pge1358787046598.htm&lt;br /&gt;
&lt;br /&gt;
=== What is OpenOCD? ===&lt;br /&gt;
&lt;br /&gt;
OpenOCD is Open On-Chip Debugger. It's the software that drives your microcontroller debugger/flasher. We need it for running any kind of flashing and debugging with Pi or ST-Link. gdb talks to OpenOCD for debugging firmware. And VSCode talks to gdb for debugging firmware visually. http://openocd.org/doc-release/html/About.html#What-is-OpenOCD_003f&lt;br /&gt;
There have been no official updates for years, the closest one is by ntfreak: https://github.com/ntfreak/openocd (My SPI fork is based on this)&lt;br /&gt;
&lt;br /&gt;
=== Can I use Pinebook Pro for developing PineTime? ===&lt;br /&gt;
&lt;br /&gt;
Arm Embedded Toolchain for Pinebook Pro is here, if anyone needs it. It's linked with dynamic libraries, so I fear it might not work on your Pinebook Pro. Hoping to save you 7 hours of painful toolchain building... https://github.com/lupyuen/pinetime-rust-mynewt/releases/tag/v1.0.5&lt;br /&gt;
&lt;br /&gt;
=== Are there any alternatives to the wrist band provided with the PineTime? ===&lt;br /&gt;
&lt;br /&gt;
No, but PineTime accepts standard 20mm wrist band that is widely available by a third party.&lt;br /&gt;
&lt;br /&gt;
Note that some sellers have a different point of view on what standard is. So you should always check the fitting to make sure it looks like the one used by PineTime.&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=6632</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=6632"/>
		<updated>2020-08-16T14:57:50Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Separate soldering advice&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== How do I install new software on it? ===&lt;br /&gt;
&lt;br /&gt;
See [[Reprogramming_the_PineTime|this page to see various methods of reprogramming the devkit PineTime]].&lt;br /&gt;
&lt;br /&gt;
=== Does the PineTime run Linux? ===&lt;br /&gt;
&lt;br /&gt;
No. Please read this forum article for information about Linux on PineTime: https://forum.pine64.org/showthread.php?tid=8112&lt;br /&gt;
&lt;br /&gt;
=== How long does it take to ship my PineTime? ===&lt;br /&gt;
&lt;br /&gt;
That depends on whether you chose for Standard or Express shipping. Standard shipping for the dev kit may take up to a few weeks.&lt;br /&gt;
&lt;br /&gt;
=== My PineTime arrived, now what? ===&lt;br /&gt;
&lt;br /&gt;
You should start by testing out all the features of the watch, to make sure everything works. You can do this using the software that was preinstalled on your device. After the flash protection has been removed you can experiment with your own software or someone else's.&lt;br /&gt;
&lt;br /&gt;
=== How do I remove flash protection? ===&lt;br /&gt;
&lt;br /&gt;
The flash protection can be removed using multiple different methods. If you don't have anything except the PineTime, not even a Raspberry Pi, then you have to order a programmer online: you can use a J-Link, CMSIS-DAP dongle and various other programmers. See [[Reprogramming_the_PineTime|this page to see various methods of reprogramming the PineTime]].&lt;br /&gt;
&lt;br /&gt;
=== How do I connect the PineTime to a programmer? ===&lt;br /&gt;
&lt;br /&gt;
The wire that comes with the dev kit works fine for removing the flash protection and flashing code. You only have to plug it into the holes holding it still gently. If you're experienced with soldering extremely small pins, you can solder the wires to the board to ensure a stable connection. '''Don't solder wires to the pins unless you really know how to do so safely!''' Soldering errors are the primary cause of death of PineTimes.&lt;br /&gt;
&lt;br /&gt;
=== Why can't you use ST-Link to remove nRF52 Flash Protection? ===&lt;br /&gt;
&lt;br /&gt;
Because ST-Link is a High Level Adapter. It doesn't really implement all SWD functions, just a subset. For performance I think. More details in the section &amp;quot;Why Visual Studio Code with ST-Link (instead of nRFgo Studio with J-LINK)&amp;quot; in the article &amp;quot;Coding nRF52 with Rust and Apache Mynewt on Visual Studio Code&amp;quot; here: https://medium.com/@ly.lee/coding-nrf52-with-rust-and-apache-mynewt-on-visual-studio-code-9521bcba6004?source=friends_link&amp;amp;sk=bb4e2523b922d0870259ab3fa696c7da&lt;br /&gt;
&lt;br /&gt;
=== Since we need a low level SWD adapter like Raspberry Pi anyway, can we do everything on a Pi instead of ST-Link + Windows? ===&lt;br /&gt;
&lt;br /&gt;
Current progress with Pi and PineTime is here https://medium.com/@ly.lee/debug-rust-mynewt-firmware-for-pinetime-on-raspberry-pi-4b9ac2d093a9?source=friends_link&amp;amp;sk=edb508c31e43d3ec40ecd8554f3405f6&lt;br /&gt;
&lt;br /&gt;
=== What's the OS that's preinstalled on the PineTime by default? ===&lt;br /&gt;
&lt;br /&gt;
The watch, and its preinstalled OS, is built by a friend of TL. The software is proprietary and not made by Pine64 or its community. It can interact with the &amp;quot;Da Fit&amp;quot; app on Android. The dev kit contains this OS (and as a result, the flash protection) so that developers can test if all the hardware on their device is working correctly before they flash the device and start working on their own software.&lt;br /&gt;
&lt;br /&gt;
The next version of the dev kit will be preloaded with Infinitime: https://github.com/JF002/Pinetime&lt;br /&gt;
&lt;br /&gt;
=== Can we use this OS or its source code? ===&lt;br /&gt;
&lt;br /&gt;
While it's not what the dev kit is for, you are of course free to use the watch with its preinstalled software as is. The preinstalled OS is proprietary, and its owner will not release the source code, so we cannot use this OS as a starting point.&lt;br /&gt;
&lt;br /&gt;
=== Why is the back exposed? Is it supposed to snap on? ===&lt;br /&gt;
&lt;br /&gt;
The back cover of the PineTime dev kit is exposed so that you can flash and debug the device with the SWD pins. The main unit and cover does not snap (lock) together. If you want to attach the back cover anyway, you can use glue or tape.&lt;br /&gt;
&lt;br /&gt;
=== What hardware should I use to flash code to the PineTime? ===&lt;br /&gt;
&lt;br /&gt;
There are several ways you can do this, check out [[Reprogramming the PineTime]]&lt;br /&gt;
&lt;br /&gt;
=== I have experience developing on Arduino. How does the PineTime compare? ===&lt;br /&gt;
&lt;br /&gt;
Arduino provides the Arduino IDE (or you use the avr-gcc and avrdude command-line tools) which you can use to compile and upload code to an Arduino board. The PineTime and its ARM processor doesn't have this, so you'll have to familiarize yourself with tools like GCC for AVR, and OpenOCD. Some experience with Arduino does translate over to the PineTime, especially if you've worked with LCD's, or SPI. The PineTime is at least four times faster than an Arduino Uno (even faster at certain specific workloads due to hardware acceleration), and it has 32 times more RAM and 16 times more flash storage.&lt;br /&gt;
&lt;br /&gt;
=== My PineTime has the stock proprietary software on it, how do I set the time? ===&lt;br /&gt;
&lt;br /&gt;
You can use either nRF Connect, custom GadgetBridge build or the proprietary Da Fit app.&lt;br /&gt;
&lt;br /&gt;
=== My PineTime's screen shows garbage, how do I fix it? ===&lt;br /&gt;
&lt;br /&gt;
This is usually caused by unplugging the device after it has booted, it needs to be reinitialised. To do so just restart the watch by removing power to it.&lt;br /&gt;
&lt;br /&gt;
=== Is there a 3D model of PineTime available somewhere? ===&lt;br /&gt;
&lt;br /&gt;
Not yet. Someone did design a cover you can snap on to keep the back shut: https://www.thingiverse.com/thing:4172849&lt;br /&gt;
&lt;br /&gt;
=== Is there a standard agreed method of pushing OTA updates so that one could seal the PineTime dev kit nicely? ===&lt;br /&gt;
&lt;br /&gt;
Infinitime is implementing OTA updates and a bootloader, allowing for other software to be flashed over Bluetooth.&lt;br /&gt;
&lt;br /&gt;
=== What is ARM Semihosting? ===&lt;br /&gt;
&lt;br /&gt;
So we know that we use the SWD (Single Wire Debug) protocol created by Arm for flashing and debugging Arm embedded CPUs. SWD being derived from standard JTAG, but with fewer wires&lt;br /&gt;
With Arm CPUs you can trigger an software interrupt, and allow the debugger (OpenOCD) to do something really nifty&lt;br /&gt;
Display a message, read console input, dump out a file, even read a file! That's called ARM Semihosting http://www.keil.com/support/man/docs/armcc/armcc_pge1358787046598.htm&lt;br /&gt;
&lt;br /&gt;
=== What is OpenOCD? ===&lt;br /&gt;
&lt;br /&gt;
OpenOCD is Open On-Chip Debugger. It's the software that drives your microcontroller debugger/flasher. We need it for running any kind of flashing and debugging with Pi or ST-Link. gdb talks to OpenOCD for debugging firmware. And VSCode talks to gdb for debugging firmware visually. http://openocd.org/doc-release/html/About.html#What-is-OpenOCD_003f&lt;br /&gt;
There have been no official updates for years, the closest one is by ntfreak: https://github.com/ntfreak/openocd (My SPI fork is based on this)&lt;br /&gt;
&lt;br /&gt;
=== Can I use Pinebook Pro for developing PineTime? ===&lt;br /&gt;
&lt;br /&gt;
Arm Embedded Toolchain for Pinebook Pro is here, if anyone needs it. It's linked with dynamic libraries, so I fear it might not work on your Pinebook Pro. Hoping to save you 7 hours of painful toolchain building... https://github.com/lupyuen/pinetime-rust-mynewt/releases/tag/v1.0.5&lt;br /&gt;
&lt;br /&gt;
=== Are there any alternatives to the wrist band provided with the PineTime? ===&lt;br /&gt;
&lt;br /&gt;
No, but PineTime accepts standard 20mm wrist band that is widely available by a third party.&lt;br /&gt;
&lt;br /&gt;
Note that some sellers have a different point of view on what standard is. So you should always check the fitting to make sure it looks like the one used by PineTime.&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=6631</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=6631"/>
		<updated>2020-08-16T14:47:46Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Various tweaks and updates&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== How do I install new software on it? ===&lt;br /&gt;
&lt;br /&gt;
See [[Reprogramming_the_PineTime|this page to see various methods of reprogramming the devkit PineTime]].&lt;br /&gt;
&lt;br /&gt;
=== Does the PineTime run Linux? ===&lt;br /&gt;
&lt;br /&gt;
No. Please read this forum article for information about Linux on PineTime: https://forum.pine64.org/showthread.php?tid=8112&lt;br /&gt;
&lt;br /&gt;
=== How long does it take to ship my PineTime? ===&lt;br /&gt;
&lt;br /&gt;
That depends on whether you chose for Standard or Express shipping. Standard shipping for the dev kit may take up to a few weeks.&lt;br /&gt;
&lt;br /&gt;
=== My PineTime arrived, now what? ===&lt;br /&gt;
&lt;br /&gt;
You should start by testing out all the features of the watch, to make sure everything works. You can do this using the software that was preinstalled on your device. '''Don't solder wires to the pins unless you really know how to do so safely!''' The wire that comes with the dev kit already works for removing the protection and flashing code, only takes plugging it into the holes and holding it still gently. After the flash lock has been removed you can experiment with your own software or someone else's.&lt;br /&gt;
&lt;br /&gt;
=== How do I remove flash protection? ===&lt;br /&gt;
&lt;br /&gt;
The flash protection can be removed using multiple different methods. If you don't have anything except the PineTime, not even a Raspberry Pi, then you have to order a programmer online: you can use a J-Link, CMSIS-DAP dongle and various other programmers. See [[Reprogramming_the_PineTime|this page to see various methods of reprogramming the PineTime]].&lt;br /&gt;
&lt;br /&gt;
=== Why can't you use ST-Link to remove nRF52 Flash Protection? ===&lt;br /&gt;
&lt;br /&gt;
Because ST-Link is a High Level Adapter. It doesn't really implement all SWD functions, just a subset. For performance I think. More details in the section &amp;quot;Why Visual Studio Code with ST-Link (instead of nRFgo Studio with J-LINK)&amp;quot; in the article &amp;quot;Coding nRF52 with Rust and Apache Mynewt on Visual Studio Code&amp;quot; here: https://medium.com/@ly.lee/coding-nrf52-with-rust-and-apache-mynewt-on-visual-studio-code-9521bcba6004?source=friends_link&amp;amp;sk=bb4e2523b922d0870259ab3fa696c7da&lt;br /&gt;
&lt;br /&gt;
=== Since we need a low level SWD adapter like Raspberry Pi anyway, can we do everything on a Pi instead of ST-Link + Windows? ===&lt;br /&gt;
&lt;br /&gt;
Current progress with Pi and PineTime is here https://medium.com/@ly.lee/debug-rust-mynewt-firmware-for-pinetime-on-raspberry-pi-4b9ac2d093a9?source=friends_link&amp;amp;sk=edb508c31e43d3ec40ecd8554f3405f6&lt;br /&gt;
&lt;br /&gt;
=== What's the OS that's preinstalled on the PineTime by default? ===&lt;br /&gt;
&lt;br /&gt;
The watch, and its preinstalled OS, is built by a friend of TL. The software is proprietary and not made by Pine64 or its community. It can interact with the &amp;quot;Da Fit&amp;quot; app on Android. The dev kit contains this OS (and as a result, the flash protection) so that developers can test if all the hardware on their device is working correctly before they flash the device and start working on their own software.&lt;br /&gt;
&lt;br /&gt;
The next version of the dev kit will be preloaded with Infinitime: https://github.com/JF002/Pinetime&lt;br /&gt;
&lt;br /&gt;
=== Can we use this OS or its source code? ===&lt;br /&gt;
&lt;br /&gt;
While it's not what the dev kit is for, you are of course free to use the watch with its preinstalled software as is. The preinstalled OS is proprietary, and its owner will not release the source code, so we cannot use this OS as a starting point.&lt;br /&gt;
&lt;br /&gt;
=== Why is the back exposed? Is it supposed to snap on? ===&lt;br /&gt;
&lt;br /&gt;
The back cover of the PineTime dev kit is exposed so that you can flash and debug the device with the SWD pins. The main unit and cover does not snap (lock) together. If you want to attach the back cover anyway, you can use glue or tape.&lt;br /&gt;
&lt;br /&gt;
=== What hardware should I use to flash code to the PineTime? ===&lt;br /&gt;
&lt;br /&gt;
There are several ways you can do this, check out [[Reprogramming the PineTime]]&lt;br /&gt;
&lt;br /&gt;
=== I have experience developing on Arduino. How does the PineTime compare? ===&lt;br /&gt;
&lt;br /&gt;
Arduino provides the Arduino IDE (or you use the avr-gcc and avrdude command-line tools) which you can use to compile and upload code to an Arduino board. The PineTime and its ARM processor doesn't have this, so you'll have to familiarize yourself with tools like GCC for AVR, and OpenOCD. Some experience with Arduino does translate over to the PineTime, especially if you've worked with LCD's, or SPI. The PineTime is at least four times faster than an Arduino Uno (even faster at certain specific workloads due to hardware acceleration), and it has 32 times more RAM and 16 times more flash storage.&lt;br /&gt;
&lt;br /&gt;
=== My PineTime has the stock proprietary software on it, how do I set the time? ===&lt;br /&gt;
&lt;br /&gt;
You can use either nRF Connect, custom GadgetBridge build or the proprietary Da Fit app.&lt;br /&gt;
&lt;br /&gt;
=== My PineTime's screen shows garbage, how do I fix it? ===&lt;br /&gt;
&lt;br /&gt;
This is usually caused by unplugging the device after it has booted, it needs to be reinitialised. To do so just restart the watch by removing power to it.&lt;br /&gt;
&lt;br /&gt;
=== Is there a 3D model of PineTime available somewhere? ===&lt;br /&gt;
&lt;br /&gt;
Not yet. Someone did design a cover you can snap on to keep the back shut: https://www.thingiverse.com/thing:4172849&lt;br /&gt;
&lt;br /&gt;
=== Is there a standard agreed method of pushing OTA updates so that one could seal the PineTime dev kit nicely? ===&lt;br /&gt;
&lt;br /&gt;
Infinitime is implementing OTA updates and a bootloader, allowing for other software to be flashed over Bluetooth.&lt;br /&gt;
&lt;br /&gt;
=== What is ARM Semihosting? ===&lt;br /&gt;
&lt;br /&gt;
So we know that we use the SWD (Single Wire Debug) protocol created by Arm for flashing and debugging Arm embedded CPUs. SWD being derived from standard JTAG, but with fewer wires&lt;br /&gt;
With Arm CPUs you can trigger an software interrupt, and allow the debugger (OpenOCD) to do something really nifty&lt;br /&gt;
Display a message, read console input, dump out a file, even read a file! That's called ARM Semihosting http://www.keil.com/support/man/docs/armcc/armcc_pge1358787046598.htm&lt;br /&gt;
&lt;br /&gt;
=== What is OpenOCD? ===&lt;br /&gt;
&lt;br /&gt;
OpenOCD is Open On-Chip Debugger. It's the software that drives your microcontroller debugger/flasher. We need it for running any kind of flashing and debugging with Pi or ST-Link. gdb talks to OpenOCD for debugging firmware. And VSCode talks to gdb for debugging firmware visually. http://openocd.org/doc-release/html/About.html#What-is-OpenOCD_003f&lt;br /&gt;
There have been no official updates for years, the closest one is by ntfreak: https://github.com/ntfreak/openocd (My SPI fork is based on this)&lt;br /&gt;
&lt;br /&gt;
=== Can I use Pinebook Pro for developing PineTime? ===&lt;br /&gt;
&lt;br /&gt;
Arm Embedded Toolchain for Pinebook Pro is here, if anyone needs it. It's linked with dynamic libraries, so I fear it might not work on your Pinebook Pro. Hoping to save you 7 hours of painful toolchain building... https://github.com/lupyuen/pinetime-rust-mynewt/releases/tag/v1.0.5&lt;br /&gt;
&lt;br /&gt;
=== Are there any alternatives to the wrist band provided with the PineTime? ===&lt;br /&gt;
&lt;br /&gt;
No, but PineTime accepts standard 20mm wrist band that is widely available by a third party.&lt;br /&gt;
&lt;br /&gt;
Note that some sellers have a different point of view on what standard is. So you should always check the fitting to make sure it looks like the one used by PineTime.&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime&amp;diff=4828</id>
		<title>PineTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime&amp;diff=4828"/>
		<updated>2020-01-27T12:18:08Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
'''Read this first!'''&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Frequently_asked_questions_about_the_PineTime Click here to see frequently asked questions about the dev kit]&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Lup_Yuen_Lee_Q%26A_about_PineTime Lup Yuen Lee Q&amp;amp;A about PineTime]&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
'''Dimensions:''' 37.5 x 40 x 11mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' 38 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''IP Rating:''' IP67 (waterproof to 1 meter) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 1.3 inches (33mm) diagonal&lt;br /&gt;
: '''Type:''' IPS capacitive touchscreen, RGB 65K colors&lt;br /&gt;
: '''Display Controller:''' ST7789&lt;br /&gt;
: '''Resolution:''' 240x240 pixels &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' Nordic Semiconductor nRF52832 &amp;lt;br&amp;gt;&lt;br /&gt;
'''Flash:''' 512KB with additional 4MB SPI NOR &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 64KB &amp;lt;br&amp;gt;&lt;br /&gt;
'''Bluetooth:''' 5.0 (including Bluetooth Low Energy) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sensors:''' Accelerometer, Heart rate sensor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Feedback:''' Vibration motor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' 170-180mAh LiPo&lt;br /&gt;
&lt;br /&gt;
== SWD Pinout ==&lt;br /&gt;
The devkits have exposed SWD pins for flashing and debugging. The pinout is:&lt;br /&gt;
[[File:PineTime_SWD_location.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Driving the peripherals ==&lt;br /&gt;
&lt;br /&gt;
=== Display ===&lt;br /&gt;
&lt;br /&gt;
Note: The factory-default software on the PineTime does not auto-detect the display being disconnected when it has already booted. That can cause garbled output, to fix it just restart the PineTime.&lt;br /&gt;
&lt;br /&gt;
The display is driven using the ST7789 display controller. Use the following pins to drive the screen:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! PineTime pin&lt;br /&gt;
! ST7789 pin&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SCK (P0.02)&lt;br /&gt;
| SPI clock&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SDI (P0.03)&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RS (P0.18)&lt;br /&gt;
| Clock/data pin (CD)&lt;br /&gt;
|-&lt;br /&gt;
| LCD_CS (P0.25)&lt;br /&gt;
| Chip select&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RESET (P0.26)&lt;br /&gt;
| Display reset&lt;br /&gt;
|-&lt;br /&gt;
| LCD_BACKLIGHT_{LOW,MID,HIGH}&lt;br /&gt;
| Backlight (active low)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Chip select must be held low while driving the display. It must be high when using other SPI devices on the same bus (such as external flash storage) so that the display controller won't respond to the wrong commands.&lt;br /&gt;
* SPI must be used in mode 3. Mode 0 (the default) won't work.&lt;br /&gt;
* LCD_DISPLAY_* is used to enable the backlight. Set at least one to low to see anything on the screen.&lt;br /&gt;
* Use SPI at 8MHz (the fastest clock available on the nRF52832) because otherwise refreshing will be super slow.&lt;br /&gt;
&lt;br /&gt;
=== Battery measurement ===&lt;br /&gt;
&lt;br /&gt;
Reading whether the PineTime has power attached is easy: simply read the charge indication pin (P0.12). When it is high it is running on battery, when it is low it is charging.&lt;br /&gt;
&lt;br /&gt;
Reading the battery voltage is a bit harder. For that you can use the battery voltage pin on P0.31 (AIN7). The returned value is 12 bits, which means it is 0..4095. You can get the measured voltage with the following formula, assuming a reference voltage of 3.3V (this is configurable in the ADC):&lt;br /&gt;
&lt;br /&gt;
 adcVoltage = adcValue / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
The measured voltage is actually half of the actual battery voltage, because the ADC is connected between a voltage divider where both resistors are 1MΩ. This can be corrected by multiplying the value:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2 / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
It's often better to avoid floating point values on embedded systems and in this case there is no reason to use float at all, we can just represent the value in millivolts. Therefore the formula can be simplified to:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / (4095 / 3.3)&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / 1241&lt;br /&gt;
&lt;br /&gt;
Converting this voltage to an estimated capacity in percent requires a more complicated algorithm, because Lithium-ion batteries have a non-linear discharge curve.&lt;br /&gt;
&lt;br /&gt;
=== How to write battery friendly software? === &lt;br /&gt;
&lt;br /&gt;
The key to save battery is to enable only what you need when you need it. NRF52832 has a lot of functionalities allowing you to draw as little current as possible. Here are some tips and tricks:&lt;br /&gt;
&lt;br /&gt;
* Disable / shutdown / put in sleep mode '''all devices around the MCU''' (display controller, touch controller, external memory,...). &lt;br /&gt;
* Disable all '''peripheral inside the MCU''' when you don't need them (SPI, TWI(I²C),...). The power management of the NRF52832 is very smart and will completely shut down (power off and disable the clock) the peripheral when the software disables it.&lt;br /&gt;
* Put the MCU to sleep as soon and as often as possible. If you are not using a RTOS, this is done by calling ''WFE'' (wait for event) instruction. Most of the time, RTOS implement this functionality. For example, FreeRTOS calls it the ''tickless mode'' : it puts the CPU in sleep mode when no task is planned for execution for more than a specified time, and wakes up as soon as an event is detected or when a task is ready to run.&lt;br /&gt;
* Do not use logging (JLink RTT, SWO, semihosting,...), it uses a lot of power.&lt;br /&gt;
* Ensure that the debug circuitry of the MCU is not enabled when you measuring the battery life. The debug peripheral is enabled as soon as you connect a debugger to the device, and '''is not automatically disabled''', even if you disconnect the debugger. The software running in the NRF52832 cannot disable the debug peripheral. How to disable the debug circuitry:&lt;br /&gt;
  - using ''nrfjprog --reset''&lt;br /&gt;
  - using JLinkExe : issue the command ''writeDP 1 0''&lt;br /&gt;
* Read [https://infocenter.nordicsemi.com/pdf/nRF52832_Rev_2_Errata_v1.1.pdf the errata sheet of the MCU] and apply workarounds if they apply to you soft.&lt;br /&gt;
&lt;br /&gt;
=== Button ===&lt;br /&gt;
&lt;br /&gt;
The button on the side of the PineTime is disabled by default. To enable it, drive the button out pin (P0.15) high.&lt;br /&gt;
&lt;br /&gt;
While enabled, the button in pin (P0.13) will be high when the button is pressed, and low when it is not pressed.&lt;br /&gt;
&lt;br /&gt;
=== Touch panel ===&lt;br /&gt;
&lt;br /&gt;
The touch panel is controlled by a Hynitron CST816S chips. Unfortunately, there is not much information about this chip on the internet apart from the datasheet below and a [https://github.com/lupyuen/hynitron_i2c_cst0xxse/ reference driver]. This is enough to implement a basic driver, but crucial information needed to implement advanced functionalities are missing (I²C protocol and registers, timings, power modes,...).&lt;br /&gt;
&lt;br /&gt;
==== Pins ====&lt;br /&gt;
&lt;br /&gt;
* P0.10 : Reset&lt;br /&gt;
* P0.28 : Interrupt (signal to the CPU when a touch event is detected)&lt;br /&gt;
* P0.06 : I²C SDA&lt;br /&gt;
* P0.07 : I²C SCL&lt;br /&gt;
&lt;br /&gt;
==== I²C ====&lt;br /&gt;
&lt;br /&gt;
* Device address : 0x15&lt;br /&gt;
* Frequency : from 10Khz to 400Khz&lt;br /&gt;
&lt;br /&gt;
'''NOTE : ''' The controller go to sleep when no event is detected. In sleep mode, the controller does not communicate on the I²C bus (it appears disconnected). So, for the communication to work, you need to tap on the screen so that the chip wakes-up.&lt;br /&gt;
&lt;br /&gt;
==== Touch events ====&lt;br /&gt;
&lt;br /&gt;
Touch informations are available in the 63 first registers of the controller. Remember : the device is in sleep mode when no touch event is detected. It means that you can read the register only when the touch controller detected an event. You can use the ''Interrupt'' pin to detect such event in the software. &lt;br /&gt;
&lt;br /&gt;
These 63 bytes contain up to 10 touch point (X, Y, event type, pressure,...) : &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Byte&lt;br /&gt;
! Bit7&lt;br /&gt;
! Bit6&lt;br /&gt;
! Bit5&lt;br /&gt;
! Bit4&lt;br /&gt;
! Bit3&lt;br /&gt;
! Bit2&lt;br /&gt;
! Bit1&lt;br /&gt;
! Bit0&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|GestureID : (Gesture code ,&lt;br /&gt;
&lt;br /&gt;
0x00: no gesture,&lt;br /&gt;
&lt;br /&gt;
0x01: Slide down,&lt;br /&gt;
&lt;br /&gt;
0x02: Slide up,&lt;br /&gt;
&lt;br /&gt;
0x03: Slide left,&lt;br /&gt;
&lt;br /&gt;
0x04: Slide right,&lt;br /&gt;
&lt;br /&gt;
0x05: Single click,&lt;br /&gt;
&lt;br /&gt;
0x0B: Double click,&lt;br /&gt;
&lt;br /&gt;
0x0C: Long press) &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|? &lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Number of touch points &lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Event (0 = Down, 1 = Up, 2 = Contact)&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|X (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|X (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Touch ID&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Y (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Y (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Pressure (?)&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Miscellaneous (?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bytes 3 to 8 are repeated 10 times (10*6 + 3 = 63 bytes).&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
&lt;br /&gt;
* The touch controller seems to report only 1 touch point&lt;br /&gt;
* Fields X, Y, Number of touch points and touch ID are updated. The others are always 0.&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
&lt;br /&gt;
The reference driver specifies some registers and value, but there is no information about them: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!Register&lt;br /&gt;
!Address&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_INT_CNT&lt;br /&gt;
|0x8F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FLOW_WORK_CNT&lt;br /&gt;
|0x91&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_WORKMODE &lt;br /&gt;
|0x00&lt;br /&gt;
|0 = WORK, 0x40 = FACTORY&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID&lt;br /&gt;
|0xA3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID2&lt;br /&gt;
|0x9F&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_POWER_MODE&lt;br /&gt;
|0xA5&lt;br /&gt;
|0x05 = SLEEP&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FW_VER&lt;br /&gt;
|0xA6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_VENDOR_ID&lt;br /&gt;
|0xA8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_LCD_BUSY_NUM&lt;br /&gt;
|0xAB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FACE_DEC_MODE_EN&lt;br /&gt;
|0xB0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GLOVE_MODE_EN&lt;br /&gt;
|0xC0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_COVER_MODE_EN&lt;br /&gt;
|0xC1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHARGER_MODE_EN&lt;br /&gt;
|0x8B&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_EN&lt;br /&gt;
|0xD0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_OUTPUT_ADDRESS&lt;br /&gt;
|0xD3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_ESD_SATURATE 0xED&lt;br /&gt;
|0xED&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''WARNING : ''' Writing the SLEEP command (write 0x05 in HYN_REG_POWER_MODE) seems to freeze the controller (it returns only static values) until the battery is totally drained and the whole system reset. Analysis and debugging is more than welcome!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Programming firmware ==&lt;br /&gt;
&lt;br /&gt;
=== Using JLink programmer and nrfjprog tools ===&lt;br /&gt;
&lt;br /&gt;
The following steps have been tested with the Segger JLink embedded in the [https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK NRF52-DK development board].&lt;br /&gt;
&lt;br /&gt;
1. Connect the Pinetime SWD pins to the debugger (P20 on NRF52-DK)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Pintime&lt;br /&gt;
!JLink&lt;br /&gt;
|-&lt;br /&gt;
|GND&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|SWDCLK&lt;br /&gt;
|SWDCLK&lt;br /&gt;
|-&lt;br /&gt;
|SWDIO&lt;br /&gt;
|SWDIO&lt;br /&gt;
|-&lt;br /&gt;
|VCC (3.3V)&lt;br /&gt;
|VTG (target detect)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Unlock the device and erase the memory. '''You need to execute this step only once, to remove the read protection on the memory. Note that it will erase the whole flash memory of the MCU!''' :&lt;br /&gt;
 &lt;br /&gt;
 nrfjporg -f NRF52 --recover&lt;br /&gt;
&lt;br /&gt;
3. Program the BLE softdevice (if needed by the firmware). Replace PATH_TO_NRF_SDK by the path where you unzipped the [https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK NRF52 SDK] :&lt;br /&gt;
&lt;br /&gt;
 nrfjprog -f NRF52 --program /PATH_TO_NRF_SDK/components/softdevice/s132/hex/s132_nrf52_6.1.1_softdevice.hex --sectorerase&lt;br /&gt;
&lt;br /&gt;
4. Program the firmware (replace firmware.hex by the actual filename of the firmware):&lt;br /&gt;
&lt;br /&gt;
 nrfjprog -f NRF52 --program firmware.hex --sectorerase&lt;br /&gt;
&lt;br /&gt;
5. Reset and run the new firmware:&lt;br /&gt;
 &lt;br /&gt;
 nrfjprog -f NRF52 --reset&lt;br /&gt;
&lt;br /&gt;
=== Using OpenOCD and a Raspberry Pi ===&lt;br /&gt;
&lt;br /&gt;
Instructions in [https://medium.com/@ly.lee/build-and-flash-rust-mynewt-firmware-for-pinetime-smart-watch-5e14259c55 Medium post], subsequently [https://medium.com/@ly.lee/openocd-on-raspberry-pi-better-with-swd-on-spi-7dea9caeb590 updated] with a more reliable method under development, so may be a bit of a moving target.&lt;br /&gt;
&lt;br /&gt;
=== Using STM32 bluepill as blackmagic probe ===&lt;br /&gt;
&lt;br /&gt;
Instructions in [https://forum.pine64.org/showthread.php?tid=8816&amp;amp;pid=57095#pid57095 forum post] or [https://gist.github.com/darnel/dac1370d057e176386ca4026418abc2b gist] (mac os)&lt;br /&gt;
&lt;br /&gt;
== Manual / Articles ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/najnesnaj/pinetime-zephyr Beginner manual explained how you to programs and install zephyr on PineTime Dev Kit, big thanks to najnesnaj :-)]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/swlh/sneak-peek-of-pinetime-smart-watch-and-why-its-perfect-for-teaching-iot-81b74161c159 Sneak Peek of PineTime Smart Watch… And why it’s perfect for teaching IoT]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/building-a-rust-driver-for-pinetimes-touch-controller-cbc1a5d5d3e9 Building a Rust Driver for PineTime’s Touch Controller]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/porting-druid-rust-widgets-to-pinetime-smart-watch-7e1d5a5d977a Porting (druid) Rust Widgets to PineTime Smart Watch]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/optimising-pinetimes-display-driver-with-rust-and-mynewt-3ba269ea2f5c Optimising PineTime’s Display Driver with Rust and Mynewt]&lt;br /&gt;
&lt;br /&gt;
* [https://www.zephyrproject.org/getting-started-with-zephyr-rtos-on-nordic-nrf52832-hackable/ Getting Started with Zephyr RTOS on Nordic nRF52832 hackaBLE]&lt;br /&gt;
&lt;br /&gt;
* [https://blog.aegrel.ee/absniffer-cmsis-dap-sniffer.html Removing the lock and installing another firmware on the nRF52832 using CMSIS-DAP dongle on Linux]&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/JF002/nrf52-baseproject/wiki/Build,-program-and-debug-NRF52-project-with-JLink,-CMake-and-CLion Build, program and debug NRF52 project with JLink, CMake and CLion]&lt;br /&gt;
&lt;br /&gt;
* [https://www.nrbtech.io/blog/2020/1/4/using-clion-for-nordic-nrf52-projects Using CLion for Nordic nRF52 projects]&lt;br /&gt;
&lt;br /&gt;
* [https://dev.to/aaronc81/flashing-your-pinetime-using-an-st-link-and-openocd-54dd Flashing your PineTime using an ST-Link and OpenOCD]&lt;br /&gt;
&lt;br /&gt;
== Development efforts ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! FreeRTOS&lt;br /&gt;
|https://www.freertos.org&lt;br /&gt;
| https://sourceforge.net/projects/freertos/&lt;br /&gt;
| [https://github.com/JF002/Pinetime JF002/Pinetime]&lt;br /&gt;
[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Zephyr&lt;br /&gt;
| https://www.zephyrproject.org&lt;br /&gt;
| https://github.com/zephyrproject-rtos/zephyr&lt;br /&gt;
| [https://github.com/najnesnaj/pinetime-zephyr najnesnaj/pinetime-zephyr]&lt;br /&gt;
[https://github.com/SuperPrower/pinetime_zephyr_sample_fw SuperPrower/pinetime_zephyr_sample_fw]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! mynewt&lt;br /&gt;
| https://mynewt.apache.org/about/&lt;br /&gt;
| https://github.com/apache/mynewt-core&lt;br /&gt;
| [https://github.com/lupyuen/pinetime-rust-mynewt lupyuen/pinetime-rust-mynewt]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MbedOS&lt;br /&gt;
| https://os.mbed.com&lt;br /&gt;
| https://github.com/ARMmbed/mbed-os&lt;br /&gt;
| [https://github.com/sethitow/awesome-pinetime sethitow/mbed-pinetime]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! RIOT&lt;br /&gt;
| http://riot-os.org/&lt;br /&gt;
| https://github.com/RIOT-OS/RIOT/&lt;br /&gt;
| [https://github.com/bosmoment/PineTime-apps bosmoment/PineTime-apps]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! TinyGo&lt;br /&gt;
| https://tinygo.org&lt;br /&gt;
| https://github.com/tinygo-org/tinygo&lt;br /&gt;
| [https://github.com/aykevl/go-smartwatch aykevl/go-smartwatch]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MicroPython&lt;br /&gt;
| https://micropython.org/&lt;br /&gt;
| https://github.com/micropython/micropython&lt;br /&gt;
| [https://github.com/daniel-thompson/wasp-os daniel-thompson/wasp-os]&lt;br /&gt;
|-&lt;br /&gt;
! AdaFruit bootloader&lt;br /&gt;
|&lt;br /&gt;
| https://github.com/adafruit/Adafruit_nRF52_Bootloader&lt;br /&gt;
| [https://github.com/daniel-thompson/wasp-bootloader daniel-thompson/wasp-bootloader]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! UI concepts and drawings&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [https://gitlab.com/arteeh/pinetimeos arteeh/pinetimeos]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets and Schematics ==&lt;br /&gt;
&lt;br /&gt;
=== Schematics ===&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Schematic-V1.0a-20191103.pdf PineTime Schematic ver1.0a]&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Port%20Assignment%20rev1.0.pdf PineTime GPIO Port Assignment ver1.0]&lt;br /&gt;
&lt;br /&gt;
=== Component Datasheets ===&lt;br /&gt;
* NORDIC SoC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/nRF52832%20product%20brief.pdf NORDIC nRF52832 Product Brief]&lt;br /&gt;
* PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGM40561.pdf SGMicro SGM40561 Single Cell Charger Datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGMICRO-SGM2036.pdf SGMicro SGM2036 3.3V Low Power Low Dropout RF Linear Regulator Datasheet]&lt;br /&gt;
* SPI Flash information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L6433F,%203V,%2064Mb,%20v1.6.pdf Macronix 64Mb(8MB) SPI NOR Flash]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L12835F,%203V,%20128Mb,%20v1.6.pdf Macronix 128Mb(16MB) SPI NOR Flash]&lt;br /&gt;
* LCD Panel:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20LCD%20Panel.jpg 1.3&amp;quot; 240x240 IPS LCD Panel Specification for PineTime]&lt;br /&gt;
** [https://wiki.pine64.org/images/5/54/ST7789V_v1.6.pdf 11.6&amp;quot; Sitronix LCD Driver/Controller Datasheet]&lt;br /&gt;
* Touchpad information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20Touch%20Panel.jpg Touchpad Specification for PineTimel]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/CST816S数据手册V1.1.pdf 11.6&amp;quot; Hynitron CST816S Capacitive Touch Controller Datasheet in Chinese]&lt;br /&gt;
*** [https://wiki.pine64.org/images/5/51/CST816S%E6%95%B0%E6%8D%AE%E6%89%8B%E5%86%8CV1.1.en.pdf English Translation]&lt;br /&gt;
* Sensor:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf BOSCH BMA421 Triaxial VAcceleration Sensor Product Brief]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/HRS3300%20Heart%20Rate%20Sensor.pdf TianYiHeXin HRS3300 PPG Heart Rate Sensor Data Sheet]&lt;br /&gt;
&lt;br /&gt;
= Community =&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=134 PineTime forum]&lt;br /&gt;
* [https://riot.im/app/#/room/#pinetime64:matrix.org Matrix Channel] (No login required to read)&lt;br /&gt;
* IRC: Server us.pine64.xyz. Type /list to see all channels&lt;br /&gt;
* [https://t.me/pinetime Telegram group]&lt;br /&gt;
* [https://discordapp.com/invite/DgB7kzr Discord server invite link]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime&amp;diff=4749</id>
		<title>PineTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime&amp;diff=4749"/>
		<updated>2020-01-22T10:06:03Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: /* Manual / Articles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Frequently_asked_questions_about_the_PineTime Click here to see frequently asked questions about the dev kit]&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
'''Dimensions:''' 37.5 x 40 x 11mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' 38 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''IP Rating:''' IP67 (waterproof to 1 meter) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 1.3 inches (33mm) diagonal&lt;br /&gt;
: '''Type:''' IPS capacitive touchscreen, RGB 65K colors&lt;br /&gt;
: '''Display Controller:''' ST7789&lt;br /&gt;
: '''Resolution:''' 240x240 pixels &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' Nordic Semiconductor nRF52832 &amp;lt;br&amp;gt;&lt;br /&gt;
'''Flash:''' 512KB with additional 4MB SPI NOR &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 64KB &amp;lt;br&amp;gt;&lt;br /&gt;
'''Bluetooth:''' 5.0 (including Bluetooth Low Energy) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sensors:''' Accelerometer, Heart rate sensor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Feedback:''' Vibration motor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' 170-180mAh LiPo&lt;br /&gt;
&lt;br /&gt;
== SWD Pinout ==&lt;br /&gt;
The devkits have exposed SWD pins for flashing and debugging. The pinout is:&lt;br /&gt;
[[File:PineTime_SWD_location.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Driving the peripherals ==&lt;br /&gt;
&lt;br /&gt;
=== Display ===&lt;br /&gt;
&lt;br /&gt;
Note: The factory-default software on the PineTime does not auto-detect the display being disconnected when it has already booted. That can cause garbled output, to fix it just restart the PineTime.&lt;br /&gt;
&lt;br /&gt;
The display is driven using the ST7789 display controller. Use the following pins to drive the screen:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! PineTime pin&lt;br /&gt;
! ST7789 pin&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SCK (P0.02)&lt;br /&gt;
| SPI clock&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SDI (P0.03)&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RS (P0.18)&lt;br /&gt;
| Clock/data pin (CD)&lt;br /&gt;
|-&lt;br /&gt;
| LCD_CS (P0.25)&lt;br /&gt;
| Chip select&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RESET (P0.26)&lt;br /&gt;
| Display reset&lt;br /&gt;
|-&lt;br /&gt;
| LCD_BACKLIGHT_{LOW,MID,HIGH}&lt;br /&gt;
| Backlight (active low)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Chip select must be held low while driving the display. It must be high when using other SPI devices on the same bus (such as external flash storage) so that the display controller won't respond to the wrong commands.&lt;br /&gt;
* SPI must be used in mode 3. Mode 0 (the default) won't work.&lt;br /&gt;
* LCD_DISPLAY_* is used to enable the backlight. Set at least one to low to see anything on the screen.&lt;br /&gt;
* Use SPI at 8MHz (the fastest clock available on the nRF52832) because otherwise refreshing will be super slow.&lt;br /&gt;
&lt;br /&gt;
=== Battery ===&lt;br /&gt;
&lt;br /&gt;
Reading whether the PineTime has power attached is easy: simply read the charge indication pin (P0.12). When it is high it is running on battery, when it is low it is charging.&lt;br /&gt;
&lt;br /&gt;
Reading the battery voltage is a bit harder. For that you can use the battery voltage pin on P0.31 (AIN7). The returned value is 12 bits, which means it is 0..4095. You can get the measured voltage with the following formula, assuming a reference voltage of 3.3V (this is configurable in the ADC):&lt;br /&gt;
&lt;br /&gt;
 adcVoltage = adcValue / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
The measured voltage is actually half of the actual battery voltage, because the ADC is connected between a voltage divider where both resistors are 1MΩ. This can be corrected by multiplying the value:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2 / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
It's often better to avoid floating point values on embedded systems and in this case there is no reason to use float at all, we can just represent the value in millivolts. Therefore the formula can be simplified to:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / (4095 / 3.3)&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / 1241&lt;br /&gt;
&lt;br /&gt;
Converting this voltage to an estimated capacity in percent requires a more complicated algorithm, because Lithium-ion batteries have a non-linear discharge curve.&lt;br /&gt;
&lt;br /&gt;
=== Button ===&lt;br /&gt;
&lt;br /&gt;
The button on the side of the PineTime is disabled by default. To enable it, drive the button out pin (P0.15) high.&lt;br /&gt;
&lt;br /&gt;
While enabled, the button in pin (P0.13) will be high when the button is pressed, and low when it is not pressed.&lt;br /&gt;
&lt;br /&gt;
=== Touch panel ===&lt;br /&gt;
&lt;br /&gt;
The touch panel is controlled by a Hynitron CST816S chips. Unfortunately, there is not much information about this chip on the internet apart from the datasheet below and a [https://github.com/lupyuen/hynitron_i2c_cst0xxse/ reference driver]. This is enough to implement a basic driver, but crucial information needed to implement advanced functionalities are missing (I²C protocol and registers, timings, power modes,...).&lt;br /&gt;
&lt;br /&gt;
==== Pins ====&lt;br /&gt;
&lt;br /&gt;
* P0.10 : Reset&lt;br /&gt;
* P0.28 : Interrupt (signal to the CPU when a touch event is detected)&lt;br /&gt;
* P0.06 : I²C SDA&lt;br /&gt;
* P0.07 : I²C SCL&lt;br /&gt;
&lt;br /&gt;
==== I²C ====&lt;br /&gt;
&lt;br /&gt;
* Device address : 0x15&lt;br /&gt;
* Frequency : from 10Khz to 400Khz&lt;br /&gt;
&lt;br /&gt;
'''NOTE : ''' The controller go to sleep when no event is detected. In sleep mode, the controller does not communicate on the I²C bus (it appears disconnected). So, for the communication to work, you need to tap on the screen so that the chip wakes-up.&lt;br /&gt;
&lt;br /&gt;
==== Touch events ====&lt;br /&gt;
&lt;br /&gt;
Touch informations are available in the 63 first registers of the controller. Remember : the device is in sleep mode when no touch event is detected. It means that you can read the register only when the touch controller detected an event. You can use the ''Interrupt'' pin to detect such event in the software. &lt;br /&gt;
&lt;br /&gt;
These 63 bytes contain up to 10 touch point (X, Y, event type, pressure,...) : &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Byte&lt;br /&gt;
! Bit7&lt;br /&gt;
! Bit6&lt;br /&gt;
! Bit5&lt;br /&gt;
! Bit4&lt;br /&gt;
! Bit3&lt;br /&gt;
! Bit2&lt;br /&gt;
! Bit1&lt;br /&gt;
! Bit0&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|GestureID : (Gesture code ,&lt;br /&gt;
&lt;br /&gt;
0x00: no gesture,&lt;br /&gt;
&lt;br /&gt;
0x01: on a slippery,&lt;br /&gt;
&lt;br /&gt;
0x02: decline,&lt;br /&gt;
&lt;br /&gt;
0x03: Left slip,&lt;br /&gt;
&lt;br /&gt;
0x04: Right slide,&lt;br /&gt;
&lt;br /&gt;
0x05: Click,&lt;br /&gt;
&lt;br /&gt;
0x0B: Double-click,&lt;br /&gt;
&lt;br /&gt;
0x0C: Press) &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|? &lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Number of touch points &lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Event (0 = Down, 1 = Up, 2 = Contact)&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|X (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|X (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Touch ID&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Y (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Y (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Pressure (?)&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Miscellaneous (?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bytes 3 to 8 are repeated 10 times (10*6 + 3 = 63 bytes).&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
&lt;br /&gt;
* The touch controller seems to report only 1 touch point&lt;br /&gt;
* Fields X, Y, Number of touch points and touch ID are updated. The others are always 0.&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
&lt;br /&gt;
The reference driver specifies some registers and value, but there is no information about them: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!Register&lt;br /&gt;
!Address&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_INT_CNT&lt;br /&gt;
|0x8F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FLOW_WORK_CNT&lt;br /&gt;
|0x91&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_WORKMODE &lt;br /&gt;
|0x00&lt;br /&gt;
|0 = WORK, 0x40 = FACTORY&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID&lt;br /&gt;
|0xA3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID2&lt;br /&gt;
|0x9F&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_POWER_MODE&lt;br /&gt;
|0xA5&lt;br /&gt;
|0x05 = SLEEP&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FW_VER&lt;br /&gt;
|0xA6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_VENDOR_ID&lt;br /&gt;
|0xA8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_LCD_BUSY_NUM&lt;br /&gt;
|0xAB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FACE_DEC_MODE_EN&lt;br /&gt;
|0xB0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GLOVE_MODE_EN&lt;br /&gt;
|0xC0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_COVER_MODE_EN&lt;br /&gt;
|0xC1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHARGER_MODE_EN&lt;br /&gt;
|0x8B&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_EN&lt;br /&gt;
|0xD0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_OUTPUT_ADDRESS&lt;br /&gt;
|0xD3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_ESD_SATURATE 0xED&lt;br /&gt;
|0xED&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''WARNING : ''' Writing the SLEEP command (write 0x05 in HYN_REG_POWER_MODE) seems to freeze the controller (it returns only static values) until the battery is totally drained and the whole system reset. Analysis and debugging is more than welcome!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Programming firmware ==&lt;br /&gt;
&lt;br /&gt;
=== Using JLink programmer and nrfjprog tools ===&lt;br /&gt;
&lt;br /&gt;
The following steps have been tested with the Segger JLink embedded in the [https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK NRF52-DK development board].&lt;br /&gt;
&lt;br /&gt;
1. Connect the Pinetime SWD pins to the debugger (P20 on NRF52-DK)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Pintime&lt;br /&gt;
!JLink&lt;br /&gt;
|-&lt;br /&gt;
|GND&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|SWDCLK&lt;br /&gt;
|SWDCLK&lt;br /&gt;
|-&lt;br /&gt;
|SWDIO&lt;br /&gt;
|SWDIO&lt;br /&gt;
|-&lt;br /&gt;
|VCC (3.3V)&lt;br /&gt;
|VTG (target detect)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Unlock the device and erase the memory. '''You need to execute this step only once, to remove the read protection on the memory. Note that it will erase the whole flash memory of the MCU!''' :&lt;br /&gt;
 &lt;br /&gt;
 nrfjporg -f NRF52 --recover&lt;br /&gt;
&lt;br /&gt;
3. Program the BLE softdevice (if needed by the firmware). Replace PATH_TO_NRF_SDK by the path where you unzipped the [https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK NRF52 SDK] :&lt;br /&gt;
&lt;br /&gt;
 nrfjprog -f NRF52 --program /PATH_TO_NRF_SDK/components/softdevice/s132/hex/s132_nrf52_6.1.1_softdevice.hex --sectorerase&lt;br /&gt;
&lt;br /&gt;
4. Program the firmware (replace firmware.hex by the actual filename of the firmware):&lt;br /&gt;
&lt;br /&gt;
 nrfjprog -f NRF52 --program firmware.hex --sectorerase&lt;br /&gt;
&lt;br /&gt;
5. Reset and run the new firmware:&lt;br /&gt;
 &lt;br /&gt;
 nrfjprog -f NRF52 --reset&lt;br /&gt;
&lt;br /&gt;
=== Using OpenOCD and a Raspberry Pi ===&lt;br /&gt;
&lt;br /&gt;
Instructions in [https://medium.com/@ly.lee/build-and-flash-rust-mynewt-firmware-for-pinetime-smart-watch-5e14259c55 Medium post]&lt;br /&gt;
&lt;br /&gt;
=== Using STM32 bluepill as blackmagic probe ===&lt;br /&gt;
&lt;br /&gt;
Instructions in [https://forum.pine64.org/showthread.php?tid=8816&amp;amp;pid=57095#pid57095 forum post]&lt;br /&gt;
&lt;br /&gt;
== Manual / Articles ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/najnesnaj/pinetime-zephyr Beginner manual explained how you to programs and install zephyr on PineTime Dev Kit, big thanks to najnesnaj :-)]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/swlh/sneak-peek-of-pinetime-smart-watch-and-why-its-perfect-for-teaching-iot-81b74161c159 Sneak Peek of PineTime Smart Watch… And why it’s perfect for teaching IoT]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/building-a-rust-driver-for-pinetimes-touch-controller-cbc1a5d5d3e9 Building a Rust Driver for PineTime’s Touch Controller]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/porting-druid-rust-widgets-to-pinetime-smart-watch-7e1d5a5d977a Porting (druid) Rust Widgets to PineTime Smart Watch]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/optimising-pinetimes-display-driver-with-rust-and-mynewt-3ba269ea2f5c Optimising PineTime’s Display Driver with Rust and Mynewt]&lt;br /&gt;
&lt;br /&gt;
* [https://www.zephyrproject.org/getting-started-with-zephyr-rtos-on-nordic-nrf52832-hackable/ Getting Started with Zephyr RTOS on Nordic nRF52832 hackaBLE]&lt;br /&gt;
&lt;br /&gt;
* [https://blog.aegrel.ee/absniffer-cmsis-dap-sniffer.html Removing the lock and installing another firmware on the nRF52832 using CMSIS-DAP dongle on Linux]&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/JF002/nrf52-baseproject/wiki/Build,-program-and-debug-NRF52-project-with-JLink,-CMake-and-CLion Build, program and debug NRF52 project with JLink, CMake and CLion]&lt;br /&gt;
&lt;br /&gt;
* [https://www.nrbtech.io/blog/2020/1/4/using-clion-for-nordic-nrf52-projects Using CLion for Nordic nRF52 projects]&lt;br /&gt;
&lt;br /&gt;
* [https://dev.to/aaronc81/flashing-your-pinetime-using-an-st-link-and-openocd-54dd Flashing your PineTime using an ST-Link and OpenOCD]&lt;br /&gt;
&lt;br /&gt;
== Development efforts ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! FreeRTOS&lt;br /&gt;
|https://www.freertos.org&lt;br /&gt;
| https://sourceforge.net/projects/freertos/&lt;br /&gt;
| [https://github.com/JF002/Pinetime JF002/Pinetime]&lt;br /&gt;
[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Zephyr&lt;br /&gt;
| https://www.zephyrproject.org&lt;br /&gt;
| https://github.com/zephyrproject-rtos/zephyr&lt;br /&gt;
| [https://github.com/najnesnaj/pinetime-zephyr najnesnaj/pinetime-zephyr]&lt;br /&gt;
[https://github.com/SuperPrower/pinetime_zephyr_sample_fw SuperPrower/pinetime_zephyr_sample_fw]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! mynewt&lt;br /&gt;
| https://mynewt.apache.org/about/&lt;br /&gt;
| https://github.com/apache/mynewt-core&lt;br /&gt;
| [https://github.com/lupyuen/pinetime-rust-mynewt lupyuen/pinetime-rust-mynewt]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MbedOS&lt;br /&gt;
| https://os.mbed.com&lt;br /&gt;
| https://github.com/ARMmbed/mbed-os&lt;br /&gt;
| [https://github.com/sethitow/awesome-pinetime sethitow/mbed-pinetime]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! RIOT&lt;br /&gt;
| http://riot-os.org/&lt;br /&gt;
| https://github.com/RIOT-OS/RIOT/&lt;br /&gt;
| [https://github.com/bosmoment/PineTime-apps bosmoment/PineTime-apps]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! TinyGo&lt;br /&gt;
| https://tinygo.org&lt;br /&gt;
| https://github.com/tinygo-org/tinygo&lt;br /&gt;
| [https://github.com/aykevl/go-smartwatch aykevl/go-smartwatch]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MicroPython&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/daniel-thompson/wasp-os daniel-thompson/wasp-os]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets and Schematics ==&lt;br /&gt;
&lt;br /&gt;
=== Schematics ===&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Schematic-V1.0a-20191103.pdf PineTime Schematic ver1.0a]&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Port%20Assignment%20rev1.0.pdf PineTime GPIO Port Assignment ver1.0]&lt;br /&gt;
&lt;br /&gt;
=== Component Datasheets ===&lt;br /&gt;
* NORDIC SoC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/nRF52832%20product%20brief.pdf NORDIC nRF52832 Product Brief]&lt;br /&gt;
* PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGM40561.pdf SGMicro SGM40561 Single Cell Charger Datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGMICRO-SGM2036.pdf SGMicro SGM2036 3.3V Low Power Low Dropout RF Linear Regulator Datasheet]&lt;br /&gt;
* SPI Flash information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L6433F,%203V,%2064Mb,%20v1.6.pdf Macronix 64Mb(8MB) SPI NOR Flash]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L12835F,%203V,%20128Mb,%20v1.6.pdf Macronix 128Mb(16MB) SPI NOR Flash]&lt;br /&gt;
* LCD Panel:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20LCD%20Panel.jpg 1.3&amp;quot; 240x240 IPS LCD Panel Specification for PineTime]&lt;br /&gt;
** [https://wiki.pine64.org/images/5/54/ST7789V_v1.6.pdf 11.6&amp;quot; Sitronix LCD Driver/Controller Datasheet]&lt;br /&gt;
* Touchpad information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20Touch%20Panel.jpg Touchpad Specification for PineTimel]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/CST816S数据手册V1.1.pdf 11.6&amp;quot; Hynitron CST816S Capacitive Touch Controller Datasheet in Chinese]&lt;br /&gt;
*** [https://wiki.pine64.org/images/5/51/CST816S%E6%95%B0%E6%8D%AE%E6%89%8B%E5%86%8CV1.1.en.pdf English Translation]&lt;br /&gt;
* Sensor:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf BOSCH BMA421 Triaxial VAcceleration Sensor Product Brief]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/HRS3300%20Heart%20Rate%20Sensor.pdf TianYiHeXin HRS3300 PPG Heart Rate Sensor Data Sheet]&lt;br /&gt;
&lt;br /&gt;
= Community =&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=134 PineTime forum]&lt;br /&gt;
* [https://riot.im/app/#/room/#pinetime64:matrix.org Matrix Channel] (No login required to read)&lt;br /&gt;
* IRC: Server us.pine64.xyz. Type /list to see all channels&lt;br /&gt;
* [https://t.me/pinetime Telegram group]&lt;br /&gt;
* [https://discordapp.com/invite/DgB7kzr Discord server invite link]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime&amp;diff=4748</id>
		<title>PineTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime&amp;diff=4748"/>
		<updated>2020-01-22T10:05:09Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: /* Frequently asked questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Frequently_asked_questions_about_the_PineTime Click here to see frequently asked questions about the dev kit]&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
'''Dimensions:''' 37.5 x 40 x 11mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' 38 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''IP Rating:''' IP67 (waterproof to 1 meter) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 1.3 inches (33mm) diagonal&lt;br /&gt;
: '''Type:''' IPS capacitive touchscreen, RGB 65K colors&lt;br /&gt;
: '''Display Controller:''' ST7789&lt;br /&gt;
: '''Resolution:''' 240x240 pixels &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' Nordic Semiconductor nRF52832 &amp;lt;br&amp;gt;&lt;br /&gt;
'''Flash:''' 512KB with additional 4MB SPI NOR &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 64KB &amp;lt;br&amp;gt;&lt;br /&gt;
'''Bluetooth:''' 5.0 (including Bluetooth Low Energy) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sensors:''' Accelerometer, Heart rate sensor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Feedback:''' Vibration motor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' 170-180mAh LiPo&lt;br /&gt;
&lt;br /&gt;
== SWD Pinout ==&lt;br /&gt;
The devkits have exposed SWD pins for flashing and debugging. The pinout is:&lt;br /&gt;
[[File:PineTime_SWD_location.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Driving the peripherals ==&lt;br /&gt;
&lt;br /&gt;
=== Display ===&lt;br /&gt;
&lt;br /&gt;
Note: The factory-default software on the PineTime does not auto-detect the display being disconnected when it has already booted. That can cause garbled output, to fix it just restart the PineTime.&lt;br /&gt;
&lt;br /&gt;
The display is driven using the ST7789 display controller. Use the following pins to drive the screen:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! PineTime pin&lt;br /&gt;
! ST7789 pin&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SCK (P0.02)&lt;br /&gt;
| SPI clock&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SDI (P0.03)&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RS (P0.18)&lt;br /&gt;
| Clock/data pin (CD)&lt;br /&gt;
|-&lt;br /&gt;
| LCD_CS (P0.25)&lt;br /&gt;
| Chip select&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RESET (P0.26)&lt;br /&gt;
| Display reset&lt;br /&gt;
|-&lt;br /&gt;
| LCD_BACKLIGHT_{LOW,MID,HIGH}&lt;br /&gt;
| Backlight (active low)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Chip select must be held low while driving the display. It must be high when using other SPI devices on the same bus (such as external flash storage) so that the display controller won't respond to the wrong commands.&lt;br /&gt;
* SPI must be used in mode 3. Mode 0 (the default) won't work.&lt;br /&gt;
* LCD_DISPLAY_* is used to enable the backlight. Set at least one to low to see anything on the screen.&lt;br /&gt;
* Use SPI at 8MHz (the fastest clock available on the nRF52832) because otherwise refreshing will be super slow.&lt;br /&gt;
&lt;br /&gt;
=== Battery ===&lt;br /&gt;
&lt;br /&gt;
Reading whether the PineTime has power attached is easy: simply read the charge indication pin (P0.12). When it is high it is running on battery, when it is low it is charging.&lt;br /&gt;
&lt;br /&gt;
Reading the battery voltage is a bit harder. For that you can use the battery voltage pin on P0.31 (AIN7). The returned value is 12 bits, which means it is 0..4095. You can get the measured voltage with the following formula, assuming a reference voltage of 3.3V (this is configurable in the ADC):&lt;br /&gt;
&lt;br /&gt;
 adcVoltage = adcValue / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
The measured voltage is actually half of the actual battery voltage, because the ADC is connected between a voltage divider where both resistors are 1MΩ. This can be corrected by multiplying the value:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2 / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
It's often better to avoid floating point values on embedded systems and in this case there is no reason to use float at all, we can just represent the value in millivolts. Therefore the formula can be simplified to:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / (4095 / 3.3)&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / 1241&lt;br /&gt;
&lt;br /&gt;
Converting this voltage to an estimated capacity in percent requires a more complicated algorithm, because Lithium-ion batteries have a non-linear discharge curve.&lt;br /&gt;
&lt;br /&gt;
=== Button ===&lt;br /&gt;
&lt;br /&gt;
The button on the side of the PineTime is disabled by default. To enable it, drive the button out pin (P0.15) high.&lt;br /&gt;
&lt;br /&gt;
While enabled, the button in pin (P0.13) will be high when the button is pressed, and low when it is not pressed.&lt;br /&gt;
&lt;br /&gt;
=== Touch panel ===&lt;br /&gt;
&lt;br /&gt;
The touch panel is controlled by a Hynitron CST816S chips. Unfortunately, there is not much information about this chip on the internet apart from the datasheet below and a [https://github.com/lupyuen/hynitron_i2c_cst0xxse/ reference driver]. This is enough to implement a basic driver, but crucial information needed to implement advanced functionalities are missing (I²C protocol and registers, timings, power modes,...).&lt;br /&gt;
&lt;br /&gt;
==== Pins ====&lt;br /&gt;
&lt;br /&gt;
* P0.10 : Reset&lt;br /&gt;
* P0.28 : Interrupt (signal to the CPU when a touch event is detected)&lt;br /&gt;
* P0.06 : I²C SDA&lt;br /&gt;
* P0.07 : I²C SCL&lt;br /&gt;
&lt;br /&gt;
==== I²C ====&lt;br /&gt;
&lt;br /&gt;
* Device address : 0x15&lt;br /&gt;
* Frequency : from 10Khz to 400Khz&lt;br /&gt;
&lt;br /&gt;
'''NOTE : ''' The controller go to sleep when no event is detected. In sleep mode, the controller does not communicate on the I²C bus (it appears disconnected). So, for the communication to work, you need to tap on the screen so that the chip wakes-up.&lt;br /&gt;
&lt;br /&gt;
==== Touch events ====&lt;br /&gt;
&lt;br /&gt;
Touch informations are available in the 63 first registers of the controller. Remember : the device is in sleep mode when no touch event is detected. It means that you can read the register only when the touch controller detected an event. You can use the ''Interrupt'' pin to detect such event in the software. &lt;br /&gt;
&lt;br /&gt;
These 63 bytes contain up to 10 touch point (X, Y, event type, pressure,...) : &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Byte&lt;br /&gt;
! Bit7&lt;br /&gt;
! Bit6&lt;br /&gt;
! Bit5&lt;br /&gt;
! Bit4&lt;br /&gt;
! Bit3&lt;br /&gt;
! Bit2&lt;br /&gt;
! Bit1&lt;br /&gt;
! Bit0&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|GestureID : (Gesture code ,&lt;br /&gt;
&lt;br /&gt;
0x00: no gesture,&lt;br /&gt;
&lt;br /&gt;
0x01: on a slippery,&lt;br /&gt;
&lt;br /&gt;
0x02: decline,&lt;br /&gt;
&lt;br /&gt;
0x03: Left slip,&lt;br /&gt;
&lt;br /&gt;
0x04: Right slide,&lt;br /&gt;
&lt;br /&gt;
0x05: Click,&lt;br /&gt;
&lt;br /&gt;
0x0B: Double-click,&lt;br /&gt;
&lt;br /&gt;
0x0C: Press) &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|? &lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Number of touch points &lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Event (0 = Down, 1 = Up, 2 = Contact)&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|X (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|X (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Touch ID&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Y (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Y (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Pressure (?)&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Miscellaneous (?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bytes 3 to 8 are repeated 10 times (10*6 + 3 = 63 bytes).&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
&lt;br /&gt;
* The touch controller seems to report only 1 touch point&lt;br /&gt;
* Fields X, Y, Number of touch points and touch ID are updated. The others are always 0.&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
&lt;br /&gt;
The reference driver specifies some registers and value, but there is no information about them: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!Register&lt;br /&gt;
!Address&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_INT_CNT&lt;br /&gt;
|0x8F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FLOW_WORK_CNT&lt;br /&gt;
|0x91&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_WORKMODE &lt;br /&gt;
|0x00&lt;br /&gt;
|0 = WORK, 0x40 = FACTORY&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID&lt;br /&gt;
|0xA3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID2&lt;br /&gt;
|0x9F&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_POWER_MODE&lt;br /&gt;
|0xA5&lt;br /&gt;
|0x05 = SLEEP&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FW_VER&lt;br /&gt;
|0xA6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_VENDOR_ID&lt;br /&gt;
|0xA8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_LCD_BUSY_NUM&lt;br /&gt;
|0xAB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FACE_DEC_MODE_EN&lt;br /&gt;
|0xB0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GLOVE_MODE_EN&lt;br /&gt;
|0xC0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_COVER_MODE_EN&lt;br /&gt;
|0xC1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHARGER_MODE_EN&lt;br /&gt;
|0x8B&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_EN&lt;br /&gt;
|0xD0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_OUTPUT_ADDRESS&lt;br /&gt;
|0xD3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_ESD_SATURATE 0xED&lt;br /&gt;
|0xED&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''WARNING : ''' Writing the SLEEP command (write 0x05 in HYN_REG_POWER_MODE) seems to freeze the controller (it returns only static values) until the battery is totally drained and the whole system reset. Analysis and debugging is more than welcome!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Programming firmware ==&lt;br /&gt;
&lt;br /&gt;
=== Using JLink programmer and nrfjprog tools ===&lt;br /&gt;
&lt;br /&gt;
The following steps have been tested with the Segger JLink embedded in the [https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK NRF52-DK development board].&lt;br /&gt;
&lt;br /&gt;
1. Connect the Pinetime SWD pins to the debugger (P20 on NRF52-DK)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Pintime&lt;br /&gt;
!JLink&lt;br /&gt;
|-&lt;br /&gt;
|GND&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|SWDCLK&lt;br /&gt;
|SWDCLK&lt;br /&gt;
|-&lt;br /&gt;
|SWDIO&lt;br /&gt;
|SWDIO&lt;br /&gt;
|-&lt;br /&gt;
|VCC (3.3V)&lt;br /&gt;
|VTG (target detect)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Unlock the device and erase the memory. '''You need to execute this step only once, to remove the read protection on the memory. Note that it will erase the whole flash memory of the MCU!''' :&lt;br /&gt;
 &lt;br /&gt;
 nrfjporg -f NRF52 --recover&lt;br /&gt;
&lt;br /&gt;
3. Program the BLE softdevice (if needed by the firmware). Replace PATH_TO_NRF_SDK by the path where you unzipped the [https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK NRF52 SDK] :&lt;br /&gt;
&lt;br /&gt;
 nrfjprog -f NRF52 --program /PATH_TO_NRF_SDK/components/softdevice/s132/hex/s132_nrf52_6.1.1_softdevice.hex --sectorerase&lt;br /&gt;
&lt;br /&gt;
4. Program the firmware (replace firmware.hex by the actual filename of the firmware):&lt;br /&gt;
&lt;br /&gt;
 nrfjprog -f NRF52 --program firmware.hex --sectorerase&lt;br /&gt;
&lt;br /&gt;
5. Reset and run the new firmware:&lt;br /&gt;
 &lt;br /&gt;
 nrfjprog -f NRF52 --reset&lt;br /&gt;
&lt;br /&gt;
=== Using OpenOCD and a Raspberry Pi ===&lt;br /&gt;
&lt;br /&gt;
Instructions in [https://medium.com/@ly.lee/build-and-flash-rust-mynewt-firmware-for-pinetime-smart-watch-5e14259c55 Medium post]&lt;br /&gt;
&lt;br /&gt;
=== Using STM32 bluepill as blackmagic probe ===&lt;br /&gt;
&lt;br /&gt;
Instructions in [https://forum.pine64.org/showthread.php?tid=8816&amp;amp;pid=57095#pid57095 forum post]&lt;br /&gt;
&lt;br /&gt;
== Manual / Articles ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/najnesnaj/pinetime-zephyr Beginner manual explained how you to programs and install zephyr on PineTime Dev Kit, big thanks to najnesnaj :-)]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/swlh/sneak-peek-of-pinetime-smart-watch-and-why-its-perfect-for-teaching-iot-81b74161c159 Sneak Peek of PineTime Smart Watch… And why it’s perfect for teaching IoT]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/building-a-rust-driver-for-pinetimes-touch-controller-cbc1a5d5d3e9 Building a Rust Driver for PineTime’s Touch Controller]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/porting-druid-rust-widgets-to-pinetime-smart-watch-7e1d5a5d977a Porting (druid) Rust Widgets to PineTime Smart Watch]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/optimising-pinetimes-display-driver-with-rust-and-mynewt-3ba269ea2f5c Optimising PineTime’s Display Driver with Rust and Mynewt]&lt;br /&gt;
&lt;br /&gt;
* [https://www.zephyrproject.org/getting-started-with-zephyr-rtos-on-nordic-nrf52832-hackable/ Getting Started with Zephyr RTOS on Nordic nRF52832 hackaBLE]&lt;br /&gt;
&lt;br /&gt;
* [https://blog.aegrel.ee/absniffer-cmsis-dap-sniffer.html Removing the lock and installing another firmware on the nRF52832 using CMSIS-DAP dongle on Linux]&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/JF002/nrf52-baseproject/wiki/Build,-program-and-debug-NRF52-project-with-JLink,-CMake-and-CLion Build, program and debug NRF52 project with JLink, CMake and CLion]&lt;br /&gt;
&lt;br /&gt;
* [https://www.nrbtech.io/blog/2020/1/4/using-clion-for-nordic-nrf52-projects Using CLion for Nordic nRF52 projects]&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Frequently_asked_questions_about_the_PineTime Frequently asked questions about the dev kit]&lt;br /&gt;
&lt;br /&gt;
* [https://dev.to/aaronc81/flashing-your-pinetime-using-an-st-link-and-openocd-54dd Flashing your PineTime using an ST-Link and OpenOCD]&lt;br /&gt;
&lt;br /&gt;
== Development efforts ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! FreeRTOS&lt;br /&gt;
|https://www.freertos.org&lt;br /&gt;
| https://sourceforge.net/projects/freertos/&lt;br /&gt;
| [https://github.com/JF002/Pinetime JF002/Pinetime]&lt;br /&gt;
[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Zephyr&lt;br /&gt;
| https://www.zephyrproject.org&lt;br /&gt;
| https://github.com/zephyrproject-rtos/zephyr&lt;br /&gt;
| [https://github.com/najnesnaj/pinetime-zephyr najnesnaj/pinetime-zephyr]&lt;br /&gt;
[https://github.com/SuperPrower/pinetime_zephyr_sample_fw SuperPrower/pinetime_zephyr_sample_fw]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! mynewt&lt;br /&gt;
| https://mynewt.apache.org/about/&lt;br /&gt;
| https://github.com/apache/mynewt-core&lt;br /&gt;
| [https://github.com/lupyuen/pinetime-rust-mynewt lupyuen/pinetime-rust-mynewt]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MbedOS&lt;br /&gt;
| https://os.mbed.com&lt;br /&gt;
| https://github.com/ARMmbed/mbed-os&lt;br /&gt;
| [https://github.com/sethitow/awesome-pinetime sethitow/mbed-pinetime]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! RIOT&lt;br /&gt;
| http://riot-os.org/&lt;br /&gt;
| https://github.com/RIOT-OS/RIOT/&lt;br /&gt;
| [https://github.com/bosmoment/PineTime-apps bosmoment/PineTime-apps]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! TinyGo&lt;br /&gt;
| https://tinygo.org&lt;br /&gt;
| https://github.com/tinygo-org/tinygo&lt;br /&gt;
| [https://github.com/aykevl/go-smartwatch aykevl/go-smartwatch]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MicroPython&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/daniel-thompson/wasp-os daniel-thompson/wasp-os]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets and Schematics ==&lt;br /&gt;
&lt;br /&gt;
=== Schematics ===&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Schematic-V1.0a-20191103.pdf PineTime Schematic ver1.0a]&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Port%20Assignment%20rev1.0.pdf PineTime GPIO Port Assignment ver1.0]&lt;br /&gt;
&lt;br /&gt;
=== Component Datasheets ===&lt;br /&gt;
* NORDIC SoC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/nRF52832%20product%20brief.pdf NORDIC nRF52832 Product Brief]&lt;br /&gt;
* PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGM40561.pdf SGMicro SGM40561 Single Cell Charger Datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGMICRO-SGM2036.pdf SGMicro SGM2036 3.3V Low Power Low Dropout RF Linear Regulator Datasheet]&lt;br /&gt;
* SPI Flash information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L6433F,%203V,%2064Mb,%20v1.6.pdf Macronix 64Mb(8MB) SPI NOR Flash]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L12835F,%203V,%20128Mb,%20v1.6.pdf Macronix 128Mb(16MB) SPI NOR Flash]&lt;br /&gt;
* LCD Panel:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20LCD%20Panel.jpg 1.3&amp;quot; 240x240 IPS LCD Panel Specification for PineTime]&lt;br /&gt;
** [https://wiki.pine64.org/images/5/54/ST7789V_v1.6.pdf 11.6&amp;quot; Sitronix LCD Driver/Controller Datasheet]&lt;br /&gt;
* Touchpad information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20Touch%20Panel.jpg Touchpad Specification for PineTimel]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/CST816S数据手册V1.1.pdf 11.6&amp;quot; Hynitron CST816S Capacitive Touch Controller Datasheet in Chinese]&lt;br /&gt;
*** [https://wiki.pine64.org/images/5/51/CST816S%E6%95%B0%E6%8D%AE%E6%89%8B%E5%86%8CV1.1.en.pdf English Translation]&lt;br /&gt;
* Sensor:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf BOSCH BMA421 Triaxial VAcceleration Sensor Product Brief]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/HRS3300%20Heart%20Rate%20Sensor.pdf TianYiHeXin HRS3300 PPG Heart Rate Sensor Data Sheet]&lt;br /&gt;
&lt;br /&gt;
= Community =&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=134 PineTime forum]&lt;br /&gt;
* [https://riot.im/app/#/room/#pinetime64:matrix.org Matrix Channel] (No login required to read)&lt;br /&gt;
* IRC: Server us.pine64.xyz. Type /list to see all channels&lt;br /&gt;
* [https://t.me/pinetime Telegram group]&lt;br /&gt;
* [https://discordapp.com/invite/DgB7kzr Discord server invite link]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime&amp;diff=4542</id>
		<title>PineTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime&amp;diff=4542"/>
		<updated>2020-01-11T09:40:57Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: /* Manual / Articles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Specifications ==&lt;br /&gt;
'''Dimensions:''' 37.5 x 40 x 11mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' 38 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''IP Rating:''' IP67 (waterproof to 1 meter) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 1.3 inches (33mm) diagonal&lt;br /&gt;
: '''Type:''' IPS capacitive touchscreen, RGB 65K colors&lt;br /&gt;
: '''Display Controller:''' ST7789&lt;br /&gt;
: '''Resolution:''' 240x240 pixels &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' Nordic Semiconductor nRF52832 &amp;lt;br&amp;gt;&lt;br /&gt;
'''Flash:''' 512KB with additional 4MB SPI NOR &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 64KB &amp;lt;br&amp;gt;&lt;br /&gt;
'''Bluetooth:''' 5.0 (including Bluetooth Low Energy) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sensors:''' Accelerometer, Heart rate sensor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Feedback:''' Vibration motor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' 170-180mAh LiPo&lt;br /&gt;
&lt;br /&gt;
== SWD Pinout ==&lt;br /&gt;
The devkits have exposed SWD pins for flashing and debugging. The pinout is:&lt;br /&gt;
[[File:PineTime_SWD_location.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Driving the peripherals ==&lt;br /&gt;
&lt;br /&gt;
=== Display ===&lt;br /&gt;
&lt;br /&gt;
Note: The factory-default software on the PineTime does not auto-detect the display being disconnected when it has already booted. That can cause garbled output, to fix it just restart the PineTime.&lt;br /&gt;
&lt;br /&gt;
The display is driven using the ST7789 display controller. Use the following pins to drive the screen:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! PineTime pin&lt;br /&gt;
! ST7789 pin&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SCK (P0.02)&lt;br /&gt;
| SPI clock&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SDI (P0.03)&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RS (P0.18)&lt;br /&gt;
| Clock/data pin (CD)&lt;br /&gt;
|-&lt;br /&gt;
| LCD_CS (P0.25)&lt;br /&gt;
| Chip select&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RESET (P0.26)&lt;br /&gt;
| Display reset&lt;br /&gt;
|-&lt;br /&gt;
| LCD_BACKLIGHT_{LOW,MID,HIGH}&lt;br /&gt;
| Backlight (active low)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Chip select must be held low while driving the display. It must be high when using other SPI devices on the same bus (such as external flash storage) so that the display controller won't respond to the wrong commands.&lt;br /&gt;
* SPI must be used in mode 3. Mode 0 (the default) won't work.&lt;br /&gt;
* LCD_DISPLAY_* is used to enable the backlight. Set at least one to low to see anything on the screen.&lt;br /&gt;
* Use SPI at 8MHz (the fastest clock available on the nRF52832) because otherwise refreshing will be super slow.&lt;br /&gt;
&lt;br /&gt;
=== Battery ===&lt;br /&gt;
&lt;br /&gt;
Reading whether the PineTime has power attached is easy: simply read the charge indication pin (P0.12). When it is high it is running on battery, when it is low it is charging.&lt;br /&gt;
&lt;br /&gt;
Reading the battery voltage is a bit harder. For that you can use the battery voltage pin on P0.31 (AIN7). The returned value is 12 bits, which means it is 0..4095. You can get the measured voltage with the following formula, assuming a reference voltage of 3.3V (this is configurable in the ADC):&lt;br /&gt;
&lt;br /&gt;
 adcVoltage = adcValue / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
The measured voltage is actually half of the actual battery voltage, because the ADC is connected between a voltage divider where both resistors are 1MΩ. This can be corrected by multiplying the value:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2 / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
It's often better to avoid floating point values on embedded systems and in this case there is no reason to use float at all, we can just represent the value in millivolts. Therefore the formula can be simplified to:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / (4095 / 3.3)&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / 1241&lt;br /&gt;
&lt;br /&gt;
Converting this voltage to an estimated capacity in percent requires a more complicated algorithm, because Lithium-ion batteries have a non-linear discharge curve.&lt;br /&gt;
&lt;br /&gt;
=== Touch panel ===&lt;br /&gt;
&lt;br /&gt;
The touch panel is controlled by a Hynitron CST816S chips. Unfortunately, there is not much information about this chip on the internet apart from the datasheet below and a [https://github.com/lupyuen/hynitron_i2c_cst0xxse/ reference driver]. This is enough to implement a basic driver, but crucial information needed to implement advanced functionalities are missing (I²C protocol and registers, timings, power modes,...).&lt;br /&gt;
&lt;br /&gt;
==== Pins ====&lt;br /&gt;
&lt;br /&gt;
* P0.10 : Reset&lt;br /&gt;
* P0.28 : Interrupt (signal to the CPU when a touch event is detected)&lt;br /&gt;
* P0.06 : I²C SDA&lt;br /&gt;
* P0.07 : I²C SCL&lt;br /&gt;
&lt;br /&gt;
==== I²C ====&lt;br /&gt;
&lt;br /&gt;
* Device address : 0x15&lt;br /&gt;
* Frequency : from 10Khz to 400Khz&lt;br /&gt;
&lt;br /&gt;
'''NOTE : ''' The controller go to sleep when no event is detected. In sleep mode, the controller does not communicate on the I²C bus (it appears disconnected). So, for the communication to work, you need to tap on the screen so that the chip wakes-up.&lt;br /&gt;
&lt;br /&gt;
==== Touch events ====&lt;br /&gt;
&lt;br /&gt;
Touch informations are available in the 63 first registers of the controller. Remember : the device is in sleep mode when no touch event is detected. It means that you can read the register only when the touch controller detected an event. You can use the ''Interrupt'' pin to detect such event in the software. &lt;br /&gt;
&lt;br /&gt;
These 63 bytes contain up to 10 touch point (X, Y, event type, pressure,...) : &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Byte&lt;br /&gt;
! Bit7&lt;br /&gt;
! Bit6&lt;br /&gt;
! Bit5&lt;br /&gt;
! Bit4&lt;br /&gt;
! Bit3&lt;br /&gt;
! Bit2&lt;br /&gt;
! Bit1&lt;br /&gt;
! Bit0&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|? &lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|? &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|? &lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Number of touch points &lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Event (0 = Down, 1 = Up, 2 = Contact)&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|X (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|X (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Touch ID&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Y (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Y (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Pressure (?)&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Miscellaneous (?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bytes 3 to 8 are repeated 10 times (10*6 + 3 = 63 bytes).&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
&lt;br /&gt;
* The touch controller seems to report only 1 touch point&lt;br /&gt;
* Fields X, Y, Number of touch points and touch ID are updated. The others are always 0.&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
&lt;br /&gt;
The reference driver specifies some registers and value, but there is no information about them: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!Register&lt;br /&gt;
!Address&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_INT_CNT&lt;br /&gt;
|0x8F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FLOW_WORK_CNT&lt;br /&gt;
|0x91&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_WORKMODE &lt;br /&gt;
|0x00&lt;br /&gt;
|0 = WORK, 0x40 = FACTORY&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID&lt;br /&gt;
|0xA3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID2&lt;br /&gt;
|0x9F&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_POWER_MODE&lt;br /&gt;
|0xA5&lt;br /&gt;
|0x05 = SLEEP&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FW_VER&lt;br /&gt;
|0xA6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_VENDOR_ID&lt;br /&gt;
|0xA8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_LCD_BUSY_NUM&lt;br /&gt;
|0xAB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FACE_DEC_MODE_EN&lt;br /&gt;
|0xB0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GLOVE_MODE_EN&lt;br /&gt;
|0xC0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_COVER_MODE_EN&lt;br /&gt;
|0xC1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHARGER_MODE_EN&lt;br /&gt;
|0x8B&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_EN&lt;br /&gt;
|0xD0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_OUTPUT_ADDRESS&lt;br /&gt;
|0xD3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_ESD_SATURATE 0xED&lt;br /&gt;
|0xED&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''WARNING : ''' Writing the SLEEP command (write 0x05 in HYN_REG_POWER_MODE) seems to freeze the controller (it returns only static values) until the battery is totally drained and the whole system reset. Analysis and debugging is more than welcome!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Programming firmware ==&lt;br /&gt;
&lt;br /&gt;
=== Using JLink programmer and nrfjprog tools ===&lt;br /&gt;
&lt;br /&gt;
The following steps have been tested with the Segger JLink embedded in the [https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK NRF52-DK development board].&lt;br /&gt;
&lt;br /&gt;
1. Connect the Pinetime SWD pins to the debugger (P20 on NRF52-DK)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Pintime&lt;br /&gt;
!JLink&lt;br /&gt;
|-&lt;br /&gt;
|GND&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|SWDCLK&lt;br /&gt;
|SWDCLK&lt;br /&gt;
|-&lt;br /&gt;
|SWDIO&lt;br /&gt;
|SWDIO&lt;br /&gt;
|-&lt;br /&gt;
|VCC (3.3V)&lt;br /&gt;
|VTG (target detect)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Unlock the device and erase the memory. '''You need to execute this step only once, to remove the read protection on the memory. Note that it will erase the whole flash memory of the MCU!''' :&lt;br /&gt;
 &lt;br /&gt;
 nrfjporg -f NRF52 --recover&lt;br /&gt;
&lt;br /&gt;
3. Program the BLE softdevice (if needed by the firmware). Replace PATH_TO_NRF_SDK by the path where you unzipped the [https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK NRF52 SDK] :&lt;br /&gt;
&lt;br /&gt;
 nrfjprog -f NRF52 --program /PATH_TO_NRF_SDK/components/softdevice/s132/hex/s132_nrf52_6.1.1_softdevice.hex --sectorerase&lt;br /&gt;
&lt;br /&gt;
4. Program the firmware (replace firmware.hex by the actual filename of the firmware):&lt;br /&gt;
&lt;br /&gt;
 nrfjprog -f NRF52 --program firmware.hex --sectorerase&lt;br /&gt;
&lt;br /&gt;
5. Reset and run the new firmware:&lt;br /&gt;
 &lt;br /&gt;
 nrfjprog -f NRF52 --reset&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Manual / Articles ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/najnesnaj/pinetime-zephyr Beginner manual explained how you to programs and install zephyr on PineTime Dev Kit, big thanks to najnesnaj :-)]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/swlh/sneak-peek-of-pinetime-smart-watch-and-why-its-perfect-for-teaching-iot-81b74161c159 Sneak Peek of PineTime Smart Watch… And why it’s perfect for teaching IoT]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/building-a-rust-driver-for-pinetimes-touch-controller-cbc1a5d5d3e9 Building a Rust Driver for PineTime’s Touch Controller]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/porting-druid-rust-widgets-to-pinetime-smart-watch-7e1d5a5d977a Porting (druid) Rust Widgets to PineTime Smart Watch]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/optimising-pinetimes-display-driver-with-rust-and-mynewt-3ba269ea2f5c Optimising PineTime’s Display Driver with Rust and Mynewt]&lt;br /&gt;
&lt;br /&gt;
* [https://www.zephyrproject.org/getting-started-with-zephyr-rtos-on-nordic-nrf52832-hackable/ Getting Started with Zephyr RTOS on Nordic nRF52832 hackaBLE]&lt;br /&gt;
&lt;br /&gt;
* [https://blog.aegrel.ee/absniffer-cmsis-dap-sniffer.html Removing the lock and installing another firmware on the nRF52832 using CMSIS-DAP dongle on Linux]&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/JF002/nrf52-baseproject/wiki/Build,-program-and-debug-NRF52-project-with-JLink,-CMake-and-CLion Build, program and debug NRF52 project with JLink, CMake and CLion]&lt;br /&gt;
&lt;br /&gt;
* [https://www.nrbtech.io/blog/2020/1/4/using-clion-for-nordic-nrf52-projects Using CLion for Nordic nRF52 projects]&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Frequently_asked_questions_about_the_PineTime Frequently asked questions about the dev kit]&lt;br /&gt;
&lt;br /&gt;
== Development efforts ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! FreeRTOS&lt;br /&gt;
|https://www.freertos.org&lt;br /&gt;
| https://sourceforge.net/projects/freertos/&lt;br /&gt;
| [https://github.com/JF002/Pinetime JF002/Pinetime]&lt;br /&gt;
[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Zephyr&lt;br /&gt;
| https://www.zephyrproject.org&lt;br /&gt;
| https://github.com/zephyrproject-rtos/zephyr&lt;br /&gt;
| [https://github.com/najnesnaj/pinetime-zephyr najnesnaj/pinetime-zephyr]&lt;br /&gt;
[https://github.com/SuperPrower/pinetime_zephyr_sample_fw SuperPrower/pinetime_zephyr_sample_fw]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! mynewt&lt;br /&gt;
| https://mynewt.apache.org/about/&lt;br /&gt;
| https://github.com/apache/mynewt-core&lt;br /&gt;
| [https://github.com/lupyuen/stm32bluepill-mynewt-sensor/tree/pinetime lupyuen/stm32bluepill-mynewt-sensor]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MbedOS&lt;br /&gt;
| https://os.mbed.com&lt;br /&gt;
| https://github.com/ARMmbed/mbed-os&lt;br /&gt;
| [https://github.com/sethitow/awesome-pinetime sethitow/mbed-pinetime]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! RIOT&lt;br /&gt;
| http://riot-os.org/&lt;br /&gt;
| https://github.com/RIOT-OS/RIOT/&lt;br /&gt;
| [https://github.com/bosmoment/PineTime-apps bosmoment/PineTime-apps]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! TinyGo&lt;br /&gt;
| https://tinygo.org&lt;br /&gt;
| https://github.com/tinygo-org/tinygo&lt;br /&gt;
| [https://github.com/aykevl/go-smartwatch aykevl/go-smartwatch]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets and Schematics ==&lt;br /&gt;
&lt;br /&gt;
=== Schematics ===&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Schematic-V1.0a-20191103.pdf PineTime Schematic ver1.0a]&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Port%20Assignment%20rev1.0.pdf PineTime GPIO Port Assignment ver1.0]&lt;br /&gt;
&lt;br /&gt;
=== Component Datasheets ===&lt;br /&gt;
* NORDIC SoC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/nRF52832%20product%20brief.pdf NORDIC nRF52832 Product Brief]&lt;br /&gt;
* PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGM40561.pdf SGMicro SGM40561 Single Cell Charger Datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGMICRO-SGM2036.pdf SGMicro SGM2036 3.3V Low Power Low Dropout RF Linear Regulator Datasheet]&lt;br /&gt;
* SPI Flash information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L6433F,%203V,%2064Mb,%20v1.6.pdf Macronix 64Mb(8MB) SPI NOR Flash]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L12835F,%203V,%20128Mb,%20v1.6.pdf Macronix 128Mb(16MB) SPI NOR Flash]&lt;br /&gt;
* LCD Panel:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20LCD%20Panel.jpg 1.3&amp;quot; 240x240 IPS LCD Panel Specification for PineTime]&lt;br /&gt;
** [https://wiki.pine64.org/images/5/54/ST7789V_v1.6.pdf 11.6&amp;quot; Sitronix LCD Driver/Controller Datasheet]&lt;br /&gt;
* Touchpad information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20Touch%20Panel.jpg Touchpad Specification for PineTimel]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/CST816S数据手册V1.1.pdf 11.6&amp;quot; Hynitron CST816S Capacitive Touch Controller Datasheet in Chinese]&lt;br /&gt;
*** [https://wiki.pine64.org/images/5/51/CST816S%E6%95%B0%E6%8D%AE%E6%89%8B%E5%86%8CV1.1.en.pdf English Translation]&lt;br /&gt;
* Sensor:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf BOSCH BMA421 Triaxial VAcceleration Sensor Product Brief]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/HRS3300%20Heart%20Rate%20Sensor.pdf TianYiHeXin HRS3300 PPG Heart Rate Sensor Data Sheet]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime&amp;diff=4541</id>
		<title>PineTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime&amp;diff=4541"/>
		<updated>2020-01-11T09:40:24Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Specifications ==&lt;br /&gt;
'''Dimensions:''' 37.5 x 40 x 11mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' 38 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''IP Rating:''' IP67 (waterproof to 1 meter) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 1.3 inches (33mm) diagonal&lt;br /&gt;
: '''Type:''' IPS capacitive touchscreen, RGB 65K colors&lt;br /&gt;
: '''Display Controller:''' ST7789&lt;br /&gt;
: '''Resolution:''' 240x240 pixels &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' Nordic Semiconductor nRF52832 &amp;lt;br&amp;gt;&lt;br /&gt;
'''Flash:''' 512KB with additional 4MB SPI NOR &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 64KB &amp;lt;br&amp;gt;&lt;br /&gt;
'''Bluetooth:''' 5.0 (including Bluetooth Low Energy) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sensors:''' Accelerometer, Heart rate sensor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Feedback:''' Vibration motor &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' 170-180mAh LiPo&lt;br /&gt;
&lt;br /&gt;
== SWD Pinout ==&lt;br /&gt;
The devkits have exposed SWD pins for flashing and debugging. The pinout is:&lt;br /&gt;
[[File:PineTime_SWD_location.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Driving the peripherals ==&lt;br /&gt;
&lt;br /&gt;
=== Display ===&lt;br /&gt;
&lt;br /&gt;
Note: The factory-default software on the PineTime does not auto-detect the display being disconnected when it has already booted. That can cause garbled output, to fix it just restart the PineTime.&lt;br /&gt;
&lt;br /&gt;
The display is driven using the ST7789 display controller. Use the following pins to drive the screen:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! PineTime pin&lt;br /&gt;
! ST7789 pin&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SCK (P0.02)&lt;br /&gt;
| SPI clock&lt;br /&gt;
|-&lt;br /&gt;
| LCD_SDI (P0.03)&lt;br /&gt;
| SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RS (P0.18)&lt;br /&gt;
| Clock/data pin (CD)&lt;br /&gt;
|-&lt;br /&gt;
| LCD_CS (P0.25)&lt;br /&gt;
| Chip select&lt;br /&gt;
|-&lt;br /&gt;
| LCD_RESET (P0.26)&lt;br /&gt;
| Display reset&lt;br /&gt;
|-&lt;br /&gt;
| LCD_BACKLIGHT_{LOW,MID,HIGH}&lt;br /&gt;
| Backlight (active low)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Chip select must be held low while driving the display. It must be high when using other SPI devices on the same bus (such as external flash storage) so that the display controller won't respond to the wrong commands.&lt;br /&gt;
* SPI must be used in mode 3. Mode 0 (the default) won't work.&lt;br /&gt;
* LCD_DISPLAY_* is used to enable the backlight. Set at least one to low to see anything on the screen.&lt;br /&gt;
* Use SPI at 8MHz (the fastest clock available on the nRF52832) because otherwise refreshing will be super slow.&lt;br /&gt;
&lt;br /&gt;
=== Battery ===&lt;br /&gt;
&lt;br /&gt;
Reading whether the PineTime has power attached is easy: simply read the charge indication pin (P0.12). When it is high it is running on battery, when it is low it is charging.&lt;br /&gt;
&lt;br /&gt;
Reading the battery voltage is a bit harder. For that you can use the battery voltage pin on P0.31 (AIN7). The returned value is 12 bits, which means it is 0..4095. You can get the measured voltage with the following formula, assuming a reference voltage of 3.3V (this is configurable in the ADC):&lt;br /&gt;
&lt;br /&gt;
 adcVoltage = adcValue / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
The measured voltage is actually half of the actual battery voltage, because the ADC is connected between a voltage divider where both resistors are 1MΩ. This can be corrected by multiplying the value:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2 / (4095 / 3.3)&lt;br /&gt;
&lt;br /&gt;
It's often better to avoid floating point values on embedded systems and in this case there is no reason to use float at all, we can just represent the value in millivolts. Therefore the formula can be simplified to:&lt;br /&gt;
&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / (4095 / 3.3)&lt;br /&gt;
 batteryVoltage = adcValue * 2000 / 1241&lt;br /&gt;
&lt;br /&gt;
Converting this voltage to an estimated capacity in percent requires a more complicated algorithm, because Lithium-ion batteries have a non-linear discharge curve.&lt;br /&gt;
&lt;br /&gt;
=== Touch panel ===&lt;br /&gt;
&lt;br /&gt;
The touch panel is controlled by a Hynitron CST816S chips. Unfortunately, there is not much information about this chip on the internet apart from the datasheet below and a [https://github.com/lupyuen/hynitron_i2c_cst0xxse/ reference driver]. This is enough to implement a basic driver, but crucial information needed to implement advanced functionalities are missing (I²C protocol and registers, timings, power modes,...).&lt;br /&gt;
&lt;br /&gt;
==== Pins ====&lt;br /&gt;
&lt;br /&gt;
* P0.10 : Reset&lt;br /&gt;
* P0.28 : Interrupt (signal to the CPU when a touch event is detected)&lt;br /&gt;
* P0.06 : I²C SDA&lt;br /&gt;
* P0.07 : I²C SCL&lt;br /&gt;
&lt;br /&gt;
==== I²C ====&lt;br /&gt;
&lt;br /&gt;
* Device address : 0x15&lt;br /&gt;
* Frequency : from 10Khz to 400Khz&lt;br /&gt;
&lt;br /&gt;
'''NOTE : ''' The controller go to sleep when no event is detected. In sleep mode, the controller does not communicate on the I²C bus (it appears disconnected). So, for the communication to work, you need to tap on the screen so that the chip wakes-up.&lt;br /&gt;
&lt;br /&gt;
==== Touch events ====&lt;br /&gt;
&lt;br /&gt;
Touch informations are available in the 63 first registers of the controller. Remember : the device is in sleep mode when no touch event is detected. It means that you can read the register only when the touch controller detected an event. You can use the ''Interrupt'' pin to detect such event in the software. &lt;br /&gt;
&lt;br /&gt;
These 63 bytes contain up to 10 touch point (X, Y, event type, pressure,...) : &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Byte&lt;br /&gt;
! Bit7&lt;br /&gt;
! Bit6&lt;br /&gt;
! Bit5&lt;br /&gt;
! Bit4&lt;br /&gt;
! Bit3&lt;br /&gt;
! Bit2&lt;br /&gt;
! Bit1&lt;br /&gt;
! Bit0&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|? &lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|? &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|? &lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Number of touch points &lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Event (0 = Down, 1 = Up, 2 = Contact)&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|X (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|X (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|?&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Touch ID&lt;br /&gt;
|colspan=&amp;quot;4&amp;quot;|Y (MSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Y (LSB) coordinate&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Pressure (?)&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|colspan=&amp;quot;8&amp;quot;|Miscellaneous (?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bytes 3 to 8 are repeated 10 times (10*6 + 3 = 63 bytes).&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
&lt;br /&gt;
* The touch controller seems to report only 1 touch point&lt;br /&gt;
* Fields X, Y, Number of touch points and touch ID are updated. The others are always 0.&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
&lt;br /&gt;
The reference driver specifies some registers and value, but there is no information about them: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!Register&lt;br /&gt;
!Address&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_INT_CNT&lt;br /&gt;
|0x8F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FLOW_WORK_CNT&lt;br /&gt;
|0x91&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_WORKMODE &lt;br /&gt;
|0x00&lt;br /&gt;
|0 = WORK, 0x40 = FACTORY&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID&lt;br /&gt;
|0xA3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHIP_ID2&lt;br /&gt;
|0x9F&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_POWER_MODE&lt;br /&gt;
|0xA5&lt;br /&gt;
|0x05 = SLEEP&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FW_VER&lt;br /&gt;
|0xA6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_VENDOR_ID&lt;br /&gt;
|0xA8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_LCD_BUSY_NUM&lt;br /&gt;
|0xAB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_FACE_DEC_MODE_EN&lt;br /&gt;
|0xB0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GLOVE_MODE_EN&lt;br /&gt;
|0xC0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_COVER_MODE_EN&lt;br /&gt;
|0xC1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_CHARGER_MODE_EN&lt;br /&gt;
|0x8B&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_EN&lt;br /&gt;
|0xD0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_GESTURE_OUTPUT_ADDRESS&lt;br /&gt;
|0xD3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HYN_REG_ESD_SATURATE 0xED&lt;br /&gt;
|0xED&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''WARNING : ''' Writing the SLEEP command (write 0x05 in HYN_REG_POWER_MODE) seems to freeze the controller (it returns only static values) until the battery is totally drained and the whole system reset. Analysis and debugging is more than welcome!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Programming firmware ==&lt;br /&gt;
&lt;br /&gt;
=== Using JLink programmer and nrfjprog tools ===&lt;br /&gt;
&lt;br /&gt;
The following steps have been tested with the Segger JLink embedded in the [https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK NRF52-DK development board].&lt;br /&gt;
&lt;br /&gt;
1. Connect the Pinetime SWD pins to the debugger (P20 on NRF52-DK)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Pintime&lt;br /&gt;
!JLink&lt;br /&gt;
|-&lt;br /&gt;
|GND&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|SWDCLK&lt;br /&gt;
|SWDCLK&lt;br /&gt;
|-&lt;br /&gt;
|SWDIO&lt;br /&gt;
|SWDIO&lt;br /&gt;
|-&lt;br /&gt;
|VCC (3.3V)&lt;br /&gt;
|VTG (target detect)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Unlock the device and erase the memory. '''You need to execute this step only once, to remove the read protection on the memory. Note that it will erase the whole flash memory of the MCU!''' :&lt;br /&gt;
 &lt;br /&gt;
 nrfjporg -f NRF52 --recover&lt;br /&gt;
&lt;br /&gt;
3. Program the BLE softdevice (if needed by the firmware). Replace PATH_TO_NRF_SDK by the path where you unzipped the [https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK NRF52 SDK] :&lt;br /&gt;
&lt;br /&gt;
 nrfjprog -f NRF52 --program /PATH_TO_NRF_SDK/components/softdevice/s132/hex/s132_nrf52_6.1.1_softdevice.hex --sectorerase&lt;br /&gt;
&lt;br /&gt;
4. Program the firmware (replace firmware.hex by the actual filename of the firmware):&lt;br /&gt;
&lt;br /&gt;
 nrfjprog -f NRF52 --program firmware.hex --sectorerase&lt;br /&gt;
&lt;br /&gt;
5. Reset and run the new firmware:&lt;br /&gt;
 &lt;br /&gt;
 nrfjprog -f NRF52 --reset&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Manual / Articles ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/najnesnaj/pinetime-zephyr Beginner manual explained how you to programs and install zephyr on PineTime Dev Kit, big thanks to najnesnaj :-)]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/swlh/sneak-peek-of-pinetime-smart-watch-and-why-its-perfect-for-teaching-iot-81b74161c159 Sneak Peek of PineTime Smart Watch… And why it’s perfect for teaching IoT]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/building-a-rust-driver-for-pinetimes-touch-controller-cbc1a5d5d3e9 Building a Rust Driver for PineTime’s Touch Controller]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/porting-druid-rust-widgets-to-pinetime-smart-watch-7e1d5a5d977a Porting (druid) Rust Widgets to PineTime Smart Watch]&lt;br /&gt;
&lt;br /&gt;
* [https://medium.com/@ly.lee/optimising-pinetimes-display-driver-with-rust-and-mynewt-3ba269ea2f5c Optimising PineTime’s Display Driver with Rust and Mynewt]&lt;br /&gt;
&lt;br /&gt;
* [https://www.zephyrproject.org/getting-started-with-zephyr-rtos-on-nordic-nrf52832-hackable/ Getting Started with Zephyr RTOS on Nordic nRF52832 hackaBLE]&lt;br /&gt;
&lt;br /&gt;
* [https://blog.aegrel.ee/absniffer-cmsis-dap-sniffer.html Removing the lock and installing another firmware on the nRF52832 using CMSIS-DAP dongle on Linux]&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/JF002/nrf52-baseproject/wiki/Build,-program-and-debug-NRF52-project-with-JLink,-CMake-and-CLion Build, program and debug NRF52 project with JLink, CMake and CLion]&lt;br /&gt;
&lt;br /&gt;
* [https://www.nrbtech.io/blog/2020/1/4/using-clion-for-nordic-nrf52-projects Using CLion for Nordic nRF52 projects]&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.pine64.org/index.php/Frequently_asked_questions_about_the_PineTime Frequently asked questions about the dev kit&lt;br /&gt;
&lt;br /&gt;
== Development efforts ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Project Homepage&lt;br /&gt;
! Project Source&lt;br /&gt;
! PineTime Implementations&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! FreeRTOS&lt;br /&gt;
|https://www.freertos.org&lt;br /&gt;
| https://sourceforge.net/projects/freertos/&lt;br /&gt;
| [https://github.com/JF002/Pinetime JF002/Pinetime]&lt;br /&gt;
[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Zephyr&lt;br /&gt;
| https://www.zephyrproject.org&lt;br /&gt;
| https://github.com/zephyrproject-rtos/zephyr&lt;br /&gt;
| [https://github.com/najnesnaj/pinetime-zephyr najnesnaj/pinetime-zephyr]&lt;br /&gt;
[https://github.com/SuperPrower/pinetime_zephyr_sample_fw SuperPrower/pinetime_zephyr_sample_fw]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! mynewt&lt;br /&gt;
| https://mynewt.apache.org/about/&lt;br /&gt;
| https://github.com/apache/mynewt-core&lt;br /&gt;
| [https://github.com/lupyuen/stm32bluepill-mynewt-sensor/tree/pinetime lupyuen/stm32bluepill-mynewt-sensor]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! MbedOS&lt;br /&gt;
| https://os.mbed.com&lt;br /&gt;
| https://github.com/ARMmbed/mbed-os&lt;br /&gt;
| [https://github.com/sethitow/awesome-pinetime sethitow/mbed-pinetime]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! RIOT&lt;br /&gt;
| http://riot-os.org/&lt;br /&gt;
| https://github.com/RIOT-OS/RIOT/&lt;br /&gt;
| [https://github.com/bosmoment/PineTime-apps bosmoment/PineTime-apps]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! TinyGo&lt;br /&gt;
| https://tinygo.org&lt;br /&gt;
| https://github.com/tinygo-org/tinygo&lt;br /&gt;
| [https://github.com/aykevl/go-smartwatch aykevl/go-smartwatch]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets and Schematics ==&lt;br /&gt;
&lt;br /&gt;
=== Schematics ===&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Schematic-V1.0a-20191103.pdf PineTime Schematic ver1.0a]&lt;br /&gt;
* [http://files.pine64.org/doc/PineTime/PineTime%20Port%20Assignment%20rev1.0.pdf PineTime GPIO Port Assignment ver1.0]&lt;br /&gt;
&lt;br /&gt;
=== Component Datasheets ===&lt;br /&gt;
* NORDIC SoC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/nRF52832%20product%20brief.pdf NORDIC nRF52832 Product Brief]&lt;br /&gt;
* PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGM40561.pdf SGMicro SGM40561 Single Cell Charger Datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/SGMICRO-SGM2036.pdf SGMicro SGM2036 3.3V Low Power Low Dropout RF Linear Regulator Datasheet]&lt;br /&gt;
* SPI Flash information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L6433F,%203V,%2064Mb,%20v1.6.pdf Macronix 64Mb(8MB) SPI NOR Flash]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L12835F,%203V,%20128Mb,%20v1.6.pdf Macronix 128Mb(16MB) SPI NOR Flash]&lt;br /&gt;
* LCD Panel:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20LCD%20Panel.jpg 1.3&amp;quot; 240x240 IPS LCD Panel Specification for PineTime]&lt;br /&gt;
** [https://wiki.pine64.org/images/5/54/ST7789V_v1.6.pdf 11.6&amp;quot; Sitronix LCD Driver/Controller Datasheet]&lt;br /&gt;
* Touchpad information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20Touch%20Panel.jpg Touchpad Specification for PineTimel]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/CST816S数据手册V1.1.pdf 11.6&amp;quot; Hynitron CST816S Capacitive Touch Controller Datasheet in Chinese]&lt;br /&gt;
*** [https://wiki.pine64.org/images/5/51/CST816S%E6%95%B0%E6%8D%AE%E6%89%8B%E5%86%8CV1.1.en.pdf English Translation]&lt;br /&gt;
* Sensor:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf BOSCH BMA421 Triaxial VAcceleration Sensor Product Brief]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinetime/HRS3300%20Heart%20Rate%20Sensor.pdf TianYiHeXin HRS3300 PPG Heart Rate Sensor Data Sheet]&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4507</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4507"/>
		<updated>2020-01-08T17:25:54Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Does the PineTime run Linux?'''&lt;br /&gt;
&lt;br /&gt;
No. Please read this forum article for information about Linux on PineTime: https://forum.pine64.org/showthread.php?tid=8112&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How long does it take to ship my PineTime?'''&lt;br /&gt;
&lt;br /&gt;
That depends on whether you chose for Standard or Express shipping. Standard shipping for the dev kit may take up to a few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''My PineTime arrived, now what?'''&lt;br /&gt;
&lt;br /&gt;
You should start by testing out all the features of the watch, to make sure everything works. You can do this using the software that was preinstalled on your device. Then you should solder some wires to the exposed SWD pins of the PineTime, so you can interact with it. Then you can use those wires to remove flash protection. Then, finally, you can start flashing code to the device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How do I remove flash protection?'''&lt;br /&gt;
&lt;br /&gt;
Lup Yuen Lee wrote a useful guide on how to do this using a Raspberry Pi: https://medium.com/@ly.lee/coding-nrf52-with-rust-and-apache-mynewt-on-visual-studio-code-9521bcba6004 . Scroll down to &amp;quot;Advanced Topic: Remove nRF52 Flash Protection With Raspberry Pi&amp;quot; and follow those instructions. You can also remove flash protection using a J-Link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What's the OS that's preinstalled on the PineTime by default?'''&lt;br /&gt;
&lt;br /&gt;
The watch, and its preinstalled OS, is built by a friend of TL. The software is proprietary and not made by Pine64 or its community. It can interact with the &amp;quot;Da Fit&amp;quot; app on Android. The dev kit contains this OS (and as a result, the flash protection) so that developers can test if all the hardware on their device is working correctly before they flash the device and start working on their own software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Can we use this OS or its source code?'''&lt;br /&gt;
&lt;br /&gt;
While it's not what the dev kit is for, you are of course free to use the watch with its preinstalled software as is. The preinstalled OS is proprietary, and its owner will not release the source code, so we cannot use this OS as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Why is the back exposed? Is it supposed to snap on?'''&lt;br /&gt;
&lt;br /&gt;
The back cover of the PineTime dev kit is exposed so that you can flash and debug the device with the SWD pins. The main unit and cover does not snap (lock) together. If you want to attach the back cover anyway, you can use glue or tape.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What hardware should I use to flash code to the PineTime?'''&lt;br /&gt;
&lt;br /&gt;
There are several ways you can do this. A common way is to use a J-Link. These can remove flash protection as well, so you won't need a Raspberry Pi to start working on the PineTime. A cheap option for this is the J-Link EDU: https://www.segger.com/products/debug-probes/j-link/models/j-link-edu/&lt;br /&gt;
&lt;br /&gt;
Another option is to remove flash protection using the Raspberry Pi, after which you can use a ST-Link V2 clone to flash your code to the PineTime. If you already own a Raspberry Pi, this is the cheapest option to get started. Search for &amp;quot;ST-Link V2&amp;quot; on Aliexpress or Amazon to buy one of these.&lt;br /&gt;
&lt;br /&gt;
Finally, you can use an STM32F103 &amp;quot;Blue Pill&amp;quot; with BMP (Black Magic Probe). Here's a nice guide for that: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/flashing-and-debugging-nrf5152-with-a-cheap-blackm?CommentId=ebf8cdc0-5f5c-45bb-933a-d282481029fa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''I have experience developing on Arduino. How does the PineTime compare?'''&lt;br /&gt;
&lt;br /&gt;
Arduino provides the Arduino IDE (or you use the avr-gcc and avrdude command-line tools) which you can use to compile and upload code to an Arduino Board. The PineTime and its ARM processor doesn't have this, so you'll have to familiarize yourself with tools like GCC for AVR, and OpenOCD. Some experience with Arduino does translate over to the PineTime, especially if you've worked with LCD's, or SPI. The PineTime is four times faster than an Arduino Uno, has 32 times more RAM and 16 times more Flash storage.&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4506</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4506"/>
		<updated>2020-01-08T17:22:36Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Does the PineTime run Linux?'''&lt;br /&gt;
&lt;br /&gt;
No. Please read this forum article for information about Linux on PineTime: https://forum.pine64.org/showthread.php?tid=8112&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How long does it take to ship my PineTime?'''&lt;br /&gt;
&lt;br /&gt;
That depends on whether you chose for Standard or Express shipping. Standard shipping for the dev kit may take up to a few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''My PineTime arrived, now what?'''&lt;br /&gt;
&lt;br /&gt;
You should start by testing out all the features of the watch, to make sure everything works. You can do this using the software that was preinstalled on your device. Then you should solder some wires to the exposed SWD pins of the PineTime, so you can interact with it. Then you can use those wires to remove flash protection. Then, finally, you can start flashing code to the device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How do I remove flash protection?'''&lt;br /&gt;
&lt;br /&gt;
Lup Yuen Lee wrote a useful guide on how to do this using a Raspberry Pi: https://medium.com/@ly.lee/coding-nrf52-with-rust-and-apache-mynewt-on-visual-studio-code-9521bcba6004 . Scroll down to &amp;quot;Advanced Topic: Remove nRF52 Flash Protection With Raspberry Pi&amp;quot; and follow those instructions. You can also remove flash protection using a J-Link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What's the OS that's preinstalled on the PineTime by default?'''&lt;br /&gt;
&lt;br /&gt;
The watch, and its preinstalled OS, is built by a friend of TL. The software is proprietary and not made by Pine64 or its community. It can interact with the &amp;quot;Da Fit&amp;quot; app on Android. The dev kit contains this OS (and as a result, the flash protection) so that developers can test if all the hardware on their device is working correctly before they flash the device and start working on their own software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Can we use this OS or its source code?'''&lt;br /&gt;
&lt;br /&gt;
While it's not what the dev kit is for, you are of course free to use the watch with its preinstalled software as is. The preinstalled OS is proprietary, and its owner will not release the source code, so we cannot use this OS as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Why is the back exposed? Is it supposed to snap on?'''&lt;br /&gt;
&lt;br /&gt;
The back cover of the PineTime dev kit is exposed so that you can flash and debug the device with the SWD pins. The main unit and cover does not snap (lock) together. If you want to attach the back cover anyway, you can use glue or tape.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What hardware should I use to flash code to the PineTime?'''&lt;br /&gt;
&lt;br /&gt;
There are several ways you can do this. A common way is to use a J-Link. These can remove flash protection as well, so you won't need a Raspberry Pi to start working on the PineTime. A cheap option for this is the J-Link EDU: https://www.segger.com/products/debug-probes/j-link/models/j-link-edu/&lt;br /&gt;
&lt;br /&gt;
Another option is to remove flash protection using the Raspberry Pi, after which you can use a ST-Link V2 clone to flash your code to the PineTime. If you already own a Raspberry Pi, this is the cheapest option to get started. Search for &amp;quot;ST-Link V2&amp;quot; on Aliexpress or Amazon to buy one of these.&lt;br /&gt;
&lt;br /&gt;
Finally, you can use an STM32F103 &amp;quot;Blue Pill&amp;quot; with BMP (Black Magic Probe). Here's a nice guide for that: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/flashing-and-debugging-nrf5152-with-a-cheap-blackm?CommentId=ebf8cdc0-5f5c-45bb-933a-d282481029fa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''I have experience developing on Arduino. How does the PineTime compare?'''&lt;br /&gt;
&lt;br /&gt;
Arduino provides the Arduino IDE (or you use the avr-gcc and avrdude command-line tools) which you can use to compile and upload code to an Arduino Board. The PineTime and its ARM processor doesn't have this, so you'll have to familiarize yourself with tools like GCC for AVR, and OpenOCD. Some experience with Arduino does translate over to the PineTime, especially if you've worked with LCD's, or SPI. The PineTime is four times faster than an Arduino Uno, has 32 times more RAM and 140 times more Flash storage.&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4505</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4505"/>
		<updated>2020-01-08T17:04:31Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Does the PineTime run Linux?'''&lt;br /&gt;
&lt;br /&gt;
Please read this forum article for information about Linux on PineTime: https://forum.pine64.org/showthread.php?tid=8112&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How long does it take to ship my PineTime?'''&lt;br /&gt;
&lt;br /&gt;
That depends on whether you chose for Standard or Express shipping. Standard shipping for the dev kit may take up to a few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''My PineTime arrived, now what?'''&lt;br /&gt;
&lt;br /&gt;
You should start by testing out all the features of the watch, to make sure everything works. You can do this using the software that was preinstalled on your device. Then you should solder some wires to the exposed SWD pins of the PineTime, so you can interact with it. Then you can use those wires to remove flash protection. Then, finally, you can start flashing code to the device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How do I remove flash protection?'''&lt;br /&gt;
&lt;br /&gt;
Lup Yuen Lee wrote a useful guide on how to do this using a Raspberry Pi: https://medium.com/@ly.lee/coding-nrf52-with-rust-and-apache-mynewt-on-visual-studio-code-9521bcba6004 . Scroll down to &amp;quot;Advanced Topic: Remove nRF52 Flash Protection With Raspberry Pi&amp;quot; and follow those instructions. You can also remove flash protection using a J-Link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What's the OS that's preinstalled on the PineTime by default?'''&lt;br /&gt;
&lt;br /&gt;
The watch, and its preinstalled OS, is built by a friend of TL. The software is proprietary and not made by Pine64 or its community. It can interact with the &amp;quot;Da Fit&amp;quot; app on Android. The dev kit contains this OS (and as a result, the flash protection) so that developers can test if all the hardware on their device is working correctly before they flash the device and start working on their own software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Can we use this OS or its source code?'''&lt;br /&gt;
&lt;br /&gt;
While it's not what the dev kit is for, you are of course free to use the watch with its preinstalled software as is. The preinstalled OS is proprietary, and its owner will not release the source code, so we cannot use this OS as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Why is the back exposed? Is it supposed to snap on?'''&lt;br /&gt;
&lt;br /&gt;
The back cover of the PineTime dev kit is exposed so that you can flash and debug the device with the SWD pins. The main unit and cover does not snap (lock) together. If you want to attach the back cover anyway, you can use glue or tape.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What hardware should I use to flash code to the PineTime?'''&lt;br /&gt;
&lt;br /&gt;
There are several ways you can do this. A common way is to use a J-Link. These can remove flash protection as well, so you won't need a Raspberry Pi to start working on the PineTime. A cheap option for this is the J-Link EDU: https://www.segger.com/products/debug-probes/j-link/models/j-link-edu/&lt;br /&gt;
&lt;br /&gt;
Another option is to remove flash protection using the Raspberry Pi, after which you can use a ST-Link V2 clone to flash your code to the PineTime. If you already own a Raspberry Pi, this is the cheapest option to get started. Search for &amp;quot;ST-Link V2&amp;quot; on Aliexpress or Amazon to buy one of these.&lt;br /&gt;
&lt;br /&gt;
Finally, you can use an STM32F103 &amp;quot;Blue Pill&amp;quot; with BMP (Black Magic Probe). Here's a nice guide for that: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/flashing-and-debugging-nrf5152-with-a-cheap-blackm?CommentId=ebf8cdc0-5f5c-45bb-933a-d282481029fa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''I have experience developing on Arduino. How does the PineTime compare?'''&lt;br /&gt;
&lt;br /&gt;
Arduino provides the Arduino IDE (or you use the avr-gcc and avrdude command-line tools) which you can use to compile and upload code to an Arduino Board. The PineTime and its ARM processor doesn't have this, so you'll have to familiarize yourself with tools like GCC for AVR, and OpenOCD. Some experience with Arduino does translate over to the PineTime, especially if you've worked with LCD's, or SPI. The PineTime is four times faster than an Arduino Uno, has 32 times more RAM and 140 times more Flash storage.&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4504</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4504"/>
		<updated>2020-01-08T16:58:38Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Does the PineTime run Linux?'''&lt;br /&gt;
&lt;br /&gt;
Please read this forum article for information about Linux on PineTime: https://forum.pine64.org/showthread.php?tid=8112&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How long does it take to ship my PineTime?'''&lt;br /&gt;
&lt;br /&gt;
That depends on whether you chose for Standard or Express shipping. Standard shipping for the dev kit may take up to a few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''My PineTime arrived, now what?'''&lt;br /&gt;
&lt;br /&gt;
You should start by testing out all the features of the watch, to make sure everything works. You can do this using the software that was preinstalled on your device. Then you should solder some wires to the exposed SWD pins of the PineTime, so you can interact with it. Then you can use those wires to remove flash protection. Then, finally, you can start flashing code to the device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How do I remove flash protection?'''&lt;br /&gt;
&lt;br /&gt;
Lup Yuen Lee wrote a useful guide on how to do this using a Raspberry Pi: https://medium.com/@ly.lee/coding-nrf52-with-rust-and-apache-mynewt-on-visual-studio-code-9521bcba6004 . Scroll down to &amp;quot;Advanced Topic: Remove nRF52 Flash Protection With Raspberry Pi&amp;quot; and follow those instructions. You can also remove flash protection using a J-Link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What's the OS that's preinstalled on the PineTime by default?'''&lt;br /&gt;
&lt;br /&gt;
The watch, and its preinstalled OS, is built by a friend of TL. The software is proprietary and not made by Pine64 or its community. It can interact with the &amp;quot;Da Fit&amp;quot; app on Android. The dev kit contains this OS (and as a result, the flash protection) so that developers can test if all the hardware on their device is working correctly before they flash the device and start working on their own software.&lt;br /&gt;
&lt;br /&gt;
Can we use this OS or its source code?&lt;br /&gt;
While it's not what the dev kit is for, you are of course free to use the watch with its preinstalled software as is. The preinstalled OS is proprietary, and its owner will not release the source code, so we cannot use this OS as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Why is the back exposed? Is it supposed to snap on?'''&lt;br /&gt;
&lt;br /&gt;
The back cover of the PineTime dev kit is exposed so that you can flash and debug the device with the SWD pins. The main unit and cover does not snap (lock) together. If you want to attach the back cover anyway, you can use glue or tape.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What hardware should I use to flash code to the PineTime?'''&lt;br /&gt;
&lt;br /&gt;
There are several ways you can do this. A common way is to use a J-Link. These can remove flash protection as well, so you won't need a Raspberry Pi to start working on the PineTime. A cheap option for this is the J-Link EDU: https://www.segger.com/products/debug-probes/j-link/models/j-link-edu/&lt;br /&gt;
&lt;br /&gt;
Another option is to remove flash protection using the Raspberry Pi, after which you can use a ST-Link V2 clone to flash your code to the PineTime. If you already own a Raspberry Pi, this is the cheapest option to get started. Search for &amp;quot;ST-Link V2&amp;quot; on Aliexpress or Amazon to buy one of these.&lt;br /&gt;
&lt;br /&gt;
Finally, you can use an STM32F103 &amp;quot;Blue Pill&amp;quot; with BMP (Black Magic Probe). Here's a nice guide for that: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/flashing-and-debugging-nrf5152-with-a-cheap-blackm?CommentId=ebf8cdc0-5f5c-45bb-933a-d282481029fa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''I have experience developing on Arduino. How does the PineTime compare?'''&lt;br /&gt;
&lt;br /&gt;
Arduino provides the Arduino IDE (or you use the avr-gcc and avrdude command-line tools) which you can use to compile and upload code to an Arduino Board. The PineTime and its ARM processor doesn't have this, so you'll have to familiarize yourself with tools like GCC for AVR, and OpenOCD. Some experience with Arduino does translate over to the PineTime, especially if you've worked with LCD's, or SPI. The PineTime is four times faster than an Arduino Uno, has 32 times more RAM and 140 times more Flash storage.&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4502</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4502"/>
		<updated>2020-01-08T16:56:37Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Arteeh moved page PineTime-FAQ to Frequently asked questions about the PineTime&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Does the PineTime run Linux?'''&lt;br /&gt;
&lt;br /&gt;
Please read this forum article for information about Linux on PineTime: https://forum.pine64.org/showthread.php?tid=8112&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How long does it take to ship my PineTime?'''&lt;br /&gt;
&lt;br /&gt;
That depends on whether you chose for Standard or Express shipping. Standard shipping for the dev kit may take up to a few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''My PineTime arrived, now what?'''&lt;br /&gt;
&lt;br /&gt;
You should start by testing out all the features of the watch, to make sure everything works. You can do this using the software that was preinstalled on your device. Then you should solder some wires to the exposed SWD pins of the PineTime, so you can interact with it. Then you can use those wires to remove flash protection. Then, finally, you can start flashing code to the device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How do I remove flash protection?'''&lt;br /&gt;
&lt;br /&gt;
Lup Yuen Lee wrote a useful guide on how to do this using a Raspberry Pi: https://medium.com/@ly.lee/coding-nrf52-with-rust-and-apache-mynewt-on-visual-studio-code-9521bcba6004 . Scroll down to &amp;quot;Advanced Topic: Remove nRF52 Flash Protection With Raspberry Pi&amp;quot; and follow those instructions. You can also remove flash protection using a J-Link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What's the OS that's preinstalled on the PineTime by default?'''&lt;br /&gt;
&lt;br /&gt;
The watch, and its preinstalled OS, is built by a friend of TL. The software is proprietary and not made by Pine64 or its community. It can interact with the &amp;quot;Da Fit&amp;quot; app on Android. The dev kit contains this OS (and as a result, the flash protection) so that developers can test if all the hardware on their device is working correctly before they flash the device and start working on their own software.&lt;br /&gt;
&lt;br /&gt;
Can we use this OS or its source code?&lt;br /&gt;
While it's not what the dev kit is for, you are of course free to use the watch with its preinstalled software as is. The preinstalled OS is proprietary, and its owner will not release the source code, so we cannot use this OS as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What hardware should I use to flash code to the PineTime?'''&lt;br /&gt;
&lt;br /&gt;
There are several ways you can do this. A common way is to use a J-Link. These can remove flash protection as well, so you won't need a Raspberry Pi to start working on the PineTime. A cheap option for this is the J-Link EDU: https://www.segger.com/products/debug-probes/j-link/models/j-link-edu/&lt;br /&gt;
&lt;br /&gt;
Another option is to remove flash protection using the Raspberry Pi, after which you can use a ST-Link V2 clone to flash your code to the PineTime. If you already own a Raspberry Pi, this is the cheapest option to get started. Search for &amp;quot;ST-Link V2&amp;quot; on Aliexpress or Amazon to buy one of these.&lt;br /&gt;
&lt;br /&gt;
Finally, you can use an STM32F103 &amp;quot;Blue Pill&amp;quot; with BMP (Black Magic Probe). Here's a nice guide for that: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/flashing-and-debugging-nrf5152-with-a-cheap-blackm?CommentId=ebf8cdc0-5f5c-45bb-933a-d282481029fa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''I have experience developing on Arduino. How does the PineTime compare?'''&lt;br /&gt;
&lt;br /&gt;
Arduino provides the Arduino IDE (or you use the avr-gcc and avrdude command-line tools) which you can use to compile and upload code to an Arduino Board. The PineTime and its ARM processor doesn't have this, so you'll have to familiarize yourself with tools like GCC for AVR, and OpenOCD. Some experience with Arduino does translate over to the PineTime, especially if you've worked with LCD's, or SPI. The PineTime is four times faster than an Arduino Uno, has 32 times more RAM and 140 times more Flash storage.&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4501</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4501"/>
		<updated>2020-01-08T16:56:20Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Does the PineTime run Linux?'''&lt;br /&gt;
&lt;br /&gt;
Please read this forum article for information about Linux on PineTime: https://forum.pine64.org/showthread.php?tid=8112&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How long does it take to ship my PineTime?'''&lt;br /&gt;
&lt;br /&gt;
That depends on whether you chose for Standard or Express shipping. Standard shipping for the dev kit may take up to a few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''My PineTime arrived, now what?'''&lt;br /&gt;
&lt;br /&gt;
You should start by testing out all the features of the watch, to make sure everything works. You can do this using the software that was preinstalled on your device. Then you should solder some wires to the exposed SWD pins of the PineTime, so you can interact with it. Then you can use those wires to remove flash protection. Then, finally, you can start flashing code to the device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How do I remove flash protection?'''&lt;br /&gt;
&lt;br /&gt;
Lup Yuen Lee wrote a useful guide on how to do this using a Raspberry Pi: https://medium.com/@ly.lee/coding-nrf52-with-rust-and-apache-mynewt-on-visual-studio-code-9521bcba6004 . Scroll down to &amp;quot;Advanced Topic: Remove nRF52 Flash Protection With Raspberry Pi&amp;quot; and follow those instructions. You can also remove flash protection using a J-Link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What's the OS that's preinstalled on the PineTime by default?'''&lt;br /&gt;
&lt;br /&gt;
The watch, and its preinstalled OS, is built by a friend of TL. The software is proprietary and not made by Pine64 or its community. It can interact with the &amp;quot;Da Fit&amp;quot; app on Android. The dev kit contains this OS (and as a result, the flash protection) so that developers can test if all the hardware on their device is working correctly before they flash the device and start working on their own software.&lt;br /&gt;
&lt;br /&gt;
Can we use this OS or its source code?&lt;br /&gt;
While it's not what the dev kit is for, you are of course free to use the watch with its preinstalled software as is. The preinstalled OS is proprietary, and its owner will not release the source code, so we cannot use this OS as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What hardware should I use to flash code to the PineTime?'''&lt;br /&gt;
&lt;br /&gt;
There are several ways you can do this. A common way is to use a J-Link. These can remove flash protection as well, so you won't need a Raspberry Pi to start working on the PineTime. A cheap option for this is the J-Link EDU: https://www.segger.com/products/debug-probes/j-link/models/j-link-edu/&lt;br /&gt;
&lt;br /&gt;
Another option is to remove flash protection using the Raspberry Pi, after which you can use a ST-Link V2 clone to flash your code to the PineTime. If you already own a Raspberry Pi, this is the cheapest option to get started. Search for &amp;quot;ST-Link V2&amp;quot; on Aliexpress or Amazon to buy one of these.&lt;br /&gt;
&lt;br /&gt;
Finally, you can use an STM32F103 &amp;quot;Blue Pill&amp;quot; with BMP (Black Magic Probe). Here's a nice guide for that: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/flashing-and-debugging-nrf5152-with-a-cheap-blackm?CommentId=ebf8cdc0-5f5c-45bb-933a-d282481029fa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''I have experience developing on Arduino. How does the PineTime compare?'''&lt;br /&gt;
&lt;br /&gt;
Arduino provides the Arduino IDE (or you use the avr-gcc and avrdude command-line tools) which you can use to compile and upload code to an Arduino Board. The PineTime and its ARM processor doesn't have this, so you'll have to familiarize yourself with tools like GCC for AVR, and OpenOCD. Some experience with Arduino does translate over to the PineTime, especially if you've worked with LCD's, or SPI. The PineTime is four times faster than an Arduino Uno, has 32 times more RAM and 140 times more Flash storage.&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4500</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4500"/>
		<updated>2020-01-08T16:55:29Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4499</id>
		<title>PineTime FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_FAQ&amp;diff=4499"/>
		<updated>2020-01-08T16:53:36Z</updated>

		<summary type="html">&lt;p&gt;Arteeh: Created page with &amp;quot; == Frequently Asked Questions for the PineTime ==    '''Does the PineTime run Linux?'''  Please read this forum article for information about Linux on PineTime: https://forum...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Frequently Asked Questions for the PineTime ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Does the PineTime run Linux?'''&lt;br /&gt;
&lt;br /&gt;
Please read this forum article for information about Linux on PineTime: https://forum.pine64.org/showthread.php?tid=8112&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How long does it take to ship my PineTime?'''&lt;br /&gt;
&lt;br /&gt;
That depends on whether you chose for Standard or Express shipping. Standard shipping for the dev kit may take up to a few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''My PineTime arrived, now what?'''&lt;br /&gt;
&lt;br /&gt;
You should start by testing out all the features of the watch, to make sure everything works. You can do this using the software that was preinstalled on your device. Then you should solder some wires to the exposed SWD pins of the PineTime, so you can interact with it. Then you can use those wires to remove flash protection. Then, finally, you can start flashing code to the device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How do I remove flash protection?'''&lt;br /&gt;
&lt;br /&gt;
Lup Yuen Lee wrote a useful guide on how to do this using a Raspberry Pi: https://medium.com/@ly.lee/coding-nrf52-with-rust-and-apache-mynewt-on-visual-studio-code-9521bcba6004 . Scroll down to &amp;quot;Advanced Topic: Remove nRF52 Flash Protection With Raspberry Pi&amp;quot; and follow those instructions. You can also remove flash protection using a J-Link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What's the OS that's preinstalled on the PineTime by default?'''&lt;br /&gt;
&lt;br /&gt;
The watch, and its preinstalled OS, is built by a friend of TL. The software is proprietary and not made by Pine64 or its community. It can interact with the &amp;quot;Da Fit&amp;quot; app on Android. The dev kit contains this OS (and as a result, the flash protection) so that developers can test if all the hardware on their device is working correctly before they flash the device and start working on their own software.&lt;br /&gt;
&lt;br /&gt;
Can we use this OS or its source code?&lt;br /&gt;
While it's not what the dev kit is for, you are of course free to use the watch with its preinstalled software as is. The preinstalled OS is proprietary, and its owner will not release the source code, so we cannot use this OS as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What hardware should I use to flash code to the PineTime?'''&lt;br /&gt;
&lt;br /&gt;
There are several ways you can do this. A common way is to use a J-Link. These can remove flash protection as well, so you won't need a Raspberry Pi to start working on the PineTime. A cheap option for this is the J-Link EDU: https://www.segger.com/products/debug-probes/j-link/models/j-link-edu/&lt;br /&gt;
&lt;br /&gt;
Another option is to remove flash protection using the Raspberry Pi, after which you can use a ST-Link V2 clone to flash your code to the PineTime. If you already own a Raspberry Pi, this is the cheapest option to get started. Search for &amp;quot;ST-Link V2&amp;quot; on Aliexpress or Amazon to buy one of these.&lt;br /&gt;
&lt;br /&gt;
Finally, you can use an STM32F103 &amp;quot;Blue Pill&amp;quot; with BMP (Black Magic Probe). Here's a nice guide for that: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/flashing-and-debugging-nrf5152-with-a-cheap-blackm?CommentId=ebf8cdc0-5f5c-45bb-933a-d282481029fa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''I have experience developing on Arduino. How does the PineTime compare?'''&lt;br /&gt;
&lt;br /&gt;
Arduino provides the Arduino IDE (or you use the avr-gcc and avrdude command-line tools) which you can use to compile and upload code to an Arduino Board. The PineTime and its ARM processor doesn't have this, so you'll have to familiarize yourself with tools like GCC for AVR, and OpenOCD. Some experience with Arduino does translate over to the PineTime, especially if you've worked with LCD's, or SPI. The PineTime is four times faster than an Arduino Uno, has 32 times more RAM and 140 times more Flash storage.&lt;/div&gt;</summary>
		<author><name>Arteeh</name></author>
	</entry>
</feed>