boot.py not executed

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
ttmetro
Posts: 104
Joined: Mon Jul 31, 2017 12:44 am

boot.py not executed

Post by ttmetro » Wed Aug 02, 2017 11:23 pm

boot.py and main.py are not executed on power up (or reset) after connecting an external part to the I2C bus of a HighLetgo ESP32 development board. Connecting through USB works, and I can then run boot.py manually without errors. Other than this boot issue, I2C communication works.

Does someone have insights into the powerup/boot process of the ESP32?

[b]Update 1:
[/b]Further tests reveal that it's not a power issue.
If I have anything connected to the I2C bus (e.g. INA219), boot.py and main.py will not be executed upon reset.

[b]Update 2:
[/b]Solved. See my own reply.
Last edited by ttmetro on Sat Aug 05, 2017 6:49 pm, edited 1 time in total.

ttmetro
Posts: 104
Joined: Mon Jul 31, 2017 12:44 am

Re: boot.py not executed

Post by ttmetro » Sat Aug 05, 2017 6:47 pm

Solved: SDA inadvertently shared with safe boot mode --> I2C pull-ups put firmware into safe boot mode that bypasses boot.py. Changed safe boot mode to different pin.
Bernhard Boser

User avatar
honestcomrade
Posts: 3
Joined: Wed Jul 19, 2017 4:28 am

Re: boot.py not executed

Post by honestcomrade » Tue Aug 22, 2017 2:30 pm

how did you change the safe boot mode pin?

ttmetro
Posts: 104
Joined: Mon Jul 31, 2017 12:44 am

Re: boot.py not executed

Post by ttmetro » Tue Aug 22, 2017 6:25 pm

It's set in mpconfigboard.h.
Bernhard Boser

eddo888
Posts: 1
Joined: Sat Apr 23, 2022 10:36 am

Re: boot.py not executed

Post by eddo888 » Sat Apr 23, 2022 10:38 am

for the ludites out there, how do i make it boot on external power ?

marcidy
Posts: 133
Joined: Sat Dec 12, 2020 11:07 pm

Re: boot.py not executed

Post by marcidy » Sun Apr 24, 2022 1:33 am

microcontrollers boot when they have power, and all power is external to the microcontroller. Do you mean not using a USB cable? As long as you are properly providing power to any of the power pins, the microcontroller will start and begin execution.

There are special cases when certain pins, called strapping pins, are held in certain states during power on which changes the boot process.

It's not really clear if you are having a specific issue or just asking a general question.

Post Reply