Repository navigation
Cache the SDRAM once it is verified (cache=on) - #4
Merged
Merged
Conversation
The SDRAM window was Normal non-cacheable, non-bufferable for good: every access to it - module code, heaps, framebuffers - went over the 16-bit FMC bus, and the caches of a Cortex-M7 never helped. After the uncached check, dmfmc_port_cache_sdram() makes it write-back and checks it through the data cache (64 KiB of patterns cleaned to the SDRAM and read back, twice); when that fails the window stays uncached. cache=off keeps it uncached. Also: dmfmc_types.h includes the standard headers before dmdrvi_ioctl.h, which uses size_t without stddef.h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
dmfmc now caches the SDRAM once it is verified (
cache=on, the default).dmfmc_port_cache_sdram()makes it write-back (TEX=001 C=1 B=1);cache=offkeeps the SDRAM uncached.Also in this PR:
dmfmc_types.hincludesstdint.h,stdbool.handstddef.hbeforedmdrvi_ioctl.h. That header usessize_twithoutstddef.h; the dmdrvi fix is choco-technologies/dmdrvifix/ioctl-stddef.Requirements
fix/sync-copied-areashould be released together with this PR. With a write-back cache, the area PRESENT copies into the other buffer must be synced.feature/cortex-m7-caches).Testing
STM32F746G-DISCO, 8 MiB SDRAM, SDCLK 72 MHz, CAS 2, 16-bit bus:
030b002f);🤖 Generated with Claude Code