Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Documentation
stm32h7-fmc
Hardware Abstraction Layer for Flexible Memory Controller (FMC) on STM32H7
Currently only SDRAM functions are implemented.
This crate depends on the GPIO, Clock and Delay functionality from stm32h7xx-hal
SDRAM
The H7 supports up to 2 external SDRAM devices. This library currently only supports 1, although it may be on either bank 1 or 2.
IO Setup
IO is constructed by configuring each pin as high speed and assigning to the FMC block (usually AF12).
let pa0 = gpioa.pa0.into_push_pull_output
.set_speed
.into_alternate_af12
.internal_pull_up;
Then contruct a PinSdram type from the required pins. They must be specified in the order given here.
let fmc_io = PinsSdramBank1;
See the examples for an ergonomic method using macros.
Usage
First create a new SDRAM from the FMC peripheral, IO and SDRAM device constants.
let mut sdram =
new;
Then initialise the controller and the SDRAM device. Convert the
raw pointer to a sized slice using from_raw_parts_mut
.
let ram = unsafe ;
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.