...
Well I have good news! I can now hear audio!!
. Thanks for the help with creating the callbacks
...
Glad to hear that. I would also be happy to hear what it sounds like.
Maybe you can share with us a working code template, cubemx setting etc.
About sound level:
It is probably because of your wav sample values 0~255
and dac expects 0~4096.
If i recall correctly you can not change the dac scale.
DACoutput = (VREF+) x (DOR/4096)
DOR corresponds to (comes from) your wav buffer values.
So you may try to use 16bit wav buffer,
shift your 0~255 wav values to 4bit left beforehand and save it to the flash memory like that,
use 12B_R dac mode.
(maybe just using 12B_R dac mode with unmodified wav values may do the trick try them both)
If it does not solves the problem there is another thing to look at.
It is about buffered dac modeand dac output channel load,
at figure 10 in that document:
AN3126 Application note
Audio and waveform generation using the DAC in STM32 products
Next thing to do,
the dac module is not common, many low end mcus does not have it or just have one dac module.
You may have achive the same thing with PWM module.
Timer triggered Dma, callbacks, etc. are almost the same,
you will set a stand alone PWM with output frequency at least wav frequency * 2,
you will set a timer triggered dma in circular mode,
that dma will send the wav value buffer to PWM CCRx,
at the pwm pin output you will filter the pwm carrier frequency with a simple RC filter.