Boot usb / Vin

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
pitchout
Normal user
Posts: 34
Joined: 13 Oct 2021, 19:57

Boot usb / Vin

#1 Post by pitchout » 22 Mar 2022, 08:40

hello team esp. I would like to understand why some .bin esp32 are ok to flash, start well in USB, but once powered by Vin does not boot? Some versions are OK, others are not. Thank you

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Boot usb / Vin

#2 Post by Ath » 22 Mar 2022, 09:16

Assuming you tested on the same hardware unit, what images do not boot, and which do?
When using different hardware, check out the serial chip used, as some pull gpio 0 or reset to low when not powered via USB...

NB: When flashing via USB, you need to use the -factory.bin image (at address 0), when flashing via Tools/Update Firmware button, the .bin file without factory in the name should be used.
/Ton (PayPal.me)

pitchout
Normal user
Posts: 34
Joined: 13 Oct 2021, 19:57

Re: Boot usb / Vin

#3 Post by pitchout » 22 Mar 2022, 09:41

I specify that if I feed the esp with a usb it does not boot either. The usb must make use of communication.

soft for flashing :
flash download tool 3.9.0

ESP_Easy_mega_20201227_test_ESP32-wrover-kit_4M316k OK

the mcprange xxx function is not working and I need it. That good boot on Vin
but if i flash with newer versions 24122021 or 05102021 no boot on Vin

Image

How to reset all the esp ? when i flashed the esp32 ... espeasy is the same bud with new version....I want to try to 000000. thank u

sorry for my english ;-)
Attachments
Snag_14df18e2.png
Snag_14df18e2.png (53.95 KiB) Viewed 5757 times

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Boot usb / Vin

#4 Post by Ath » 22 Mar 2022, 10:31

I'd advise to use a more recent version of ESPEasy, get it from here or use the Web-flasher (still has a somewhat older release), that will include the factory.bin files for ESP32, that should be flashed at address 0x0, and not be accompanied with the bootloader, app and partition .bin files, as these are correctly included in the factory part by the build system.

You may also want to check stability of the power supply, as ESP32 is rather sensitive to brown-outs, by variations in power supply during boot. You will need an oscilloscope or similar device to verify that, a multimeter can not measure the stability, only the average voltage. Sometimes, changing the USB cable for a better quality one is enough, sometimes you need to add a 100 nF capacitor and a 10 uF electrolytic capacitor (watch the polarity) in parallel from VCC to GND close to the ESP unit, to stabilize it. Especially the boot process may need this extra stability, as it activates the WiFi.
/Ton (PayPal.me)

pitchout
Normal user
Posts: 34
Joined: 13 Oct 2021, 19:57

Re: Boot usb / Vin

#5 Post by pitchout » 22 Mar 2022, 11:54

Thanks for his advice. What I don't understand is that some versions (one or two) are OK directly... others don't work in Vin (USB OK). My esp is plugged into a PCB powered by an LM2596 and equipped with capa. I'm still going to check with the oscilloscope but I don't believe it ;-)

another strange thing, why with the PCB powered (V in) and USB connected, it does not boot either! I also specify that I only used free GPIOs.
Image
Attachments
2022-03-22_12-12-07.jpg
2022-03-22_12-12-07.jpg (403.82 KiB) Viewed 5743 times

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Boot usb / Vin

#6 Post by Ath » 22 Mar 2022, 12:58

Can you list the names of the .bin files that won't boot your ESP, please?
/Ton (PayPal.me)

pitchout
Normal user
Posts: 34
Joined: 13 Oct 2021, 19:57

Re: Boot usb / Vin

#7 Post by pitchout » 22 Mar 2022, 13:06

I think I found ... I removed the resistors on GPIO4 and GPIO5 for I2C communication and it starts!

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Boot usb / Vin

#8 Post by Ath » 22 Mar 2022, 14:01

Ah, great you found it. Most likely the PCF or MCP board already has pull-up resistors on board, so adding more might cause issues, indeed.
/Ton (PayPal.me)

pitchout
Normal user
Posts: 34
Joined: 13 Oct 2021, 19:57

Re: Boot usb / Vin

#9 Post by pitchout » 22 Mar 2022, 18:10

It's very strange because I based myself on diagrams found on the net! and many make use of a pullup resistor! ;-) Thank you for the help.Image
Attachments
2022-03-22_18-08-51.jpg
2022-03-22_18-08-51.jpg (258.12 KiB) Viewed 5731 times

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Boot usb / Vin

#10 Post by ThomasB » 22 Mar 2022, 20:22

Not booting from Vin is an issue that affected some ESP8266 variants. So not surprised to hear that the ESP32 is fussy too.

Although your ESP32's Vin boot failure may be different, here's a discussion from last year on ESP8266 boot failure:
viewtopic.php?p=53664

That discussion should give you a sense of how frustrating this issue can be. Hacking ESP boards is probably the only remedy, just as you discovered.

- Thomas

TD-er
Core team member
Posts: 8754
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Boot usb / Vin

#11 Post by TD-er » 23 Mar 2022, 00:39

Be careful to draw conclusions based on booting and build version.
Especially on ESP32 there is a huge difference between cold boot and warm boot (cold boot is power disconnected)

Please always use the -factory.bin file as those have the same bootloader as was the actual version when it was built.
When performing an OTA update, the bootloader may not be updated, so there is a rather big difference between serial flash and OTA update.

Post Reply

Who is online

Users browsing this forum: No registered users and 89 guests