RfidResearchGroup / proxmark3

Iceman Fork - Proxmark3
http://www.icedev.se
GNU General Public License v3.0
3.89k stars 1.03k forks source link

Ignore button jitters in bootloader mode #2229

Closed wh201906 closed 9 months ago

wh201906 commented 9 months ago

Commit 51e4df533e79399fef1672325d2ec57fdcc27986 changed the button behavior, but it doesn't work on my Proxmark3 Easy. I think it's caused by the jitter (bounce) when pressing/releasing the button.

wh201906 commented 9 months ago

I guess RDV4 has a debouncing capacitor so it's a little bit harder to find this bug.

iceman1001 commented 9 months ago

If this is a hardware design issue, will it be on all button pressed calls? if so maybe we would need to fix it, and guard it with DEFINES.

wh201906 commented 9 months ago

If this is a hardware design issue, will it be on all button pressed calls?

I‘m not sure but I guess it will. The BUTTON_PRESS() only checks the register state. It cannot handle the jitter.

and guard it with DEFINES

The software solution of debouncing is compatible with the hardware solution, so I guess it's not necessary.

iceman1001 commented 9 months ago

You are missing the point,
all calls to BUTTON_PRESS() , will it suffer from the jitter in the normal device side application? Your fix is for bootloader only.

wh201906 commented 9 months ago

will it suffer from the jitter in the normal device side application?

Yes

Your fix is for bootloader only.

I know. I didn't change the whole BUTTON_PRESS() because it involves a lot of code, and it works fine in most of the time. I think the BUTTON_PRESS() is mostly used for quitting a running process, so it doesn't matter if the jitter occurs.