-->
Page 2 of 2

Re: reset causes|boot mode, list?

PostPosted: Thu Apr 05, 2018 8:24 am
by Dynamite
Hey everyone..
I'm getting this in serial monitor of arduino... please suggest some solutions, I'm unable to check my desired output.

Exception (9):
epc1=0x402027ae epc2=0x00000000 epc3=0x00000000 excvaddr=0x0000001f depc=0x00000000

ctx: cont
sp: 3ffefe40 end: 3fff0090 offset: 01a0

stack>>>
3ffeffe0: 0000004b 00000050 3ffeed48 402027a8
3ffefff0: 3ffe8cbc 3ffeefa0 3ffe8cb8 a0640534
3fff0000: 3ffe8994 3ffeefa0 0000004b 402032cc
3fff0010: 40104e5a 3ffeefa0 3ffeed48 402021cd
3fff0020: 00000000 00000000 00000000 402032a1
3fff0030: 3ffe8cbc 3ffeed6c 3fff15b4 0000003f
3fff0040: 00000038 3ffef060 3ffeefa0 402032cc
3fff0050: 3fff068c 40202578 3ffeefa0 3ffef060
3fff0060: 3fffdad0 00000000 3ffef058 402022c3
3fff0070: 3fffdad0 00000000 3ffef058 402038a0
3fff0080: feefeffe feefeffe 3ffef070 40100710
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(1,6)

ets Jan 8 2013,rst cause:4, boot mode:(1,6)

wdt reset

Please help ASAP..!!!

Thanks.

Re: reset causes|boot mode, list?

PostPosted: Thu Apr 05, 2018 11:39 pm
by Pablo2048
Did you try esp exception decoder as I told you on github? No one can tell you what is wrong with your code with so small amount of info so don't be lazy...

Re: reset causes|boot mode, list?

PostPosted: Thu Jun 06, 2019 2:41 am
by SandraRamirez
0ff wrote:No official list, but this is what I gathered from the boot loader (by looking at assembly code, so no warranty whatsoever!)
Code: Select all    reset causes:
        0:
        1: normal boot
        2: reset pin
        3: software reset
        4: watchdog reset

    boot device:
        0:
        1: ram
        3: flash


To read them after boot in code I use this:
Code: Select allstruct 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_  [url=https://essaydune.com/pay-for-essay/]pay for essay[/url] ram = flags.raw_bootdevice == 0x1;
    flags.bootdevice_flash = flags.raw_bootdevice == 0x3;
r/

    return flags;
}



Thanks for the list!