Skip to content

Add configurable LCD SPI speed via system menu#171

Merged
sastraxi merged 1 commit into
TreeFallSound:pistomp-v3from
sastraxi:feat/lcd-speed-standalone
Jun 10, 2026
Merged

Add configurable LCD SPI speed via system menu#171
sastraxi merged 1 commit into
TreeFallSound:pistomp-v3from
sastraxi:feat/lcd-speed-standalone

Conversation

@sastraxi

@sastraxi sastraxi commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

The ILI9341 controller runs reliably above spec — 56 MHz has been tested stable, cutting full-panel refresh from 80ms to 30ms. This PR makes the SPI clock user-selectable (24/48/56/80 MHz) via System Menu → LCD Speed; the choice is persisted in settings and applied at startup.

The polling divisor in the main loop auto-adjusts so LCD polling tracks somewhat-closely with actual refresh time. Additionally, the ADC SPI speed is set based on the LCD speed; experimental settings set it to the spec (1 MHz) while the base setting maintains the existing 240 kHz value (tested on actual hardware).

User-selectable SPI clock (24/48/56/80 MHz) persisted in settings.
poll_divisor auto-adjusts so LCD polling tracks actual refresh time.
Defaults to 24 MHz (ILI9341 spec); 56 MHz tested stable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sastraxi sastraxi requested a review from rreichenbach June 9, 2026 22:39

@rreichenbach rreichenbach left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine. I'm seeing footswitch refresh glitches similar as on #170 but this is probably unrelated to this changeset. I see the same thing regardless of the frequency set.

Would be nice if we had a MessageDialog class that allowed hiding the OK button. Not a big deal though.

@sastraxi sastraxi merged commit 1e2416c into TreeFallSound:pistomp-v3 Jun 10, 2026
1 check passed
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