summaryrefslogtreecommitdiff
path: root/wasp
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-04-10 13:32:14 (GMT)
committerGitHub <noreply@github.com>2020-04-10 13:32:14 (GMT)
commit74511a1e1cdb655276aed2b85c953830db3cdfe7 (patch)
treef76ea55b274211a291903b537c9962eb3ccd0b0a /wasp
parentac61d8a1c114d7f4ca8000afc02c843db5fd6245 (diff)
parentdcc51cd0941e0f1da64ba30040820b887251e79d (diff)
Merge pull request #7 from salcedo/master
wasp: pinetime: Release SPI NOR from deep power-down
Diffstat (limited to 'wasp')
-rw-r--r--wasp/boards/pinetime/watch.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/wasp/boards/pinetime/watch.py b/wasp/boards/pinetime/watch.py
index e4c4106..1caeea5 100644
--- a/wasp/boards/pinetime/watch.py
+++ b/wasp/boards/pinetime/watch.py
@@ -68,6 +68,12 @@ i2c = I2C(1, scl='I2C_SCL', sda='I2C_SDA')
touch = CST816S(i2c)
vibrator = Vibrator(Pin('MOTOR', Pin.OUT, value=0), active_low=True)
+# Release flash from deep power-down
+nor_cs = Pin('NOR_CS', Pin.OUT, value=1)
+nor_cs(0)
+spi.write('\xAB')
+nor_cs(1)
+
# Mount the filesystem
flash = FLASH(spi, (Pin('NOR_CS', Pin.OUT, value=1),))
try: