ESP32 does not start FW when powered up

Oh! Sorry… Here it is:

$ mos console
Using port /dev/cu.SLAB_USBtoUART
[Nov 26 10:45:19.676] i       j
[Nov 26 10:45:19.676] 
[Nov 26 10:45:19.677] rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
[Nov 26 10:45:19.677] configsip: 0, SPIWP:0xee
[Nov 26 10:45:19.677] clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[Nov 26 10:45:19.677] mode:DIO, clock div:1
[Nov 26 10:45:19.677] load:0x3fff0018,len:4
[Nov 26 10:45:19.677] load:0x3fff001c,len:6340
[Nov 26 10:45:19.677] load:0x40078000,len:9652
[Nov 26 10:45:19.677] ho 0 tail 12 room 4
[Nov 26 10:45:19.677] load:0x40080400,len:7056
[Nov 26 10:45:19.677] entry 0x40080748
read err read /dev/cu.SLAB_USBtoUART: file already closed
Command completed.

Does “POWERON_RESET” mean the chip should reset and boot at power up?

" rst:0xNN (REASON) is an enumerated value (and description) of the reason for the reset. A mapping between the hex value and each reason can be found in the ESP-IDF source. The value can be read in ESP32 code via the get_reset_reason() ROM function."
From https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#boot-mode-message

[quote=“fbritop, post:4, topic:1056, full:true”]
I think the definitely solución is to delay in 1 or 2 seconds the wifi start from the library. That should avoid the initial peak current at boot.[/quote]

How did you do this? I tried to disable wifi entirely by commenting out the proper references in the mos.yml but it still started wifi.

Haven’t done it. I not a C expert and it is not possible, up to what I understand, to do it in MJS. Today powering up from USB directly failed for the first time inside the lab device

I managed to delay the wifit at start. No luck. There is still a voltage spike that hangs the boot.

From what I can tell, the wifi starts before my init function is called. I tried a delay as the first thing in the init function but, as expected, it didn’t help. I tried commenting out all the wifi related libraries in the mos.yml but it still seems to be starting wifi on power up.

Given it boots correctly when I plug the USB into a 2,1A wall wart I believe this is a power issue. If I can figure out how to start it without BLE or wifi I think we can lick this.

Oh, this happens if I use Mongoose or just Arduino, so I guess its not Mongoose related.

Still having this problem. Anyone have any other ideas?

I have no trouble at all now. For what I saw: Using VIN connectors, you should really check for loose connections, dupont cables are not reliable. WHen using USB, for lack of space I was using a custom built connector, but it somewhere had a voltage leak, when using a direct USB connection from an adapter, there is no problem at all. Also check that the DC adapter, gives full current at startup and does not have any current leak at initial power up

I put a 30uF cap across Vin and it now occasionally works. I have some bigger caps on order, so I’ll try a 100uF.

Nope, even a 100uF cap didn’t make it work.

I had a similar problem problem, but not as bad, I ended up putting a timer delay in some of my code for a few seconds.
Btw how do you delay the wifi connection?