Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUKU run the GPIO detection at least once even if UF2_DETECTION_DELAY… #344

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

SukuWc
Copy link
Contributor

@SukuWc SukuWc commented Aug 17, 2023

Description of Change

  • UF2_DETECTION_DELAY_MS is useful to allow ESP32 boards that only have a button on BOOT0 pin to use both ROM bootloader and UF2 bootloader.
  • If however the board uses separate gpio for UF2 detect button, then this just slows down the boot procedure. I this case I wanted to set UF2_DETECTION_DELAY_MS to zero so that uf2 bootloader is only activated if the button was pressed before power on!
  • In the gpio detection logic the while statement never evaluated true because more than 0 ms has already passed, making it impossible to enter bootloader mode!
  • Do ... while syntax allows the detection logic to run at least once regardless of the UF2_DETECTION_DELAY_MS value!

Copy link
Member

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look good, thank you

@hathach hathach merged commit 0b2bc46 into adafruit:master Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants