Sunday, May 17, 2020

A working DMA AUDIO output

sidboxv5begin.png The project begins to take life now; While its taken me a LONG time and most of my hair is still present!
I still have a long way to go, but I do have something that is causing us some excitement!

While working on the SDCARD (which now appears to be fully working now) I wanted to see if I could get the SDCARD to stream some audio.

At first I did this the old way as the Sidbox 4 does this, uses an interupt with a read and write audio buffer positions. While this works really well on the Sidbox 4 OS, this chip has 400Mhz and a few DMA channels, one of which is a DAC.

I can setup an audio buffer, and have that memory transferred at 441khz to the DAC, leaving the CPU free to do something else! The issue I got with this though is the DMA seems to collide a bit while using the FatFS (but thats just a current bug for now)

So the while it plays it just choses to put the new data in to the audio buffer

To Get this to work I had to wire up the following.

Note that this has NO Card Select! I was confused by this, but I found that I had to find away to tie the CS to 3.3v, the SDMMC1 port onthe STM32 takes care of everything else.


So Now I have the SDCARD playing 8Bit Wav Files at 44100Hz and its done via the DMA,
all the CPU has to do when called via an interupt is to fetch another 1k of audio and stuff it in to the audio buffer.

  1. Andy

    Sunday, May 17, 2020 - 21:08:01

    Fancy giving us a little video treat of this running?

  2. electronscape

    Tuesday, May 19, 2020 - 22:35:14

    Actually I Think maddi already did a recording on this! lol
    but i will definately get a video out soon!

Add comment

Fill out the form below to add your own comments