Skip to content

Commit c9b68b8

Browse files
committed
Low power variant supports Pyboard D.
1 parent ad7e508 commit c9b68b8

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

FASTPOLL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ This version has the following features relative to official V2.0:
1919
whereby bidirectional devices such as UARTS can fail to handle concurrent
2020
input and output is fixed.
2121
* It is compatible with `rtc_time.py` for micro-power applications documented
22-
[here](./lowpower/README.md).
22+
[here](./lowpower/README.md). This is a Pyboard-only extension (including
23+
Pyboard D).
2324
* An assertion failure is produced if `create_task` or `run_until_complete`
2425
is called with a generator function
2526
[PR292](https://github.com/micropython/micropython-lib/pull/292). This traps

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This comprises two parts.
1313
replacement for the official version providing bug fixes, additional
1414
functionality and, in certain respects, higher performance.
1515
2. An optional extension module enabling the [fast_io](./FASTPOLL.md) version
16-
to run with very low power draw.
16+
to run with very low power draw. This is Pyboard-only including Pyboard D.
1717

1818
## Resources for users of all versions
1919

lowpower/README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# A low power usayncio adaptation
1+
# A low power usayncio adaptation for Pyboards
22

3-
Release 0.11 8th April 2019
3+
Release 0.11 9th April 2019
44

55
API change: low power applications must now import `rtc_time_cfg` and set its
66
`enabled` flag.
@@ -15,8 +15,9 @@ Now supports Pyboard D.
1515
3.2.1 [Consequences of stop mode](./README.md#321-consequences-of-stop-mode)
1616
3.2.1.1 [Timing Accuracy and rollover](./README.md#3211-timing-accuracy-and-rollover)
1717
3.2.1.2 [USB](./README.md#3212-usb)
18-
3.2.2 [Measured results](./README.md#322-measured-results)
19-
3.2.3 [Current waveforms](./README.md#323-current-waveforms)
18+
3.2.2 [Measured results Pyboard 1](./README.md#322-measured-results-pyboard-1)
19+
3.2.3 [Current waveforms Pyboard 1](./README.md#323-current-waveforms-pyboard-1)
20+
3.2.4 [Pyboard D measurements](./README.md#324-pyboard-d-measurements)
2021
4. [The rtc_time module](./README.md#4-the-rtc_time-module)
2122
5. [Application design](./README.md#5-application-design)
2223
5.1 [Hardware](./README.md#51-hardware)
@@ -190,7 +191,7 @@ adaptor.
190191

191192
###### [Contents](./README.md#a-low-power-usayncio-adaptation)
192193

193-
### 3.2.2 Measured results
194+
### 3.2.2 Measured results Pyboard 1
194195

195196
The `lpdemo.py` script consumes a mean current of 980μA with 100ms latency, and
196197
730μA with 200ms latency, while awaiting a button press.
@@ -219,7 +220,7 @@ A data logging application might tolerate latencies of many seconds while
219220
waiting for a long delay to expire: getting close to `ib` may be practicable
220221
for such applications during their waiting period.
221222

222-
### 3.2.3 Current waveforms
223+
### 3.2.3 Current waveforms Pyboard 1
223224

224225
Running `lpdemo.py` while it waits for a button press with latency = 200ms.
225226
It consumes 380μA except for brief peaks while polling the switch.
@@ -233,6 +234,13 @@ Vertical 20mA/div
233234
Horizontal 500μs/div
234235
![Image](./current1.png)
235236

237+
### 3.2.4 Pyboard D measurements
238+
239+
As of this release the two demo applications consume around 3.3mA. This is high
240+
because the unused pins are floating. When I discover which pins can be set to
241+
input with pullups as per the Pyboard 1.x implementation I hope to see figures
242+
comparable to Pyboard 1.x.
243+
236244
###### [Contents](./README.md#a-low-power-usayncio-adaptation)
237245

238246
# 4. The rtc_time module

lowpower/lp_uart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import uasyncio as asyncio
1515
try:
16-
if asyncio.version != 'fast_io':
16+
if asyncio.version[0] != 'fast_io':
1717
raise AttributeError
1818
except AttributeError:
1919
raise OSError('This requires fast_io fork of uasyncio.')

lowpower/rtc_time.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
# Note the 4K7 I2C pullups on X9 X10 Y9 Y10.
4646
if d_series:
4747
print('Running on Pyboard D') # Investigate which pins we can do this to TODO
48+
#for pin in [p for p in dir(pyb.Pin.board) if p[0] in 'XYW']:
49+
#pin_x = pyb.Pin(pin, pyb.Pin.IN, pyb.Pin.PULL_UP)
4850
else:
4951
print('Running on Pyboard 1.x')
5052
for pin in [p for p in dir(pyb.Pin.board) if p[0] in 'XY']:

0 commit comments

Comments
 (0)