Can't get ESP32 WROOM to work with any example

maaaft
Posts: 5
Joined: Sun Mar 12, 2017 5:52 pm

Can't get ESP32 WROOM to work with any example

Postby maaaft » Sun Mar 12, 2017 6:22 pm

Hi,

i spent the last couple of days trying to get any of the ESP32 Arduino examples to work. I got a ESP32 WROOM module on a simple breakout board. Connecting through standard USB->serial bridge. Circuit is very basic: EN pin connected via 22k to 3.3V, external power supply set to 3.3V, bunch of buffer capacitors, buttons for RST and GPIO0 on the breakoutboard.

Breakoutboard: https://eckstein-shop.de/media/image/pr ... module.jpg

Im using the latest sources from https://github.com/espressif/arduino-esp32 with latest Arduino Studio 1.8.1.

Doesn't matter which example i upload to the ESP32 - none of them work. Here is the Output from the WiFiScan example:

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0008,len:8
load:0x3fff0010,len:2016
load:0x40078000,len:7780
ho 0 tail 12 room 4
load:0x40080000,len:252
entry 0x40080034
Guru Meditation Error of type IllegalInstruction occurred on core  1. Exception was unhandled.
Register dump:
PC      : 0x400e15a5  PS      : 0x00060f30  A0      : 0x800dfe94  A1      : 0x3ffc93f0  
A2      : 0x3ffc2c90  A3      : 0x3ffc9440  A4      : 0x00000064  A5      : 0x00000018  
A6      : 0x3ffc13a0  A7      : 0x00060320  A8      : 0x800e1597  A9      : 0x3ffc93b0  
A10     : 0x00000000  A11     : 0x3ffc9440  A12     : 0x3ffc8bf8  A13     : 0x00000000  
A14     : 0x00000001  A15     : 0x00060323  SAR     : 0x0000001f  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  

Backtrace: 0x400e15a5:0x3ffc93f0 0x400dfe94:0x3ffc9420 0x400da91b:0x3ffc9440

CPU halted.
ExceptionDecoder Output:

Code: Select all

0x400e15a5: sys_arch_mbox_fetch at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/port/freertos/sys_arch.c line 450
0x400dfe94: sys_timeouts_mbox_fetch at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/core/timers.c line 551
0x400da91b: tcpip_thread at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/api/tcpip.c line 473
When im flashing the ESP32 with code which does for example only Serial.println("....") everything works like a charm. But as soon as i add ANY WiFi or Bluetooth functionality, the ESP32 somehow crashes. I have stumbled across any possible Guru Mediation Error so far, sometimes the errors even appear to be random (every reset may results in a different error).

Depending on the Guru Mediation Error the ESP32 draws from 0.11A to 0.39A when halted and gets a little bit warm.

I can assure, that the external power supply is NOT the problem as mentioned in many other posts so far. (Can deliver up to 2A cont. @ 0-15V). Also i got plenty of ESP8266 modules laying around here which are working with the same setup.

Do you have any idea what might be the problem here? I am a little bit concerned about the first line of serial output
ets Jun 8 2016 00:22:57
which seems a little bit "outdated" to me. Might this be a problem?

Thanks in advance!
Last edited by maaaft on Mon Mar 13, 2017 10:48 am, edited 1 time in total.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Can't get ESP32 WROOM to work with any example

Postby ESP_Angus » Mon Mar 13, 2017 7:11 am

Hi maaft,

That initial serial output is correct. This looks like a power supply/brownout problem. Things to check:
  • Does the 3.3V supply have enough current capacity (500mA leaves a good amount of safety margin.)
  • Are the power cables too long or too thin?
  • Are the capacitors sufficiently close to the module and sufficiently high enough value with low enough ESR?
If you can post some photos of your setup, this may help.

Angus

maaaft
Posts: 5
Joined: Sun Mar 12, 2017 5:52 pm

Re: Can't get ESP32 WROOM to work with any example

Postby maaaft » Mon Mar 13, 2017 10:46 am

Hi Angus,

the power supply can deliver up to 2A @ 0-15V and is set to ~3.33V.
IMAG0144.jpg
Power supply
IMAG0144.jpg (1.48 MiB) Viewed 21176 times
Setup on breadboard is following: (Caps are 470uF and 100nF)
IMAG0145.jpg
Breadboard setup
IMAG0145.jpg (2.6 MiB) Viewed 21176 times
I also tried to solder the power pins directly to the power supply. Doesn't help. As i also tripple checked all solder pins of the ESP32 i think we can exclude any brownout issues. Also all my ESP8266's are happy with my setup.

This is the circuit:
esp32.png
Circuit
esp32.png (10.07 KiB) Viewed 21176 times
Any further ideas? :)

Best regards!

Hans Dorn
Posts: 62
Joined: Tue Feb 21, 2017 2:21 am

Re: Can't get ESP32 WROOM to work with any example

Postby Hans Dorn » Tue Mar 14, 2017 11:18 pm

Electrolytics are rather slow

Try adding a 2.2µ film capacitor to your power rail.

Image

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Can't get ESP32 WROOM to work with any example

Postby ESP_Angus » Wed Mar 15, 2017 3:15 am

To expand on Hans' answer, if you can solder a low ESR capacitor (ceramic or film or something else) very close to the power pins on the PCB then this may help - the combined resistance of the cables and the high ESR caps may not be responding fast enough to the current draw.

Similarly, if you can watch the voltage at the PCB end on an oscilloscope then you may see something helpful.

Angus

maaaft
Posts: 5
Joined: Sun Mar 12, 2017 5:52 pm

Re: Can't get ESP32 WROOM to work with any example

Postby maaaft » Wed Mar 15, 2017 7:11 pm

As suggested i tried again with one of those WIMA 2.2µF caps (see picture from Hans) directly soldered to the power pins of the ESP32. Unfortunately this didn't make any difference either - i still get the exact same error message from my initial post.

I'll bring the ESP32 to the Lab tomorrow and hook it up to the oscilloscope. Maybe this will help to bring light into the darkness..

Is it normal, that the ESP32 draws around 0.32A when halted on IllegalInstruction error? Seems quite a lot for me.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Can't get ESP32 WROOM to work with any example

Postby ESP_Angus » Thu Mar 16, 2017 2:50 am

maaaft wrote: Is it normal, that the ESP32 draws around 0.32A when halted on IllegalInstruction error? Seems quite a lot for me.
That seems high by a factor of ten. Maybe there's a problem with the hardware module you have?

If you hold the chip in reset via the EN button, what is the current draw?

maaaft
Posts: 5
Joined: Sun Mar 12, 2017 5:52 pm

Re: Can't get ESP32 WROOM to work with any example

Postby maaaft » Thu Mar 16, 2017 7:58 pm

Hi Angus,

i didnt have time today at work to measure the module with the oscilloscope so i will try again tomorrow.

While i was going to measure the EN-Reset current i noticed that the error type now changed from IllegalInstruction to InstrFetchProhibited with following output:

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0008,len:8
load:0x3fff0010,len:2016
load:0x40078000,len:7780
ho 0 tail 12 room 4
load:0x40080000,len:252
entry 0x40080034
Guru Meditation Error of type InstrFetchProhibited occurred on core  0. Exception was unhandled.
Register dump:
PC      : 0x00000000  PS      : 0x00060b30  A0      : 0x8008bf46  A1      : 0x3ffce850  
A2      : 0x3f400a30  A3      : 0x3ffc6e12  A4      : 0x00000008  A5      : 0xffffffe8  
A6      : 0xffffffa3  A7      : 0x3ffc2590  A8      : 0x00000000  A9      : 0x3ffce860  
A10     : 0x00000000  A11     : 0x00000002  A12     : 0x5fff0007  A13     : 0x00000000  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000005  EXCCAUSE: 0x00000014  
EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0x00000000  

Backtrace: 0x00000000:0x3ffce850 0x4008bf46:0x3ffce870 0x40088ef5:0x3ffce8b0 0x40089e7d:0x3ffce8e0 0x4008a63f:0x3ffce900 0x4010a29c:0x3ffce920 0x4010a3eb:0x3ffce940 0x400ed779:0x3ffce960 0x400ed7b9:0x3ffce990 0x400edcda:0x3ffce9c0 0x40094c46:0x3ffce9e0

CPU halted.
ExceptionDecoder Output:

Code: Select all

0x4008bf46: write_txrate_power_offset at ?? line ?
0x40088ef5: set_tx_gain_table at ?? line ?
0x40089e7d: bb_init at ?? line ?
0x4008a63f: register_chipv7_phy at ?? line ?
0x4010a29c: esp_phy_rf_init at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/./phy_init.c line 150
0x4010a3eb: esp_phy_load_cal_and_init at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/./phy_init.c line 294
0x400ed779: wifi_hw_start at ?? line ?
0x400ed7b9: wifi_start_process at ?? line ?
0x400edcda: ieee80211_ioctl_process at ?? line ?
0x40094c46: ppTask at ?? line 
Used example is still WifiScan.

Current drawn at this exception (InstrFetchProhibited) is 116.1 mA.

As requested, the current drawn on EN-Reset is 0.335 mA.

maaaft
Posts: 5
Joined: Sun Mar 12, 2017 5:52 pm

Re: Can't get ESP32 WROOM to work with any example

Postby maaaft » Mon Mar 20, 2017 6:25 pm

Now i have the results from the oscilloscope: No voltage drop at all - same error.

Do i have a faulty module? Should i return it to my reseller? Any other ideas what to do?

Are the measurements from my previous post in spec?

Thanks in advance!

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: Can't get ESP32 WROOM to work with any example

Postby ESP_igrr » Wed Mar 22, 2017 2:27 pm

The numbers look reasonable, and the point where the crash happens indicates that this issue is indeed caused by current spike during RF power calibration (set_tx_gain_table). There is a chance that there is a bad solder joint somewhere, or indeed the wires from the module to the voltage regulator are too long. Most development boards have the regulator less than an inch from the module, which doesn't seem to be the case in the photo you have posted above.

Who is online

Users browsing this forum: No registered users and 116 guests