Repository navigation
Mux the STM32F746G-DISCO SDRAM pins one GPIO port at a time - #5
Merged
Merged
Conversation
sdram.ini configured each of the 40 SDRAM pins in its own dmgpio section, although they all share the same settings (AF12, maximum speed, push-pull). Every section is a separate driver node that dmdevfs configures on its own - ~4 ms each on dmod-boot. The pins are now grouped into one section per GPIO port (C, D, E, F, G, H, I) with a pins= bitmask, the same way the LCD pins are configured in dmlcdtft's lcd.ini; the signal of every pin is kept in a comment above its port. The set of pins is unchanged (40 pins, checked against the old file), and so is the [sdram] section. dmod-boot in Renode: the SDRAM is up at 332 ms instead of 631 ms, /dev mounted at 957 ms instead of 1292 ms, shell prompt at 1238 ms instead of 1558 ms; dmdevfs configures 52 nodes instead of 85. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V9XGvT9zLJVAagoEVhYh9T
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.
Problem
configs/board/stm32f746g-disco/sdram.iniconfigured each of the 40 SDRAM pins in its owndmgpiosection. All 40 sections had exactly the same settings: AF12,mode=alternate,speed=maximum,output_circuit=push_pull,driver_order=-9.Every section becomes a separate driver node that dmdevfs configures on its own, which costs ~4 ms per pin on dmod-boot.
Change
The pins are now grouped into one section per GPIO port:
sdram_port_c…sdram_port_i, 7 sections in total. Each section selects its pins with apins=bitmask, the same way dmlcdtft'slcd.iniconfigures the LCD pins.pins0x00080xC7030xFF830xF83F0x81330x00280x0030[sdram]section is byte-identical.Measured on dmod-boot (Renode, STM32F746G-DISCO, virtual time)
Measured with this exact
sdram.iniin dmod-boot's config filesystem; everything else unchanged./devmountedFMC: SDRAM bank 1 configured at 72000000 Hz (CAS=2, width=2 bytes), and the SDRAM heap is registered (8 MiB).Together with choco-technologies/dmlcdtft#6 (display configured right after the SDRAM), the splash should come up at about 0.4 s. I did not measure that combination.
🤖 Generated with Claude Code
https://claude.ai/code/session_01V9XGvT9zLJVAagoEVhYh9T
Generated by Claude Code