2
2
3
3
Release 0.1 25th July 2018
4
4
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
+
5
24
# 1. Introduction
6
25
7
26
This adaptation is specific to the Pyboard and compatible platforms, namely
@@ -33,6 +52,8 @@ waiting for a new trigger.
33
52
Some general notes on low power Pyboard applications may be found
34
53
[ here] ( https://github.com/peterhinch/micropython-micropower ) .
35
54
55
+ ###### [ Contents] ( ./README.md#a-low-power-usayncio-adaptation )
56
+
36
57
# 2. Installation
37
58
38
59
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`.
53
74
The test program ` lowpower.py ` requires a link between pins X1 and X2 to enable
54
75
UART 4 to receive data via a loopback.
55
76
77
+ ###### [ Contents] ( ./README.md#a-low-power-usayncio-adaptation )
78
+
56
79
# 3 Low power uasyncio operation
57
80
58
81
## 3.1 The official uasyncio package
@@ -98,6 +121,8 @@ before yielding with a zero delay. The duration of the `stop` condition
98
121
full speed. The ` yield ` allows each pending task to run once before the
99
122
scheduler is again paused (if ` latency ` > 0).
100
123
124
+ ###### [ Contents] ( ./README.md#a-low-power-usayncio-adaptation )
125
+
101
126
### 3.2.1 Consequences of pyb.stop
102
127
103
128
#### 3.2.1.1 Timing Accuracy and rollover
@@ -142,6 +167,8 @@ else:
142
167
Debugging at low power is facilitated by using ` pyb.repl_uart ` with an FTDI
143
168
adaptor.
144
169
170
+ ###### [ Contents] ( ./README.md#a-low-power-usayncio-adaptation )
171
+
145
172
### 3.2.2 Measured results
146
173
147
174
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.
174
201
### 3.2.3 Current waveforms
175
202
176
203
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.
177
205
Vertical 20mA/div
178
206
Horizontal 50ms/div
179
207
![ Image] ( ./current.png )
180
208
209
+ The following shows that peak on a faster timebase. This type of waveform is
210
+ typical that experienced when Python code is running.
181
211
Vertical 20mA/div
182
212
Horizontal 500μs/div
183
213
![ Image] ( ./current1.png )
184
214
215
+ ###### [ Contents] ( ./README.md#a-low-power-usayncio-adaptation )
185
216
186
217
# 4. The rtc_time module
187
218
@@ -224,6 +255,8 @@ around or to make it global. Once instantiated, latency may be changed by
224
255
rtc_time.Latency().value(t)
225
256
```
226
257
258
+ ###### [ Contents] ( ./README.md#a-low-power-usayncio-adaptation )
259
+
227
260
# 5. Application design
228
261
229
262
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
312
345
lower (or zero) latency. On completion it could revert to waiting for "Start"
313
346
with high latency to conserve battery.
314
347
348
+ ###### [ Contents] ( ./README.md#a-low-power-usayncio-adaptation )
349
+
315
350
# 6. Note on the design
316
351
317
352
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
337
372
module is present in the path but is unused. This can occur because of an
338
373
active USB connection or if running on an an incompatible platform. This
339
374
ensures that under such conditions performance is unaffected.
375
+
376
+ ###### [ Contents] ( ./README.md#a-low-power-usayncio-adaptation )
0 commit comments