<?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=Atc1441</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=Atc1441"/>
	<link rel="alternate" type="text/html" href="https://wiki.pine64.org/wiki/Special:Contributions/Atc1441"/>
	<updated>2026-04-16T08:32:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_Development&amp;diff=10824</id>
		<title>PineTime Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_Development&amp;diff=10824"/>
		<updated>2021-06-23T05:13:47Z</updated>

		<summary type="html">&lt;p&gt;Atc1441: /* Available firmware and projects */&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;
{| 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/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;
! 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;
|}&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>Atc1441</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime&amp;diff=5937</id>
		<title>PineTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime&amp;diff=5937"/>
		<updated>2020-06-17T05:18:31Z</updated>

		<summary type="html">&lt;p&gt;Atc1441: Added ATCwatch Firmware and DaFlasher Video 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;
&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.&lt;br /&gt;
&lt;br /&gt;
Only a few devs have soldered to these pins, most just use friction to make contact with the programming cable.&lt;br /&gt;
&lt;br /&gt;
The pinout is:  &lt;br /&gt;
&lt;br /&gt;
&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;
'''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;
== 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;
|&lt;br /&gt;
{|&lt;br /&gt;
|[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;
! 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;
|-&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;
! 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;
== 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://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>Atc1441</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime&amp;diff=5936</id>
		<title>PineTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime&amp;diff=5936"/>
		<updated>2020-06-17T05:16:35Z</updated>

		<summary type="html">&lt;p&gt;Atc1441: Added ATCwatch Firmware and DaFlasher&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;
&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.&lt;br /&gt;
&lt;br /&gt;
Only a few devs have soldered to these pins, most just use friction to make contact with the programming cable.&lt;br /&gt;
&lt;br /&gt;
The pinout is:  &lt;br /&gt;
&lt;br /&gt;
&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;
'''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;
== 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;
|&lt;br /&gt;
{|&lt;br /&gt;
|[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;
! 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;
|-&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;
! Arduino&lt;br /&gt;
| &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;
| &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;
== 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://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>Atc1441</name></author>
	</entry>
</feed>