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

Buggy shift register input on Field using arm-gcc 12.2 #631

Open
dromer opened this issue Jun 14, 2024 · 2 comments
Open

Buggy shift register input on Field using arm-gcc 12.2 #631

dromer opened this issue Jun 14, 2024 · 2 comments

Comments

@dromer
Copy link

dromer commented Jun 14, 2024

Yesterday I was experimenting with the latest 7.0.1 release and when using my system arm-gcc (12.2.1) the pad inputs with the shift register (CD4021) behave very erratic.

Pressing a single button results in many additional button presses and other buttons being triggered.
Reverting back to 10.2.1 the behavior is stable again.

More close inspection to what causes this glitching (and if other parts of the stack are affected) would be in order.

It would be great if we could move to newer GCC as having to rely on such an old version will get more annoying down the line.

@stephenhensley
Copy link
Collaborator

I recently experienced this without updating the compiler, but by updating an entire project to the latest libDaisy (it was a fairly old version of libDaisy that it started on, but the HAL drivers/GPIO refactor felt like the most likely to have caused slight timing issues.

I have since added the ability to externally set the amount of delay in ticks on the SR 4021 shift register, and increased the default. It seems like timing was barely on the edge of what was acceptable for the 4021 running at 3.3V (the datasheet only documents behavior down to 5V).
I may further increase the default over the next week or so as I have found a few other scenarios where the buttons work, but extraneous noise in the system could cause spurious button presses on things connected. The new setting I'm testing with seems extremely stable. I might be able to find some time to test this version on the latest compiler in the next week or so.

@dromer
Copy link
Author

dromer commented Oct 9, 2024

Oh interesting! I hope to get back to testing newer libDaisy+bootloader soon-ish and will try different compiler versions with that as well.

Should've saved an example patch/program for this ticket so I could reproduce.

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

No branches or pull requests

2 participants