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

name the button correctly, allow to choose from ISP or PLAY button #5

Merged
merged 1 commit into from
Dec 26, 2017

Conversation

hg42
Copy link
Contributor

@hg42 hg42 commented Dec 25, 2017

It's a minor thing, but it cost me some time (I never used this mode, because it never worked and sdcard method did, but now I have to).
So I want to change this, in case someone else might get into the same trouble.

If I don't miss something the button to jump into dfu mode was changed without renaming the name in main.c.
This PR fixes the name to say what it does and allows to choose between ISP and PLAY button, which both works.

Note, I have an early Smoothieboard v1.0 (the one with A498x drivers) so I am not totally sure if it has a different pinout, but these pages at least show the same pins for those buttons:
http://smoothieware.org/smoothieboard-v1-old
http://smoothieware.org/pinout

@triffid triffid merged commit 5f98918 into triffid:develop Dec 26, 2017
@triffid
Copy link
Owner

triffid commented Dec 26, 2017

Fwiw, ISP button can't be used for DFU because if ISP is held when coming out of reset, the chip's built-in serial bootloader is activated and this code can't run.

After startup, the pin can be used as ordinary GPIO, which is why we use it to trigger debug mode in smoothie proper as there's a button on it already.

It's theoretically possible to press the button after the on-chip bootloader checks the pin but before this code does, but that's a very tight window to hit.

@hg42
Copy link
Contributor Author

hg42 commented Dec 26, 2017

Thanks for merging.

I only added the isp button as a way to document, it could theoretically be used (which was told to several people over the years) and that it is not used currently, but the play button. At least it was used at the beginning. Also it might not be obvious why the isp_btn_pressed was named as such before.

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