so, the bootloader will read the first 128 bytes, store it somewhere, erase, write 128 bytes back, right?
when it needs to clear the command, that is
ficeto
@ficeto
sure
tthough no need to clear, if that command is actually status of a sort
have it a struct with info for what you are flashing
Ivan Grokhotkov
@igrr
well you need to clear if you don't want the bootloader to update again after flashing
actually not
ficeto
@ficeto
on actuall bott that could be read and known if flash went OK or failed or what
Ivan Grokhotkov
@igrr
we can overwrite this with 0xff
ficeto
@ficeto
why clear?
if the ststaus byte is update, write the image from the address bytes to 0x0
then set status updated
Ivan Grokhotkov
@igrr
when we write to flash, we can only write "1" bits
ficeto
@ficeto
yeah...
or erase whole block?
Ivan Grokhotkov
@igrr
so then we can make status_update = 0x11 and status_updated=0xff
so you can always overwrite status without erasing
smth like that
and need to erase only when we store new command there
ficeto
@ficeto
sure
that block will not live more than the rest anyway :)
so erase each time the rest are erased is fine
_
Ivan Grokhotkov
@igrr
esp8266/Arduino#356
anyone tried PWM with the new SDK?
Russ Mathis
@RussMathis
what do you need tried?
Ivan Grokhotkov
@igrr
ok, yeah, analogWrite got broken with SDK 1.1.0
goes into WDT reset
ficeto
@ficeto
so i digged into GPIO WAKEUP_ENABLE a bit
and here is what it does:
when pin is set as WAKEUP (PULLUP/PULLDOWN)
at the point of calling pinMode(WAKEUP_PULLUP)
if the pin is HIGH, that will cause WDT reset
and sketch will restart
if HIGH, it will continue
Russ Mathis
@RussMathis
cool!
ficeto
@ficeto
too much HIGH :D one should be LOW
Russ Mathis
@RussMathis
So simply calling pinMode(15,WAKEUP_PULLUP);deepSleep(100000000); The chip will sleep... Then by externally pulling 15 HIGH will restart the chip before the expiration time sleep arg?
downloaded and installed via arduino ide 1.6.4 from board manager from eclipse set Private hardware path to:..packages\esp8266\hardware\esp8266\1.6.4-755-gdb0b8be and recompiled... Worked for simple sleep test sketch