2018-06-22 04:36 AM
Hello,
I'm trying to make STM32F3Discovery as an USB audio device. I want to stream audio to variable and use STMStudio to display graph for audio data. Later I want to feed PWM and control D amplifier.
Pinout: Use Audio Device Class and PWM outputs.
Clock configuration
USB audio configuration
PC see board as speaker.
Timer configuration to generate 48kHz
I try to make driver to
receiving data
from USB.Timer 6 copy data to duty variable 48000 times per second. After receive half data execute audio synchronization and for full data execute audio synchronization.
Private variables to handle pointer to audio buffer, it size and word counter to send data.
Probably function below need something to work. Here i set buffer pointer, it size and set word counter to 0.
See Attachements 32942Initialization for output periphery, here i don't need any.
See Attachements 32946What changes I need to do in usbd_audio_if.c file in this simple example?
If you know pattern to implement BSP audio, you can share it.
Here I find interesing example for USB Audio
https://blog.csdn.net/wangjianzhongfj/article/details/72861557
It's hard for me to change
http://www.lyrebirdapp.com/doxygen/stm32f769i__discovery__audio_8c_source.html
audio example.Sorry for my language. Thanks you for help
Mark
#usb-audio-simple-example #audio-device-class #usb-audio