embassy-rs / embassy

Modern embedded framework, using Rust and async.
https://embassy.dev
Apache License 2.0
4.86k stars 660 forks source link

APB2 SDMMC clocking not enabled for STM32L4 series #1775

Open snakehand opened 11 months ago

snakehand commented 11 months ago

I am trying to get a SDMMC example working on STM32L431 and discovered that the SDMMC peripheral was not clocked by the APB2 clock unless I added the following code:

unsafe {
    pac::RCC.apb2enr().modify(|w| w.set_sdmmcen(true));
}
MabezDev commented 11 months ago

Feel free to submit a PR to enable the register for your chip during SDMMC initialization :)