summaryrefslogtreecommitdiff
path: root/wasp/boards/pinetime
diff options
context:
space:
mode:
authorBrian Salcedo <brian@salcedo.tech>2020-03-15 13:38:47 (GMT)
committerBrian Salcedo <brian@salcedo.tech>2020-03-15 13:38:47 (GMT)
commitdcc51cd0941e0f1da64ba30040820b887251e79d (patch)
tree4cfcf86b843eaadd4ad921ce2ae00b81d499fb31 /wasp/boards/pinetime
parent321484b845e18471950585302737f9a1a9119c40 (diff)
wasp: pinetime: Release SPI NOR from deep power-down
Diffstat (limited to 'wasp/boards/pinetime')
-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 332d761..8248d9e 100644
--- a/wasp/boards/pinetime/watch.py
+++ b/wasp/boards/pinetime/watch.py
@@ -65,6 +65,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: