Improved documentation readability
Improved documentation readability by rephrasing confusing sentences. Added Sitronix ST7789V datasheet link to SPI-LCD-driver.md for easier reference.
This commit is contained in:
parent
c8214bc666
commit
90352af626
7 changed files with 19 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Navigation Service
|
# Navigation Service
|
||||||
## Introduction
|
## Introduction
|
||||||
The navigation ble service provides 4 characteristics to allow the the watch to display navigation instructions from a companion application. The intended purpose is when performing some outdoor activities, for example running or cycling.
|
The navigation ble service provides 4 characteristics to allow the the watch to display navigation instructions from a companion application. This service is intended to be used when performing some outdoor activities, for example running or cycling.
|
||||||
|
|
||||||
The 4 characteristics are:
|
The 4 characteristics are:
|
||||||
flag (string) - Upcoming icon name
|
flag (string) - Upcoming icon name
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# Build a stub for PineTime using NRF52-DK
|
# Build a stub for PineTime using NRF52-DK
|
||||||
[NRF52-DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK) is the official developpment kit for NRF52832 SoC from Nordic Semiconductor.
|
[NRF52-DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK) is the official developpment kit for the NRF52832 SoC from Nordic Semiconductor used in the PineTime.
|
||||||
|
|
||||||
It can be very useful for PineTime development:
|
This development kit can be very useful for PineTime development:
|
||||||
* You can use it embedded JLink SWD programmer/debugger to program and debug you code on the PineTime
|
* You can use its embedded JLink SWD programmer/debugger to program and debug your code on the PineTime
|
||||||
* As it's based on the same SoC than the PineTime, you can program it to actually run the same code than the PineTime.
|
* As it's based on the same SoC than the PineTime, you can program it to actually run the same code as the PineTime.
|
||||||
|
|
||||||
This page is about the 2nd point : we will build a stub that will allow us to run the same code than the one you could run on the PineTime. This will allow you to work more easily if you don't have a PineTime dev kit around, if you don't want to modify your dev kit for SWD programming, or if you want to use some feature from the DK (like power measurement).
|
This page is about the 2nd point : we will build a stub that will allow us to run the same code you can run on the PineTime. This will allow you to work more easily if you don't have a PineTime dev kit around, if you don't want to modify your dev kit for SWD programming, or if you want to use some feature from the NRF52-DK (like power measurement).
|
||||||
|
|
||||||
This stub only implements the display, the button and the BLE radio. The other features from the pintime are missing:
|
This stub only implements the display, the button and the BLE radio. The other features from the pintime are missing:
|
||||||
* heart rate sensor
|
* heart rate sensor
|
||||||
|
@ -41,7 +41,7 @@ You just need to make the following connections:
|
||||||
| P0.13 | Button IN (D3 in my case) |
|
| P0.13 | Button IN (D3 in my case) |
|
||||||
| GND | GND |
|
| GND | GND |
|
||||||
|
|
||||||
You also need to enable the I/O expander to disconnect pins from buttons and led on the NRF52-DK and leave them available on the pin headers:
|
You also need to enable the I/O expander to disconnect pins from the buttons and LED on the NRF52-DK and leave them available on the pin headers:
|
||||||
|
|
||||||
| NRF52 -DK | NRF52- DK |
|
| NRF52 -DK | NRF52- DK |
|
||||||
| --------- | --------- |
|
| --------- | --------- |
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# The SPI LCD driver
|
# The SPI LCD driver
|
||||||
## Introduction
|
## Introduction
|
||||||
The LCD controller that drive the display of the Pinetime is the Sitronix ST7789V. This controller is easy to integrate with an MCU thanks to its SPI interface, and has some interesting features like:
|
The LCD controller that drives the display of the Pinetime is the [Sitronix ST7789V](https://wiki.pine64.org/images/5/54/ST7789V_v1.6.pdf). This controller is easy to integrate with an MCU thanks to its SPI interface, and has some interesting features like:
|
||||||
- an on-chip display data RAM that can store the whole framebuffer
|
- an on-chip display data RAM that can store the whole framebuffer
|
||||||
- partial screen update
|
- partial screen update
|
||||||
- hardware assisted vertical scrolling
|
- hardware assisted vertical scrolling
|
||||||
|
|
|
@ -4,9 +4,9 @@ Download the files **bootloader.bin**, **image-x.y.z.bin** and **pinetime-graphi
|
||||||
![Image file](imageFile.png)
|
![Image file](imageFile.png)
|
||||||
|
|
||||||
The bootloader reads a boot logo from the external SPI flash memory. The first step consists of flashing a tool in the MCU that will flash the boot logo into this SPI flash memory. This first step is optional but recommended (the bootloader will display garbage on screen for a few second if you don't do it).
|
The bootloader reads a boot logo from the external SPI flash memory. The first step consists of flashing a tool in the MCU that will flash the boot logo into this SPI flash memory. This first step is optional but recommended (the bootloader will display garbage on screen for a few second if you don't do it).
|
||||||
Using your SWD tool, flash **pinetime-graphics-x.y.z.bin** at offset **0x0000**. Reset the MCU and wait for a few second, until the logo is completely drawn on the display.
|
Using your SWD tool, flash **pinetime-graphics-x.y.z.bin** at offset **0x0000**. Reset the MCU and wait for a few seconds until the logo is completely drawn on the display.
|
||||||
|
|
||||||
Then, using your SWD tool, flash those file at specific offset:
|
Then, using your SWD tool. Flash those file at specific offset:
|
||||||
|
|
||||||
- bootloader.bin : **0x0000**
|
- bootloader.bin : **0x0000**
|
||||||
- image-x.y.z.bin : **0x8000**
|
- image-x.y.z.bin : **0x8000**
|
||||||
|
|
|
@ -120,11 +120,11 @@ Reading a value from the firmware version characteristic will yield a UTF-8 enco
|
||||||
|
|
||||||
#### Battery Level
|
#### Battery Level
|
||||||
|
|
||||||
Reading from the battery level characteristic yields a single byte of data. This byte can be converted to an unsigned 8-bit integer which will be the battery percentage. This characteristic allows notify for updates as the value changes.
|
Reading from the battery level characteristic yields a single byte of data. This byte can be converted to an unsigned 8-bit integer which will be the battery percentage. This characteristic allows notifications for updates as the value changes.
|
||||||
|
|
||||||
#### Heart Rate
|
#### Heart Rate
|
||||||
|
|
||||||
Reading from the heart rate characteristic yields two bytes of data. I am not sure of the function of the first byte. It appears to always be zero. The second byte can be converted to an unsigned 8-bit integer which is the current heart rate. This characteristic also allows notify for updates as the value changes.
|
Reading from the heart rate characteristic yields two bytes of data. I am not sure of the function of the first byte. It appears to always be zero. The second byte can be converted to an unsigned 8-bit integer which is the current heart rate. This characteristic also allows notifications for updates as the value changes.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,4 @@ New features should be implemented in **feature branches** created from **develo
|
||||||
|
|
||||||
To release a new version of the application, when develop is considered stable, a **release** branch is created from **develop**. This can be considered as a *release candidate* branch. When everything is OK, this release branch is merged into **master** and the release is generated (a tag is applied to git, the release note is finalized, binaries are built,...) from **master**.
|
To release a new version of the application, when develop is considered stable, a **release** branch is created from **develop**. This can be considered as a *release candidate* branch. When everything is OK, this release branch is merged into **master** and the release is generated (a tag is applied to git, the release note is finalized, binaries are built,...) from **master**.
|
||||||
|
|
||||||
Git flow also supports the creation of **hotfix** branches when a bug is discovered in a released version. The **hotfix** branch is created from **master** and will be used only to implement a fix to this bug. Multiple hotfix branches can be created for the same release if more than one bugs are discovered.
|
Git flow also supports the creation of **hotfix** branches when a bug is discovered in a released version. The **hotfix** branch is created from **master** and will be used only to implement a fix to this bug. Multiple hotfix branches can be created for the same release if multiple bugs are discovered.
|
|
@ -1,12 +1,12 @@
|
||||||
# OpenOCD and STLink
|
# OpenOCD and STLink
|
||||||
OpenOCD (**Open O**n **C**hip **D**ebugger) is an open source tool that interfaces with many SWD/JTAG debugger to provide debugging and *in-system* programming for embedded target devices.
|
OpenOCD (**Open O**n **C**hip **D**ebugger) is an open source tool that interfaces with many SWD/JTAG debugger to provide debugging and *in-system* programming for embedded target devices.
|
||||||
|
|
||||||
It supports the **NRF52** (the CPU of the PineTime) and the **STLinkV2**, a cheap SWD debugger.
|
OpenOCD supports the **NRF52** (the CPU of the PineTime) and the **STLinkV2**, a cheap SWD debugger.
|
||||||
|
|
||||||
It works on X86 computers, as well as ARM/ARM64 computers and SBC (like the RaspberryPi and Pine64 Pinebook Pro) !
|
OpenOCD works on X86 computers, ARM/ARM64 computers, and SBCs (like the RaspberryPi and Pine64 Pinebook Pro)!
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
We will build OpenOCD from sources, as packages from Linux distributions are most of the time outdated and do not support the NRF52 correctly.
|
We will build OpenOCD from sources, as packages from Linux distributions are often outdated and do not support the NRF52 correctly.
|
||||||
|
|
||||||
- Fetch the sources from GIT, and build and install it:
|
- Fetch the sources from GIT, and build and install it:
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ sudo cp contrib/60-openocd.rules /etc/udev/rules.d/
|
||||||
sudo udevadm control --reload-rules
|
sudo udevadm control --reload-rules
|
||||||
```
|
```
|
||||||
|
|
||||||
- You can now plug your STLinkV2 in a USB port and run OpenOCD to see if it's working correctly:
|
- You can now plug your STLinkV2 into a USB port and run OpenOCD to see if it's working correctly:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ openocd -f interface/stlink.cfg -f target/nrf52.cfg
|
$ openocd -f interface/stlink.cfg -f target/nrf52.cfg
|
||||||
|
@ -63,7 +63,7 @@ gdb_breakpoint_override hard
|
||||||
|
|
||||||
source [find target/nrf52.cfg]
|
source [find target/nrf52.cfg]
|
||||||
```
|
```
|
||||||
This file specifies to OpenOCD which debugger and target it will be connected to..
|
This file specifies to OpenOCD which debugger and target it will be connected to.
|
||||||
|
|
||||||
Then, we use various *user files* to use OpenOCD to flash InfiniTime binary files.
|
Then, we use various *user files* to use OpenOCD to flash InfiniTime binary files.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue