Hi everyone
I'm going to make a wave player with my BluePill
BluePill does not have DAC so I have to use PWM
What shoud I do? can anyone help guide me and show the steps?
Play wave file from SD card
-
- Posts: 633
- Joined: Thu Dec 19, 2019 1:23 am
Re: Play wave file from SD card
Not specific to .wav, but old forum had MP3 info:
https://www.google.com/search?q=MP3+sit ... oforum.com
http://stm32duinoforum.com/forum/viewtopic.php?t=243
Also, the massive STM32 thread on Arduino.cc has some posts.
Construct your Google query as:
Ray
https://www.google.com/search?q=MP3+sit ... oforum.com
http://stm32duinoforum.com/forum/viewtopic.php?t=243
Also, the massive STM32 thread on Arduino.cc has some posts.
Construct your Google query as:
stm32 + WAV site:forum.arduino.cc
Ray
Re: Play wave file from SD card
Actually I don't want to use any extra module , micro has to decode the wave file , I read the MP3 topic but that's a little bit different abut what I want
-
- Posts: 633
- Joined: Thu Dec 19, 2019 1:23 am
Re: Play wave file from SD card
AN3126
STM32-centric HAL WAV library
Googling around, it seems the F4 has some examples.2.2.3 .WAV file format
The .WAV file format is a subset of the Resource Interchange File Format (RIFF)
specification used for the storage of multimedia files. A RIFF file starts with a file header
followed by a sequence of data chunks. A .WAV file is often just a RIFF file with a single
"WAVE" chunk consisting of two sub-chunks:
1. a fmt chunk, specifying the data format
2. a data chunk, containing the actual sample data.
The WAVE file format starts with the RIFF header: it indicates the file length.
Next, the fmt chunk describes the sample format, it contains information about the format of
the wave audio (PCM / ...), the number of channels (mono/stereo), the sample rate (number
of samples per seconds, e.g. 22050), and the sample data size (e.g. 8 bit / 16 bit). Finally,
the data chunk contains the sample data.
STM32-centric HAL WAV library
Re: Play wave file from SD card
They use I2S , but I don't want to use I2S, micro controller should decode wave file and play it with PWM or DAC(PWM is desired because my STM32F103C8T6 doesn't have DAC)