# Electron not waking

**URL:** <https://community.particle.io/t/electron-not-waking/43387>\
**Category:** Troubleshooting\
**Created:** [August 8, 2018, 7:05am UTC](https://community.particle.io/t/electron-not-waking/43387 "2018-08-08T07:05:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hakonmell](https://avatars.discourse-cdn.com/v4/letter/h/7c8e57/32.png) [@hakonmell](https://community.particle.io/u/hakonmell)\
**Post date:** [August 8, 2018, 7:05am UTC](https://community.particle.io/t/electron-not-waking/43387/1 "2018-08-08T07:05:51Z")

</div>

We have 10 Electron running firmware v0.7.0.  
Half off them will not wake up at all after calling: System.sleep(SLEEP\_MODE\_SOFTPOWEROFF, SLEEP\_TIME).  
Using:  
SYSTEM\_MODE(SEMI\_AUTOMATIC);  
SYSTEM\_THREAD(ENABLED);

I find it hard to reproduce the error as it affects only half off our fleet.  
I know there might be several reasons to this error and I don’t give a lot of information here, but I would like help to narrow down the reason for this happening.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [August 8, 2018, 9:38am UTC](https://community.particle.io/t/electron-not-waking/43387/2 "2018-08-08T09:38:24Z")

</div>

Is `SLEEP_TIME` a constant? If not, double check that it never gets negative.

Make sure the WKP pin is not HIGH when going to sleep.

---

<div class="post-metadata">

**Author:** ![rowsail](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@rowsail](https://community.particle.io/u/rowsail)\
**Post date:** [August 8, 2018, 1:55pm UTC](https://community.particle.io/t/electron-not-waking/43387/3 "2018-08-08T13:55:45Z")

</div>

What to do if the design has WKP pulled high and the device is put in sleep mode? Is there a work around (such as setting as an output and driving low?)

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [August 8, 2018, 2:11pm UTC](https://community.particle.io/t/electron-not-waking/43387/4 "2018-08-08T14:11:27Z")

</div>

This is an open issue

> <https://github.com/particle-iot/firmware/issues/1262>

While this issue is still slated for 0.8.0 I can’t see a fix applied up to now (0.8.0-rc.9).

Currently the only thing around is to _not_ have it HIGH on sleep.

---

<div class="post-metadata">

**Author:** ![rowsail](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@rowsail](https://community.particle.io/u/rowsail)\
**Post date:** [August 8, 2018, 2:52pm UTC](https://community.particle.io/t/electron-not-waking/43387/5 "2018-08-08T14:52:08Z")

</div>

Thank you - well noted for future designs.

---

<div class="post-metadata">

**Author:** ![hakonmell](https://avatars.discourse-cdn.com/v4/letter/h/7c8e57/32.png) [@hakonmell](https://community.particle.io/u/hakonmell)\
**Post date:** [August 13, 2018, 6:29am UTC](https://community.particle.io/t/electron-not-waking/43387/6 "2018-08-13T06:29:32Z")

</div>

Thank you for the response.  
Is there any workarounds for this problem?  
I’m using an modified version of the Asset Tracker, where I need to wake on movement.

Does any example code for how to make sure the LIS3DH is not keeping the WKP High before going to sleep exist?

---

<div class="post-metadata">

**Author:** ![hakonmell](https://avatars.discourse-cdn.com/v4/letter/h/7c8e57/32.png) [@hakonmell](https://community.particle.io/u/hakonmell)\
**Post date:** [August 13, 2018, 10:44am UTC](https://community.particle.io/t/electron-not-waking/43387/7 "2018-08-13T10:44:58Z")

</div>

Found a couple of answers here if anyone is interested. [asset-tracker-accelerometer-gps-problem](https://community.particle.io/t/asset-tracker-accelerometer-gps-problem/20602/52)

The fix is basicly to check for movement and if there is movement don’t use SLEEP\_MODE\_DEEP and SLEEP\_NETWORK\_STANDBY.
