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

drv/stm32h7-fmc-demo: ill-advised memory controller #1662

Merged
merged 1 commit into from
Mar 18, 2024
Merged

Conversation

cbiffle
Copy link
Collaborator

@cbiffle cbiffle commented Mar 15, 2024

This is an exercise fixture for the PSRAM mode of the Flexible Memory Controller on the STM32H7, for evaluating FPGA interface options. It lets you do many ill-advised things via IPC. They all appear to work, no matter what the datasheet implies.

Good luck!

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

this is deeply disquieting :)

let ptr = addr as *mut u16;
unsafe { ptr.write_volatile(value) }
Copy link
Member

Choose a reason for hiding this comment

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

hahahahha, whew :D

_msg: &RecvMessage,
addr: u32,
) -> Result<u16, RequestError<Infallible>> {
let ptr = addr as *const u16;
Copy link
Member

Choose a reason for hiding this comment

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

presumably pointer provenance would eventually prefer us to use ptr::from_exposed_addr for ... all of these shenanigans, but that's not real yet...

Copy link
Contributor

@nathanaelhuffman nathanaelhuffman left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for getting this set up!

This is an exercise fixture for the PSRAM mode of the Flexible Memory
Controller on the STM32H7, for evaluating FPGA interface options. It
lets you do many ill-advised things via IPC. They all appear to work, no
matter what the datasheet implies.

Good luck!
@cbiffle cbiffle enabled auto-merge (rebase) March 18, 2024 23:05
@cbiffle cbiffle merged commit 72a96ab into master Mar 18, 2024
83 checks passed
@cbiffle cbiffle deleted the cbiffle/fmc-demo branch March 18, 2024 23:20
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.

None yet

3 participants