<?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=Aw</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=Aw"/>
	<link rel="alternate" type="text/html" href="https://wiki.pine64.org/wiki/Special:Contributions/Aw"/>
	<updated>2026-04-21T05:47:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_Devkit_Wiring&amp;diff=11449</id>
		<title>PineTime Devkit Wiring</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_Devkit_Wiring&amp;diff=11449"/>
		<updated>2021-09-18T12:21:45Z</updated>

		<summary type="html">&lt;p&gt;Aw: Keep a common ground between SWD debugger and the watch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will help you get up to scratch about how to connect your PineTime to your hardware debugger and what to keep in mind.&lt;br /&gt;
&lt;br /&gt;
The devkit comes with a set of wires you can use for connecting your programmer to the SWD pins. Most people use friction to make contact with the programming cable. Soldering the wires to the pinetime is not recommended, especially if you don't have a temperature-controlled iron and good confidence that you can do it - the thin PCB is fragile and easy to break. &lt;br /&gt;
&lt;br /&gt;
Current amount of '''dead PineTimes''' (or ruined bundled programming connectors) due to attempted soldering is '''4''' (update this number when suitable). &lt;br /&gt;
&lt;br /&gt;
''' Read this about the battery: '''&lt;br /&gt;
&lt;br /&gt;
You have three choices:&lt;br /&gt;
&lt;br /&gt;
a) If you '''have''' a soldering iron and you're confident with using it, it is recommended that you remove the battery until you actually need it. Doing so avoids unnecessary charge cycles and strain on it. It can also potentially prevent issues with your watch not resetting properly or backfeeding power into your debugger-programmer. There's also the option that you just connect a microswitch between the battery's positive side and the PineTime, just make sure to isolate your connections so it doesn't short out against anything.&lt;br /&gt;
&lt;br /&gt;
b) If you '''do not have''' a soldering iron or you're not confident with using it, don't disconnect the battery if you ever plan on using it. Don't bend the wires too much as they're thin, you won't be able to reconnect it. Keep in mind that keeping it connected during development will probably reduce the lifetime of the battery.  Small load on the 3.3V pin is probably fine, but it will drain the battery empty. Having the battery connected when it's not empty will also very likely backfeed power into your 3.3V pin - '''don't cause short circuits! don't leave the wire dangling!'''&lt;br /&gt;
&lt;br /&gt;
c) If you don't disconnect the battery, also don't connect the '''3.3V''' pin from the SWD cable when debugging or updating firmware. You only need to use the '''GND, SWDIO and SWDCLK''' pins. In that case the watch will run exclusively on battery, but there is no danger of backfeeding power.&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;
The pinout is:  &lt;br /&gt;
&lt;br /&gt;
[[File:PineTime_SWD_location.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Pogo Pins connection ==&lt;br /&gt;
&lt;br /&gt;
'''[https://store.pine64.org/product/pinetime-pogopin-jig PineTime Pogo Pins]''' are spring-loaded pins with diamond-shaped tips...&lt;br /&gt;
&lt;br /&gt;
[[File:PineTime_pogo_tip.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
The Pogo Pins are meant to be connected temporarily to PineTime's SWD port for firmware flashing and simple firmware debugging...&lt;br /&gt;
&lt;br /&gt;
[[File:PineTime_pogo_stlink.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
The other end of the Pogo Pins connects to ST-Link v2 or JLink for flashing and debugging.  (ST-Link v2 is shown in the background)&lt;br /&gt;
&lt;br /&gt;
To connect PineTime Pogo Pins to PineTime's SWD Port:&lt;br /&gt;
&lt;br /&gt;
# To orientate the pins, stick a piece of '''Sticky Tape''' to the Pogo Pins as shown above. The Sticky Tape should point '''away from PineTime's Battery'''. Orientation is important... You may damage PineTime with the incorrect orientation!&lt;br /&gt;
# With the Battery at left and Sticky Tape pointing right, the SWD Pins will be arranged left to right as: '''SWDIO, SWDCLK, 3.3V, GND'''&lt;br /&gt;
# Connect the other end of the Pogo Pins to the Jumper Cable that's bundled with PineTime. Connect the Jumper Cable to ST-Link v2 or JLink: SWDIO, SWDCLK, 3.3V, GND. See [[Reprogramming the PineTime|Reprogramming the PineTime]]&lt;br /&gt;
# With the '''Sticky Tape pointing right''' (away from the Battery), tap and hold the Pogo Pins firmly on PineTime's SWD Port... '''But not too hard''' because the PCB or screen may break. Stabilise the Pogo Pins with your pinky finger as shown above.&lt;br /&gt;
# PineTime should light up and reboot when the Pogo Pins are connected. You may flash and debug PineTime now. See [[Reprogramming the PineTime|Reprogramming the PineTime]]&lt;br /&gt;
&lt;br /&gt;
The tips of the Pogo Pins will partially penetrate the SWD holes like this... '''(Don't force them in!)'''&lt;br /&gt;
&lt;br /&gt;
[[File:PineTime_pogo_swd.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Soldered wires example == &lt;br /&gt;
&lt;br /&gt;
Before attempting this, make sure you have a good soldering iron, some magnification and you haven't set your iron too high. If you haven't ever before soldered things this small, you really really do not want to start out on something this dense, small and thus fragile.&lt;br /&gt;
&lt;br /&gt;
[[File:PineTime_soldered_wires.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pi connection ==&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/lupyuen/pinetime-updater/blob/master/README.md PineTime Updater]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTime]]&lt;/div&gt;</summary>
		<author><name>Aw</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime&amp;diff=11448</id>
		<title>PineTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime&amp;diff=11448"/>
		<updated>2021-09-17T22:44:55Z</updated>

		<summary type="html">&lt;p&gt;Aw: Add link to DevKit Wiring page because it's quite important&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Pinetime.png|400px|thumb|right|The PineTime]]&lt;br /&gt;
&lt;br /&gt;
The '''PineTime''' is a free and open source smartwatch capable of running custom-built open operating systems. Some of the notable features include a heart rate monitor, a week-long battery, and a capacitive touch IPS display that is legible in direct sunlight. It is a fully community driven side-project which anyone can contribute to, allowing you to keep control of your device.&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions / Getting started ==&lt;br /&gt;
&lt;br /&gt;
'''Read these first!'''&lt;br /&gt;
&lt;br /&gt;
* [[Upgrade PineTime to InfiniTime 1.0.0|Upgrading your new PineTime to InfiniTime 1.0.0]]&lt;br /&gt;
* [[PineTime FAQ| Frequently Asked Questions about the PineTime]]&lt;br /&gt;
* [[PineTime Devkit Wiring]]&lt;br /&gt;
* [[Reprogramming the PineTime|Reprogramming the PineTime (development kit)]]&lt;br /&gt;
* [[Switching your PineTime between InfiniTime and Wasp-os]]&lt;br /&gt;
&lt;br /&gt;
== Default OS ==&lt;br /&gt;
&lt;br /&gt;
The current default operating system on the PineTime is called [[InfiniTime]], you can find more information about the firmware on its GitHub page. First devkits shipped with a proprietary custom firmware.&lt;br /&gt;
&lt;br /&gt;
You can find a list of available firmware and other software here: [[PineTime Development]]&lt;br /&gt;
&lt;br /&gt;
== Companion Apps ==&lt;br /&gt;
&lt;br /&gt;
PineTime/InfiniTime needs a companion app to e.g. upload a firmware, get notifications from a phone, or just get the date/time.   &lt;br /&gt;
Here are some companion apps:&lt;br /&gt;
&lt;br /&gt;
* [https://www.gadgetbridge.org Gadgetbridge] (Android &amp;gt;= 4.4) - Companion mobile app, supports updating firmware/bootloader, send notifications, etc.&lt;br /&gt;
* [https://openrepos.net/content/piggz/amazfish Amazfish] (SailfishOS and Linux) - Companion mobile and desktop app, supports updating firmware/bootloader, send notifications, etc.&lt;br /&gt;
* [https://github.com/alexr4535/siglo Siglo] (Linux) - Companion desktop app.&lt;br /&gt;
* [https://github.com/ZephyrLabs/PinetimeFlasher PinetimeFlasher] (Windows) - Companion desktop app, only supports flashing firmware.&lt;br /&gt;
* [https://apps.apple.com/us/app/nrf-connect-for-mobile/id1054362403 nRFConnect] (iOS) - Only supports flashing firmware.&lt;br /&gt;
* [https://github.com/xan-m/Infini-iOS Infini-iOS] (iOS) - Companion mobile app in early development which will support updating firmware/bootloader, send notifications, etc.&lt;br /&gt;
&lt;br /&gt;
== Short overview  / 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 (sealed edition!)) &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:''' [[PineTime_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 3.8V LiPo&lt;br /&gt;
&lt;br /&gt;
= Community =&lt;br /&gt;
&lt;br /&gt;
== Forum ==&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=134 PineTime forum]&lt;br /&gt;
&lt;br /&gt;
== Chat ==&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;
=== Developers and coding ===&lt;br /&gt;
* [https://app.element.io/#/room/#pinetime-dev:matrix.org Matrix Channel] (No login required to read)&lt;br /&gt;
* [https://t.me/pinetime_dev Telegram group]&lt;br /&gt;
* [https://discordapp.com/invite/DgB7kzr Discord server invite link]&lt;br /&gt;
&lt;br /&gt;
== Development efforts ==&lt;br /&gt;
&lt;br /&gt;
To read more about development on the PineTime, the projects available and more technical details, check out [[PineTime Development]]&lt;br /&gt;
&lt;br /&gt;
== Useful articles and blog posts == &lt;br /&gt;
&lt;br /&gt;
If you want to dive in to the ecosystem, here's a short list of various articles and blog posts that can help you set up your soft- or hardware development environment.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ncartron.org/one-week-with-my-pinetime---a-feedback.html Using the PineTime in production (January 2021)]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sneak-peek-of-pinetime-smart-watch-and-why-its-perfect-for-teaching-iot Sneak Peek of PineTime Smart Watch… And why it’s perfect for teaching IoT]&lt;br /&gt;
* [https://lupyuen.github.io/articles/building-a-rust-driver-for-pinetimes-touch-controller Building a Rust Driver for PineTime’s Touch Controller]&lt;br /&gt;
* [https://lupyuen.github.io/articles/porting-druid-rust-widgets-to-pinetime-smart-watch Porting (druid) Rust Widgets to PineTime Smart Watch]&lt;br /&gt;
* [https://lupyuen.github.io/articles/optimising-pinetimes-display-driver-with-rust-and-mynewt Optimising PineTime’s Display Driver with Rust and Mynewt]&lt;br /&gt;
* [https://electronut.in/getting-started-with-zephyr-rtos-on-nordic-nrf52832-hackable/ Getting Started with Zephyr RTOS on Nordic nRF52832 hackaBLE]&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;
* [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;
* [https://www.nrbtech.io/blog/2020/1/4/using-clion-for-nordic-nrf52-projects Using CLion for Nordic nRF52 projects]&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;
* [https://zephyrlabs.github.io/Watchfaces/ Zephyrlabs: just a bunch of watchfaces made for the pinetime]&lt;br /&gt;
* [https://pankajraghav.com/2021/04/03/PINETIME-STOPCLOCK.html Creating a stopwatch in Pinetime (with Infinitime)]&lt;br /&gt;
&lt;br /&gt;
= Hardware =&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;
| Command/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;
== 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;
'''NOTE: ''' The I²C bus, also known as TWI bus has known issues, make sure to write your TWI driver with timeouts.&lt;br /&gt;
&lt;br /&gt;
=== Touch events ===&lt;br /&gt;
&lt;br /&gt;
Touch information is available from 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;
==Accelerometer==&lt;br /&gt;
The on board accelerometer is Bosch BMA421, connected to the I2C bus.&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
&lt;br /&gt;
* P0.06 : I²C SDA&lt;br /&gt;
* P0.07 : I²C SCL&lt;br /&gt;
* P0.08 : Interrupt&lt;br /&gt;
&lt;br /&gt;
I2C Device address : 0x18&lt;br /&gt;
&lt;br /&gt;
= Datasheets and Schematics =&lt;br /&gt;
&lt;br /&gt;
== Schematics ==&lt;br /&gt;
* [https://files.pine64.org/doc/PineTime/PineTime%20Schematic-V1.0a-20191103.pdf PineTime Schematic ver1.0a]&lt;br /&gt;
* [https://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;
** [https://files.pine64.org/doc/datasheet/pinetime/nRF52832%20product%20brief.pdf nRF52832 Product Brief]&lt;br /&gt;
** [https://infocenter.nordicsemi.com/pdf/nRF52832_PS_v1.4.pdf nRF52832 Product Specification v1.4]&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;
** [https://files.pine64.org/doc/datasheet/pinetime/SGM40561.pdf SGMicro SGM40561 Single Cell Charger Datasheet]&lt;br /&gt;
** [https://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;
** [https://datasheet.lcsc.com/szlcsc/2005251035_XTX-XT25F32BSOIGU-S_C558851.pdf XTX XT25F32B]&lt;br /&gt;
** IDs for XT25F32B are: manufacturer (0x0b), device (0x15), memory type (0x40), density (0x16)&lt;br /&gt;
* LCD Panel:&lt;br /&gt;
** [https://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;
** [https://files.pine64.org/doc/datasheet/pinetime/PineTime%20Touch%20Panel.jpg Touchpad Specification for PineTimel]&lt;br /&gt;
** [https://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/2/2f/CST816S.zip Touch Controller Datasheet en]&lt;br /&gt;
* Sensor:&lt;br /&gt;
** [https://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;
** [https://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 case design =&lt;br /&gt;
&lt;br /&gt;
* [https://www.thingiverse.com/thing:4172849 PineTime Smart Watch case by dara0s at thingiverse]&lt;br /&gt;
* [https://www.thingiverse.com/thing:4651462 PineTime dev kit back fix by joaquimorg at thingiverse]&lt;br /&gt;
* [https://www.thingiverse.com/thing:4763267 PineTime dev kit charging holder v4 by zevix81 at thingiverse]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTime]]&lt;/div&gt;</summary>
		<author><name>Aw</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTime_Devkit_Wiring&amp;diff=11447</id>
		<title>PineTime Devkit Wiring</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTime_Devkit_Wiring&amp;diff=11447"/>
		<updated>2021-09-17T21:48:04Z</updated>

		<summary type="html">&lt;p&gt;Aw: Add third option regarding battery and debugging&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will help you get up to scratch about how to connect your PineTime to your hardware debugger and what to keep in mind.&lt;br /&gt;
&lt;br /&gt;
The devkit comes with a set of wires you can use for connecting your programmer to the SWD pins. Most people use friction to make contact with the programming cable. Soldering the wires to the pinetime is not recommended, especially if you don't have a temperature-controlled iron and good confidence that you can do it - the thin PCB is fragile and easy to break. &lt;br /&gt;
&lt;br /&gt;
Current amount of '''dead PineTimes''' (or ruined bundled programming connectors) due to attempted soldering is '''4''' (update this number when suitable). &lt;br /&gt;
&lt;br /&gt;
''' Read this about the battery: '''&lt;br /&gt;
&lt;br /&gt;
You have three choices:&lt;br /&gt;
&lt;br /&gt;
a) If you '''have''' a soldering iron and you're confident with using it, it is recommended that you remove the battery until you actually need it. Doing so avoids unnecessary charge cycles and strain on it. It can also potentially prevent issues with your watch not resetting properly or backfeeding power into your debugger-programmer. There's also the option that you just connect a microswitch between the battery's positive side and the PineTime, just make sure to isolate your connections so it doesn't short out against anything.&lt;br /&gt;
&lt;br /&gt;
b) If you '''do not have''' a soldering iron or you're not confident with using it, don't disconnect the battery if you ever plan on using it. Don't bend the wires too much as they're thin, you won't be able to reconnect it. Keep in mind that keeping it connected during development will probably reduce the lifetime of the battery.  Small load on the 3.3V pin is probably fine, but it will drain the battery empty. Having the battery connected when it's not empty will also very likely backfeed power into your 3.3V pin - '''don't cause short circuits! don't leave the wire dangling!'''&lt;br /&gt;
&lt;br /&gt;
c) If you don't disconnect the battery, also don't connect the '''3.3V and GND''' pins from the SWD cable when debugging or updating firmware. You only need to use the '''SWDIO and SWDCLK''' pins. In that case the watch will run exclusively on battery, but there is no danger of backfeeding power.&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;
The pinout is:  &lt;br /&gt;
&lt;br /&gt;
[[File:PineTime_SWD_location.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Pogo Pins connection ==&lt;br /&gt;
&lt;br /&gt;
'''[https://store.pine64.org/product/pinetime-pogopin-jig PineTime Pogo Pins]''' are spring-loaded pins with diamond-shaped tips...&lt;br /&gt;
&lt;br /&gt;
[[File:PineTime_pogo_tip.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
The Pogo Pins are meant to be connected temporarily to PineTime's SWD port for firmware flashing and simple firmware debugging...&lt;br /&gt;
&lt;br /&gt;
[[File:PineTime_pogo_stlink.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
The other end of the Pogo Pins connects to ST-Link v2 or JLink for flashing and debugging.  (ST-Link v2 is shown in the background)&lt;br /&gt;
&lt;br /&gt;
To connect PineTime Pogo Pins to PineTime's SWD Port:&lt;br /&gt;
&lt;br /&gt;
# To orientate the pins, stick a piece of '''Sticky Tape''' to the Pogo Pins as shown above. The Sticky Tape should point '''away from PineTime's Battery'''. Orientation is important... You may damage PineTime with the incorrect orientation!&lt;br /&gt;
# With the Battery at left and Sticky Tape pointing right, the SWD Pins will be arranged left to right as: '''SWDIO, SWDCLK, 3.3V, GND'''&lt;br /&gt;
# Connect the other end of the Pogo Pins to the Jumper Cable that's bundled with PineTime. Connect the Jumper Cable to ST-Link v2 or JLink: SWDIO, SWDCLK, 3.3V, GND. See [[Reprogramming the PineTime|Reprogramming the PineTime]]&lt;br /&gt;
# With the '''Sticky Tape pointing right''' (away from the Battery), tap and hold the Pogo Pins firmly on PineTime's SWD Port... '''But not too hard''' because the PCB or screen may break. Stabilise the Pogo Pins with your pinky finger as shown above.&lt;br /&gt;
# PineTime should light up and reboot when the Pogo Pins are connected. You may flash and debug PineTime now. See [[Reprogramming the PineTime|Reprogramming the PineTime]]&lt;br /&gt;
&lt;br /&gt;
The tips of the Pogo Pins will partially penetrate the SWD holes like this... '''(Don't force them in!)'''&lt;br /&gt;
&lt;br /&gt;
[[File:PineTime_pogo_swd.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Soldered wires example == &lt;br /&gt;
&lt;br /&gt;
Before attempting this, make sure you have a good soldering iron, some magnification and you haven't set your iron too high. If you haven't ever before soldered things this small, you really really do not want to start out on something this dense, small and thus fragile.&lt;br /&gt;
&lt;br /&gt;
[[File:PineTime_soldered_wires.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pi connection ==&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/lupyuen/pinetime-updater/blob/master/README.md PineTime Updater]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTime]]&lt;/div&gt;</summary>
		<author><name>Aw</name></author>
	</entry>
</feed>