mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-12-24 02:02:22 +03:00
Add documentation about building a stub using NRF52-DK.
This commit is contained in:
parent
16c7ce8929
commit
27d0e1e02f
@ -32,6 +32,10 @@ I've tested this project on the actual PineTime hardware.
|
||||
* BLE CTS client (retrieves the time from the connected device if it implements a CTS server)
|
||||
* Push button to go to disable screen (and go to low power mode) / enable screen (and wake-up). **NOTE** : I'm not completely sure the power consumption is optimal, especially in sleep mode. Any help to measure and debug this is welcome.
|
||||
|
||||
## Stub using NRF52-DL
|
||||
![Pinetime stub](./images/pinetimestub1.jpg "PinetimeStub")
|
||||
|
||||
See [this page](./doc/PinetimeStubWithNrf52DK.md)
|
||||
|
||||
## How to build
|
||||
|
||||
|
50
doc/PinetimeStubWithNrf52DK.md
Normal file
50
doc/PinetimeStubWithNrf52DK.md
Normal file
@ -0,0 +1,50 @@
|
||||
# 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.
|
||||
|
||||
It can be very useful for PineTime developpment:
|
||||
* You can use it embedded JLink SWD programmer/debugger to program and debug you 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.
|
||||
|
||||
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 stub only implements the display, the button and the BLE radio. The other features from the pintime are missing:
|
||||
* heart rate sensor
|
||||
* SPI flash
|
||||
* touchpad
|
||||
* accelerometer
|
||||
|
||||
These devices could be added on this stub, but I do not have the parts to try them out for now.
|
||||
|
||||
![Pinetime stub](../images/pinetimestub1.jpg "PinetimeStub")
|
||||
|
||||
|
||||
Here are the parts you need to build this simulator:
|
||||
* [NRF52-DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK)
|
||||
* An ST7889 display (I bought [this one](https://www.aliexpress.com/item/32859772356.html?spm=a2g0s.9042311.0.0.1b774c4dSoc4Xz))
|
||||
* A push-button (the one I use comes from a previous project build around ESP8266 board Wemos D1 Mini).
|
||||
* Dupont wires
|
||||
|
||||
You just need to make the following connections:
|
||||
|
||||
| NRF52-DK | ST7889 display |
|
||||
| ---------|--------------- |
|
||||
| VDD | VCC |
|
||||
| GND | GND |
|
||||
| P0.03 | SDA |
|
||||
| P0.26 | RES |
|
||||
| P0.02 | SCL |
|
||||
| P0.18 | DC |
|
||||
|
||||
|
||||
| NRF52-DK | Push Button |
|
||||
| ---------|----------------------- |
|
||||
| P0.13 | Button IN (D3 in my case) |
|
||||
| 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:
|
||||
|
||||
| NRF52 -DK | NRF52- DK |
|
||||
| --------- | --------- |
|
||||
| DETECT | GND |
|
||||
|
||||
Now, you should be able to program the SoC on the NRF52-DK board, and use it as if it was running on the pintime.
|
BIN
images/pinetimestub1.jpg
Normal file
BIN
images/pinetimestub1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 MiB |
@ -2507,12 +2507,12 @@
|
||||
#endif
|
||||
|
||||
#ifndef GPIOTE_LOG_ENABLED
|
||||
#define GPIOTE_LOG_ENABLED 1
|
||||
#define GPIOTE_LOG_ENABLED 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NRFX_GPIOTE_LOG_ENABLED
|
||||
#define NRFX_GPIOTE_LOG_ENABLED 1
|
||||
#define NRFX_GPIOTE_LOG_ENABLED 0
|
||||
#endif
|
||||
|
||||
// <o> GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins
|
||||
@ -3068,7 +3068,7 @@
|
||||
// <e> NRFX_GPIOTE_CONFIG_LOG_ENABLED - Enables logging in the module.
|
||||
//==========================================================
|
||||
#ifndef NRFX_GPIOTE_CONFIG_LOG_ENABLED
|
||||
#define NRFX_GPIOTE_CONFIG_LOG_ENABLED 1
|
||||
#define NRFX_GPIOTE_CONFIG_LOG_ENABLED 0
|
||||
#endif
|
||||
// <o> NRFX_GPIOTE_CONFIG_LOG_LEVEL - Default Severity level
|
||||
|
||||
@ -8540,15 +8540,15 @@
|
||||
// <e> NRF_LOG_ENABLED - nrf_log - Logger
|
||||
//==========================================================
|
||||
#ifndef NRF_LOG_ENABLED
|
||||
#define NRF_LOG_ENABLED 1
|
||||
#define NRF_LOG_ENABLED 0
|
||||
#endif
|
||||
|
||||
#ifndef NRF_LOG_BACKEND_RTT_ENABLED
|
||||
#define NRF_LOG_BACKEND_RTT_ENABLED 1
|
||||
#define NRF_LOG_BACKEND_RTT_ENABLED 0
|
||||
#endif
|
||||
|
||||
#ifndef NRF_LOG_BACKEND_SERIAL_USES_RTT
|
||||
#define NRF_LOG_BACKEND_SERIAL_USES_RTT 1
|
||||
#define NRF_LOG_BACKEND_SERIAL_USES_RTT 0
|
||||
#endif
|
||||
// <h> Log message pool - Configuration of log message pool
|
||||
|
||||
@ -8904,7 +8904,7 @@
|
||||
// <e> CLOCK_CONFIG_LOG_ENABLED - Enables logging in the module.
|
||||
//==========================================================
|
||||
#ifndef CLOCK_CONFIG_LOG_ENABLED
|
||||
#define CLOCK_CONFIG_LOG_ENABLED 1
|
||||
#define CLOCK_CONFIG_LOG_ENABLED 0
|
||||
#endif
|
||||
// <o> CLOCK_CONFIG_LOG_LEVEL - Default Severity level
|
||||
|
||||
@ -9006,7 +9006,7 @@
|
||||
// <e> GPIOTE_CONFIG_LOG_ENABLED - Enables logging in the module.
|
||||
//==========================================================
|
||||
#ifndef GPIOTE_CONFIG_LOG_ENABLED
|
||||
#define GPIOTE_CONFIG_LOG_ENABLED 1
|
||||
#define GPIOTE_CONFIG_LOG_ENABLED 0
|
||||
#endif
|
||||
// <o> GPIOTE_CONFIG_LOG_LEVEL - Default Severity level
|
||||
|
||||
@ -11049,7 +11049,7 @@
|
||||
// <e> NRF_SDH_BLE_LOG_ENABLED - Enable logging in SoftDevice handler (BLE) module.
|
||||
//==========================================================
|
||||
#ifndef NRF_SDH_BLE_LOG_ENABLED
|
||||
#define NRF_SDH_BLE_LOG_ENABLED 1
|
||||
#define NRF_SDH_BLE_LOG_ENABLED 0
|
||||
#endif
|
||||
// <o> NRF_SDH_BLE_LOG_LEVEL - Default Severity level
|
||||
|
||||
@ -11100,11 +11100,11 @@
|
||||
// <e> NRF_SDH_LOG_ENABLED - Enable logging in SoftDevice handler module.
|
||||
//==========================================================
|
||||
#ifndef NRF_SDH_LOG_ENABLED
|
||||
#define NRF_SDH_LOG_ENABLED 1
|
||||
#define NRF_SDH_LOG_ENABLED 0
|
||||
#endif
|
||||
|
||||
#ifndef NRF_SDH_FREERTOS_LOG_ENABLED
|
||||
#define NRF_SDH_FREERTOS_LOG_ENABLED 1
|
||||
#define NRF_SDH_FREERTOS_LOG_ENABLED 0
|
||||
#endif
|
||||
|
||||
#ifndef NRF_SDH_FREERTOS_LOG_LEVEL
|
||||
@ -11159,7 +11159,7 @@
|
||||
// <e> NRF_SDH_SOC_LOG_ENABLED - Enable logging in SoftDevice handler (SoC) module.
|
||||
//==========================================================
|
||||
#ifndef NRF_SDH_SOC_LOG_ENABLED
|
||||
#define NRF_SDH_SOC_LOG_ENABLED 1
|
||||
#define NRF_SDH_SOC_LOG_ENABLED 0
|
||||
#endif
|
||||
// <o> NRF_SDH_SOC_LOG_LEVEL - Default Severity level
|
||||
|
||||
@ -11312,7 +11312,7 @@
|
||||
// <e> PM_LOG_ENABLED - Enable logging in Peer Manager and its submodules.
|
||||
//==========================================================
|
||||
#ifndef PM_LOG_ENABLED
|
||||
#define PM_LOG_ENABLED 1
|
||||
#define PM_LOG_ENABLED 0
|
||||
#endif
|
||||
// <o> PM_LOG_LEVEL - Default Severity level
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user