-
-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Partially revert #18940 for Ploopy Thumb Trackball #18943
Conversation
I don't understand why this needs to be done. Could you elaborate? |
These pins are directly wired to ground. And from I understand, should not be left floating. |
If they're directly connected to GND then they're not floating :) |
I still don't understand this. I think it should probably be reverted. |
I did the following for the Madromys mouse:
This subroutine isn't strictly necessary for Madromys (or the Thumb, wrt to the functionality that @drashna restored via this PR) to function. However, if it's left out and somebody drives one of these pins (presumably by accident), the MCU will experience a fatal overcurrent situation. |
This sounds like bad PCB design, to be quite honest. I'm not a fan of the bandaid fix in software... |
Design is about tradeoffs; this is one such occasion. MCUs like the 32u4 suffer from an interesting problem. Due to the fact that they are missing dedicated grounding pads underneath the chip, they are only grounded through dedicated ground pins. This is problematic because insufficient grounding can lead to numerous issues such as ground loops, floating ground, and excessive EMI. In the worst case scenarios, currents can flow backwards through the chip. By grounding additional, unused GPIO pins, the grounding load on the very few dedicated ground pins is relaxed. The tradeoff is that poorly written firmware can cause the chip to go into an overcurrent situation. I think of my design choice as similar to adding seatbelts to cars. Yes, car crashes with seatbelts being used can result in neck injuries. Car crashes without them result in ejections. |
I'm sure this is fine if you are the only one in control of the firmware, as is the case for most other device manufacturers... but this is QMK, where the whole point is that the user can do pretty much whatever they want. |
You're correct in that the open-source nature of the firmware means that users can do whatever they want, but that means that there is no electrical topology that guards against mistakes. Even if I removed the additional grounding, users writing bad firmware could still find ways of destroying the MCU. Removing code that tries to safeguard the MCU because users might ignore or delete it anyways is setting users up for failure. I can't force you to sign off on this review. It's ultimately your choice. In the same vein, the board design is my choice. I supply firmware and a fork for it, which includes these guardrails. I've given my opinion; I won't weigh in anymore. |
Description
As title.
Types of Changes
Checklist