ESP32 - Disable Wifi and BLE causes infinite reboot

Posted on
  • Looks like if I disable BLE and disable Wifi, the ESP32 goes into an infinite reboot loop.

    >ESP32.enableBLE(0)
    ...
    // normal reboot
    ...
    
    >ESP32.enableWifi(0)
    Erasing saved code.
    Done!
    ets Jun  8 2016 00:22:57
    rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0018,len:4
    load:0x3fff001c,len:2668
    load:0x40078000,len:7304
    load:0x40080000,len:5312
    entry 0x40080274
    E (545) spiram: SPI RAM enabled but initialization failed. Bailing out.
    WARNING: Bluetooth is disabled per ESP32.enableBLE(false)
    Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.
    Core 0 register dump:
    PC      : 0x400d8b18  PS      : 0x00060b30  A0      : 0x800d915b  A1      : 0x3ffde6c0
    A2      : 0x00000001  A3      : 0x00001e78  A4      : 0x00001000  A5      : 0x00000000
    A6      : 0x3ffc40cc  A7      : 0x3ffd6934  A8      : 0x00000000  A9      : 0x00000001
    A10     : 0x00000000  A11     : 0x0001e780  A12     : 0x00000005  A13     : 0x00000000
    A14     : 0x00000000  A15     : 0x0003ffff  SAR     : 0x00000019  EXCCAUSE: 0x0000001d
    EXCVADDR: 0x0000000e  LBEG    : 0x4009b418  LEND    : 0x4009b423  LCOUNT  : 0xffffffff
    Backtrace: 0x400d8b18:0x3ffde6c0 0x400d9158:0x3ffde6e0 0x400f85e5:0x3ffde700
    Rebooting...
    
    // and this goes on...
    

    Only way to recover is to erase + reflash the ESP32.

    Tested with 2v01 and 2v04 with two boards:

    Ran into this earlier, just ignored... The Chip running hot on blink sketch thread was the final push to re-test this again.
    Can someone else confirm this? Any idea how to fix?

  • Hello.

    Played with a same devboard, got an infinite loop in the same way. But.. How I can reflash it to a normal stage? Did reflash with

    esptool.py  --chip esp32 --port COM7 --baud 921600 --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size=detect 0x1000 bootloader.bin 0x8000 partitions_espruino.bin 0x10000 espruino_esp32.bin
    

    and got the same loop after reflash.
    Did this:

    esptool.py  --chip esp32 --port COM7 --baud 921600 --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size=detect 0x100000 blank64KB.bin
    

    and got another halt about no booting partition

    ets Jun  8 2016 00:22:57
    rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0018,len:4
    load:0x3fff001c,len:2668
    load:0x40078000,len:7304
    load:0x40080000,len:5312
    entry 0x40080274
    E (29) boot: ota data partition invalid, falling back to factory
    E (520) esp_image: Checksum failed. Calculated 0x4 read 0xb5
    E (520) boot: Factory app partition is not bootable
    E (520) esp_image: image at 0x160000 has invalid magic byte
    E (524) boot: OTA app partition slot 0 is not bootable
    E (529) boot: No bootable app partitions in the partition table
    Fatal exception (0): IllegalInstruction
    epc1=0x400802bc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
    

    with "Unable to retrieve board information. Connection Error?" IDE message, that thing went into the same loop after reflashing with the first full flash command again.

    I got this form ESP32 page.

    If the save() area contains something that crashes Espruino or otherwise doesn't let you reset the system you can disable whatever is saved by flashing blank.bin to 0x100000.

    I hope there can be a way to erase bt off command from the board.

    UPD: Googled and looks like it's ok to erase_flash and reflash. Did so and everything works ok. Did a read_flash into file, took 16777216 bytes. So, looks like BT is in can't use and can't disable situation.

  • Yes, have to fully erase the flash.
    Btw: Tried to dig into this, but I have no idea how to fix.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

ESP32 - Disable Wifi and BLE causes infinite reboot

Posted by Avatar for AkosLukacs @AkosLukacs

Actions