I already had various reset causes :p but someone maybe has a "official" list ? This would make debugging a bit easier.
Same for boot mode.
Explore... Chat... Share...
reset causes:
0:
1: normal boot
2: reset pin
3: software reset
4: watchdog reset
boot device:
0:
1: ram
3: flash
struct bootflags
{
unsigned char raw_rst_cause : 4;
unsigned char raw_bootdevice : 4;
unsigned char raw_bootmode : 4;
unsigned char rst_normal_boot : 1;
unsigned char rst_reset_pin : 1;
unsigned char rst_watchdog : 1;
unsigned char bootdevice_ram : 1;
unsigned char bootdevice_flash : 1;
};
struct bootflags bootmode_detect(void) {
int reset_reason, bootmode;
asm (
"movi %0, 0x60000600\n\t"
"movi %1, 0x60000200\n\t"
"l32i %0, %0, 0x114\n\t"
"l32i %1, %1, 0x118\n\t"
: "+r" (reset_reason), "+r" (bootmode) /* Outputs */
: /* Inputs (none) */
: "memory" /* Clobbered */
);
struct bootflags flags;
flags.raw_rst_cause = (reset_reason&0xF);
flags.raw_bootdevice = ((bootmode>>0x10)&0x7);
flags.raw_bootmode = ((bootmode>>0x1D)&0x7);
flags.rst_normal_boot = flags.raw_rst_cause == 0x1;
flags.rst_reset_pin = flags.raw_rst_cause == 0x2;
flags.rst_watchdog = flags.raw_rst_cause == 0x4;
flags.bootdevice_ram = flags.raw_bootdevice == 0x1;
flags.bootdevice_flash = flags.raw_bootdevice == 0x3;
return flags;
}
I guess Python/µPython knowledge is sparse here; I[…]
Uhm no, a normal 5V USB wall adapter should work, […]
You can with esptool , but I see no reason why, s[…]
an arduino nano is not and USB to serial converter[…]
Did you determine how to do this? I need to do the[…]
You should use a resistor for all leds irrespectiv[…]
Hi all, I have a project in which a serial string […]
Hi my friends I recorded a wave file with Arduin[…]
Instead of a pin "-1" can be taken for B[…]
Setting up a NRF24 (with 5V adapter) to an ESP8266[…]
hi all, I am Alek, from Austria. Been Arduino use[…]
Based on HTTPSRequest example sketch, SerialHttpsC[…]
Wouldn't it be much easier to drop the DUE and let[…]
I'm using PainlessMesh at the moment and I beli[…]
Follow US on Twitter and get ESP8266 news and updates first.