I have downloaded the latest ARduino IDE 1.8.2 and installed the github ESP32-Arduino files ... I tried the WiFiscan example and it fails in the same way as it does in PlatformIO... code uploads fine via the Arduino IDE but when executed this happens:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
mode:DIO, clock div:1
Guru Meditation Error of type IllegalInstruction occurred on core 1. Exception was unhandled.
PC : 0x400e129e PS : 0x00060b30 A0 : 0x800dfb20 A1 : 0x3ffcd3e0
A2 : 0x3ffc2ca4 A3 : 0x3ffcd430 A4 : 0x00000064 A5 : 0x0000002e
A6 : 0x3ffc13a8 A7 : 0x00060b20 A8 : 0x800e129b A9 : 0x3ffcd3a0
A10 : 0x00000000 A11 : 0x3ffcd430 A12 : 0x3ffccbf0 A13 : 0x00000000
A14 : 0x00000001 A15 : 0x00060b23 SAR : 0x00000000 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x400e129e:0x3ffcd3e0 0x400dfb20:0x3ffcd410 0x400da573:0x3ffcd430
I also tried another ESP32S module which has the same results.
I also tried the blink example for IO13 and that works fine.
I then tried other WiFi examples under ESP32 and they all fail the same way.
Ran across another thread that suggested erasing the device flash using the esptool... I tried that but still have the same results...
I have resolved the issue! Turns out this module is hyper sensitive to the power supply, especially when using the high current peripherals like WiFi or Bluetooth. My benchtop supply was set for 3.2V and giving the previous resulting errors when trying to use WiFi... once I set the output to above 3.3V (I'm using 3.5V) the module is successfully intializing the WiFi module and running the WiFiscan example with no issues.