View Single Post
Old 06-02-2013, 07:59 AM   #14
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Short answer: PEBCAK

Longer answer (but not all inclusive):

1) "sleep" is a shell command, not a system command.
It only effects the execution path of the script that contains it.

2) Where / How are these scripts being called?

3) If you do succeed in putting the processor to sleep, then you need a hardware event from some hardware that is still running to wake it.

4) Writing less than a full erase block of data to flash will cause the "short write" to be cached (somewhere, there are several places) in the system or within the flash chip's controller itself.

Shutting down the power to the flash and its internal controller before it completes one of its erase and re-program functions (while the operation is in progress) will at best result in a corrupted, non-recoverable, erase (storage) block in the flash. At worse, a corrupted, non-recoverable internal control structure (then it is unsolder flash chip, solder in a new one time).

You really should try to understand the system and its hardware before trying to take control of it outside of its normal dependence system.

PS: You are in the wrong thread.
This thread is about responding to system events, not about trying to manufacture them.
If you can't find a thread about your subject here, start your own, they are cheap here.

Last edited by knc1; 06-02-2013 at 08:02 AM.
knc1 is offline   Reply With Quote