Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add oneshot_recorder #10

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

add oneshot_recorder #10

wants to merge 17 commits into from

Conversation

Dicklessgreat
Copy link
Owner

First time to use draft.
I wanted to try it out to see what kind of functionality it had.

Not yet implemented

  • SDCard dump
  • WAV packaging

@Dicklessgreat
Copy link
Owner Author

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

@Dicklessgreat Dicklessgreat marked this pull request as ready for review August 1, 2024 13:17
@kalkyl
Copy link
Contributor

kalkyl commented Aug 5, 2024

You may wanna look at using embedded-fatfs instead of embedded-sdmmc for async support

@kalkyl
Copy link
Contributor

kalkyl commented Aug 5, 2024

...also for most apps you wanna run the audio task in an InterruptExecutor at a higher priority level, to avoid over/underrun

@Dicklessgreat
Copy link
Owner Author

Thanks! I'll try both!

@Dicklessgreat
Copy link
Owner Author

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~~~.

@Dicklessgreat
Copy link
Owner Author

I suppressed panic by DMA error, but not yet solve the problem. SdSpi timeouts at its init().

@Dicklessgreat
Copy link
Owner Author

from
MabezDev/embedded-fatfs#30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants