Merge pull request #4016 from antonok-edm/emmc

Support eMMC devices via SDMMC (STM32)
This commit is contained in:
Dario Nieuwenhuis 2025-04-06 22:04:18 +00:00 committed by GitHub
commit 717fbc1cd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 762 additions and 566 deletions

View File

@ -70,7 +70,7 @@ cortex-m-rt = ">=0.6.15,<0.8"
cortex-m = "0.7.6"
futures-util = { version = "0.3.30", default-features = false }
rand_core = "0.6.3"
sdio-host = "0.5.0"
sdio-host = "0.9.0"
critical-section = "1.1"
#stm32-metapac = { version = "16" }
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-a7a30c9d54e7415709c463a537501691784672db" }

View File

@ -1056,7 +1056,7 @@ fn main() {
(("sdmmc", "D4"), quote!(crate::sdmmc::D4Pin)),
(("sdmmc", "D5"), quote!(crate::sdmmc::D5Pin)),
(("sdmmc", "D6"), quote!(crate::sdmmc::D6Pin)),
(("sdmmc", "D6"), quote!(crate::sdmmc::D7Pin)),
(("sdmmc", "D7"), quote!(crate::sdmmc::D7Pin)),
(("sdmmc", "D8"), quote!(crate::sdmmc::D8Pin)),
(("quadspi", "BK1_IO0"), quote!(crate::qspi::BK1D0Pin)),
(("quadspi", "BK1_IO1"), quote!(crate::qspi::BK1D1Pin)),

File diff suppressed because it is too large Load Diff

View File

@ -59,7 +59,7 @@ async fn main(_spawner: Spawner) {
let mut err = None;
loop {
match sdmmc.init_card(mhz(24)).await {
match sdmmc.init_sd_card(mhz(24)).await {
Ok(_) => break,
Err(e) => {
if err != Some(e) {

View File

@ -54,7 +54,7 @@ async fn main(_spawner: Spawner) {
// Should print 400kHz for initialization
info!("Configured clock: {}", sdmmc.clock().0);
unwrap!(sdmmc.init_card(mhz(25)).await);
unwrap!(sdmmc.init_sd_card(mhz(25)).await);
let card = unwrap!(sdmmc.card());

View File

@ -53,7 +53,7 @@ async fn main(_spawner: Spawner) -> ! {
// Should print 400kHz for initialization
info!("Configured clock: {}", sdmmc.clock().0);
unwrap!(sdmmc.init_card(mhz(25)).await);
unwrap!(sdmmc.init_sd_card(mhz(25)).await);
let card = unwrap!(sdmmc.card());

View File

@ -54,7 +54,7 @@ async fn main(_spawner: Spawner) {
let mut err = None;
loop {
match s.init_card(mhz(24)).await {
match s.init_sd_card(mhz(24)).await {
Ok(_) => break,
Err(e) => {
if err != Some(e) {
@ -100,7 +100,7 @@ async fn main(_spawner: Spawner) {
let mut err = None;
loop {
match s.init_card(mhz(24)).await {
match s.init_sd_card(mhz(24)).await {
Ok(_) => break,
Err(e) => {
if err != Some(e) {