Open Dicklessgreat opened 2 months ago
I achieved what I expected, but there's a problem. It takes too much time to write to sdmmc, and it's blocking. That's why after it finished flushing, this program panics by SAI overrun
ERROR panicked at /Users/dicklessgreat/Documents/Rust/daisy_embassy/src/audio.rs:223:42:
called `Result::unwrap()` on an `Err` value: Overrun
I tried some forks of embedded-sdmmc
that provide async interfaces. But they are outdated or not yet works.
https://github.com/kalkyl/sdmmc-embassy/tree/main
https://github.com/LechevSpace/embedded-sdmmc-rs/tree/feat/async-feature
You may wanna look at using embedded-fatfs instead of embedded-sdmmc
for async support
...also for most apps you wanna run the audio task in an InterruptExecutor at a higher priority level, to avoid over/underrun
Thanks! I'll try both!
Doh! I forgot DMA requires special region for its buffer in STM32H7!!
ERROR panicked at 'DMA: error on DMA@40020000 channel 0'
Noooooo...
I'm now working on mock-up fix of embedded-fatfs
.
https://github.com/Dicklessgreat/embedded-fatfs/tree/stm32h7_DMA
I've make Bufstream
inner field as a slice, but not yet replace the all buffers in SdSpi::init()
.
I'll try it later. Good night~~~.
I suppressed panic by DMA error, but not yet solve the problem. SdSpi
timeouts at its init().
First time to use draft. I wanted to try it out to see what kind of functionality it had.
Not yet implemented