2024-07-26 02:05 AM
Hello everyone!
I'm currently working on a project where I aim to generate sound solely on the STM32F746G-Discovery board. I work with TouchGFX and STM32CubeIDE. Nearly all audio projects I checked from GitHub have outer signals. (.wav or other file extensions) from USB, SD etc. or outer speakers.
What I trying to do is generate a sine signal on the code and play the same sine signal on boards sterero output.
Here is the simple signal that I generated in Screen1View.cpp:
#define PI 3.1415926
for(int i=0; i<100; i++)
{
result = 50+amp*sin(i*2*PI*freq/100);
}
Is there any possible way to play that signal from boards stereo outp? If there I'll be very glad to know. Thanks for your time.
2024-07-26 02:35 AM - edited 2024-07-26 02:36 AM
You've already asked this question, and got the answer:
Did you follow the links provided there for the driver and example ?
2024-07-26 03:12 AM
On generating the sinewave data:
https://community.st.com/t5/stm32-mcus-products/generating-a-sine-wave-using-stm32g4/td-p/75566