Support eMMC devices via SDMMC (STM32)#4016
Conversation
9c530bc to
6165fc4
Compare
|
Thanks for the PR! Could you not add a new trait + generic param for the mode, track it at runtime instead (with e.g. an enum?). Reasons are:
|
10ed25f to
065108a
Compare
|
@Dirbaio I just pushed a new enum-based implementation in case you'd like to generally check over it. There are a couple of things that I think are slightly less clean than with traits but it's not too bad overall. I didn't attempt to address the code duplication you mentioned yet; will get to that tomorrow hopefully. (previous implementation is still in |
3c63f66 to
5f750a4
Compare
|
@Dirbaio ok, should be ready for review now - I've deduplicated the |
|
Seems this breaks the sdcard test bender run |
|
hm I think the "task arena is full" error is a red herring. Task arena is gone since #4020. Try rebasing on latest main, you'll likely get the same error in PR CI as in the merge queue CI, which is "waiting for card: NoCard". |
dafbed1 to
70783bd
Compare
`read_sd_status` works, but it's somewhat of a hack, but also won't work on eMMC devices. The official spec for both SD and eMMC recommends using this method.
|
@Dirbaio SD card CI is now fixed, but there is still a |
|
yeah it's just flaky, i've removed it in #4054 bender run |
|
Hey, thank you for implementing this right when I need it! I, however, am having problems and would appreciate any help. I'm using STM32F429ZIT6 with EMMC16G-MW28-03022 flash on 8 bit bus and it just freezes on Have you experienced anything similar and could nudge me where to look? EDIT: Nevermind, got it to work. It was some weird interraction with my logging buffer getting full and fatfs crashing due to empty emmc. |
I've added support for eMMC memory devices in
embassy-stm32using the SDMMC peripheral.I've confirmed that this code works correctly for basic initialization, reads, and writes on a device that I've previously been using under
stm32f4xx-hal, using 1, 4, and 8 data lanes, each with several different operating frequencies up to 24MHz.Note that I don't have any appropriate hardware to test:
gpio_v1configsdmmc_v2config