2024-12-03 04:26 AM
Is possible to generate different tone using dac peripheral for triangle wave form generation using PCM sample in stm32 nucleo F410RB controller. Is it possible to generate tone using wav data(pcm array).
1.If possible to generate need to give wav format or not needed?
2. If not which stm32 development board supports dac to generate tones using pcm array's.
Solved! Go to Solution.
2024-12-03 06:44 AM - edited 2024-12-03 07:09 AM
Hello,
Please refer to this application note AN3126 "Audio and waveform generation using the DAC in STM32 products"
For wav usage please refer to the sections: 2.2.2 Audio wave file specifications and 2.3 Audio wave player implementation
Any STM32 having DAC peripheral supports this implementation ex: STM32F410 (only one DAC channel available) for Mono configuration. For stereo you need two DAC channels ex: STM32F407: Section 1.3 Dual channel mode
Hope it answers your question.
2024-12-03 06:44 AM - edited 2024-12-03 07:09 AM
Hello,
Please refer to this application note AN3126 "Audio and waveform generation using the DAC in STM32 products"
For wav usage please refer to the sections: 2.2.2 Audio wave file specifications and 2.3 Audio wave player implementation
Any STM32 having DAC peripheral supports this implementation ex: STM32F410 (only one DAC channel available) for Mono configuration. For stereo you need two DAC channels ex: STM32F407: Section 1.3 Dual channel mode
Hope it answers your question.
2024-12-03 08:18 PM - edited 2024-12-03 10:17 PM
Thank you for the solution. Using any STM32 board which supports dac peripheral able to generate tone and audio right? For me one channel is enough to generate audio, so using STM32 nucleoF410RB able to generate different tones by PCM array of .wav files (should not input audio file, instead pcm array of audio files).
2024-12-04 02:23 AM
@AMS12345 wrote:
Using any STM32 board which supports dac peripheral able to generate tone and audio right?
Yes, any STM32 MCU having DAC peripheral including STM32F410RB which is on Nucleo-F410RB board.
Please accept my previous comment if it answered your original question.
2024-12-04 08:40 PM
is there any example code for the following, it helps me to sort out my issue. @SofLit Thanks in advance for your assistance.
2024-12-05 02:35 AM
Hello,
See this thread.
The demo attached is old and deprecated example and used SPL (standard lib) version and not CubeHAL.
2024-12-05 02:49 AM
@AMS12345 wrote:is there any example code for the following,
Which part, exactly?
Note that parsing the content of a .WAV file would not be specific to STM32 - so any code from the interwebs should be usable ...
2024-12-05 03:47 AM
@Andrew Neil for audio wave file specification, the example code may helps me out. Thanks in advance for your assistance.
2024-12-05 03:53 AM
See this open source implementation on Github:
https://github.com/microtechnics-main/stm32-wav-player/tree/main
2024-12-05 03:54 AM
@SofLit
The thread you shared is for wave player, i need assistance for wave file format to generate tones.