-
Notifications
You must be signed in to change notification settings - Fork 6
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
Check relevant pins for p0.flash() #95
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JensOgorek I reviewed and simplified the code a bit. This avoids code duplication for message handling. And I think we can simply use strstr
twice instead of reading and comparing the int level
. Maybe you can have a look and check if it does work as expected.
I tested it, it worked like before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I added another check for the correct number of flash arguments and extended the documentation just a tiny bit.
* Check relevant pins for p0.flash() (#95) * update: check relevant pins for bootloader * code review and simplification * update: added forceing flash, added disconnect before flashing * review --------- Co-authored-by: Falko Schindler <falko@zauberzeug.com> * add venv to ignores * Expander watchdog for documentation (#98) * updated docs * review --------- Co-authored-by: Falko Schindler <falko@zauberzeug.com> * auto-format BNO055 class --------- Co-authored-by: Falko Schindler <falko@zauberzeug.com> Co-authored-by: Pascal Schade <pascal@zauberzeug.com>
This is for #75
Before flashing, the p0.flash() call will set the GPIO0 to the correct state and check GPIO2 and GPIO12 on the p0 for their states.
GPIO0 and 2 are responsible for booting to the bootloader upon restart.
GPIO12 on low sets the flash voltage to 3.3V. On high, which sets it to 1.8V, it can cause issues when flashing.
The strapping register itself does not need to be checked in that stage of flashing. Since the configuration after the restart would be the relevant one, but then the p0 would be in bootloader mode, which we would not have to check and could not check.