Repository navigation
Flash at 120 MHz (needs the bootloader flashed once over serial) - #33
Merged
Merged
Conversation
Code outside the cores' PSRAM overlay runs from flash (80 MHz QIO), so each cache miss there now costs a third less. Measured on the Tab5 with the same code at 80 and 120 MHz (game thread CPU per presented frame): Jedi Knight -17% (36.4 -> 40.3 fps at the menu), MSX / Doom / NES -4%, Genesis -3%, GBA -2%, SMS -2%, MGS +3% fps (10.3 -> 10.6), SNES unchanged; no RAM cost. The Tab5's flash (XMC, ID 0x464018) enters its high-performance mode by changing the read dummy cycles: SPI_FLASH_HPM_ENA (ESP-IDF's DC mode for it) and BOOTLOADER_FLASH_DC_AWARE, without which the chip may not boot after a reset. Over-USB updates only replace the app, so the bootloader is flashed once over serial (README). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The flash runs at 120 MHz instead of 80 MHz.
The Tab5's flash is an XMC part (ID 0x464018). It enters its high-performance mode by changing the read dummy cycles, so it needs:
CONFIG_SPI_FLASH_HPM_ENA. ESP-IDF's DC mode for this chip turns on with it:SPI_FLASH_HPM_DC_ON.CONFIG_BOOTLOADER_FLASH_DC_AWARE. Without it the chip may not boot after a reset.Over-USB updates only replace the app, so the bootloader has to be flashed once over serial with
idf.py flash;emulink reboot --bootloaderputs the Tab5 in download mode without the BOOT button. The README says so.Measurements (Tab5, the same code built for 80 and 120 MHz)
There is no RAM cost.
Testing
idf.py reconfigure).🤖 Generated with Claude Code
https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY