Skip to content

Commit 75c3a92

Browse files
committed
Tidy up lowpower README.
1 parent e06ff5a commit 75c3a92

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

lowpower/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
Release 0.1 25th July 2018
44

5+
1. [Introduction](./README.md#1-introduction)
6+
2. [Installation](./README.md#2-installation)
7+
2.1 [Files](./README.md#21-files)
8+
3. [Low power uasyncio operation](./README.md#3-low-power-uasyncio-operation)
9+
3.1 [The official uasyncio package](./README.md#31-the-official-uasyncio-package)
10+
3.2 [The low power adaptation](./README.md#32-the-low-power-adaptation)
11+
3.2.1 [Consequences of pyb.stop](./README.md#321-consequences-of-pyb.stop)
12+
3.2.1.1 [Timing Accuracy and rollover](./README.md#3211-timing-accuracy-and-rollover)
13+
3.2.1.2 [USB](./README.md#3212-usb)
14+
3.2.2 [Measured results](./README.md#322-measured-results)
15+
3.2.3 [Current waveforms](./README.md#323-current-waveforms)
16+
4. [The rtc_time module](./README.md#4-the-rtc_time-module)
17+
5. [Application design](./README.md#5-application-design)
18+
5.1 [Hardware](./README.md#51-hardware)
19+
5.2 [Application Code](./README.md#52-application-code)
20+
6. [Note on the design](./README.md#6-note-on-the-design)
21+
22+
###### [Main README](../README.md)
23+
524
# 1. Introduction
625

726
This adaptation is specific to the Pyboard and compatible platforms, namely
@@ -33,6 +52,8 @@ waiting for a new trigger.
3352
Some general notes on low power Pyboard applications may be found
3453
[here](https://github.com/peterhinch/micropython-micropower).
3554

55+
###### [Contents](./README.md#a-low-power-usayncio-adaptation)
56+
3657
# 2. Installation
3758

3859
Ensure that the version of `uasyncio` in this repository is installed and
@@ -53,6 +74,8 @@ tested. Copy the file `rtc_time.py` to the device so that it is on `sys.path`.
5374
The test program `lowpower.py` requires a link between pins X1 and X2 to enable
5475
UART 4 to receive data via a loopback.
5576

77+
###### [Contents](./README.md#a-low-power-usayncio-adaptation)
78+
5679
# 3 Low power uasyncio operation
5780

5881
## 3.1 The official uasyncio package
@@ -98,6 +121,8 @@ before yielding with a zero delay. The duration of the `stop` condition
98121
full speed. The `yield` allows each pending task to run once before the
99122
scheduler is again paused (if `latency` > 0).
100123

124+
###### [Contents](./README.md#a-low-power-usayncio-adaptation)
125+
101126
### 3.2.1 Consequences of pyb.stop
102127

103128
#### 3.2.1.1 Timing Accuracy and rollover
@@ -142,6 +167,8 @@ else:
142167
Debugging at low power is facilitated by using `pyb.repl_uart` with an FTDI
143168
adaptor.
144169

170+
###### [Contents](./README.md#a-low-power-usayncio-adaptation)
171+
145172
### 3.2.2 Measured results
146173

147174
The `lpdemo.py` script consumes a mean current of 980μA with 100ms latency, and
@@ -174,14 +201,18 @@ for such applications during their waiting period.
174201
### 3.2.3 Current waveforms
175202

176203
Running `lpdemo.py` while it waits for a button press with latency = 200ms.
204+
It consumes 380μA except for brief peaks while polling the switch.
177205
Vertical 20mA/div
178206
Horizontal 50ms/div
179207
![Image](./current.png)
180208

209+
The following shows that peak on a faster timebase. This type of waveform is
210+
typical that experienced when Python code is running.
181211
Vertical 20mA/div
182212
Horizontal 500μs/div
183213
![Image](./current1.png)
184214

215+
###### [Contents](./README.md#a-low-power-usayncio-adaptation)
185216

186217
# 4. The rtc_time module
187218

@@ -224,6 +255,8 @@ around or to make it global. Once instantiated, latency may be changed by
224255
rtc_time.Latency().value(t)
225256
```
226257

258+
###### [Contents](./README.md#a-low-power-usayncio-adaptation)
259+
227260
# 5. Application design
228261

229262
Attention to detail is required to minimise power consumption, both in terms of
@@ -312,6 +345,8 @@ button with a high latency value, before running the application code with a
312345
lower (or zero) latency. On completion it could revert to waiting for "Start"
313346
with high latency to conserve battery.
314347

348+
###### [Contents](./README.md#a-low-power-usayncio-adaptation)
349+
315350
# 6. Note on the design
316351

317352
The `rtc_time` module represents a compromise designed to minimise changes to
@@ -337,3 +372,5 @@ The `rtc_time` module ensures that `uasyncio` uses `utime` for timing if the
337372
module is present in the path but is unused. This can occur because of an
338373
active USB connection or if running on an an incompatible platform. This
339374
ensures that under such conditions performance is unaffected.
375+
376+
###### [Contents](./README.md#a-low-power-usayncio-adaptation)

0 commit comments

Comments
 (0)