PCM5122 C library and test program for stm32f407. It created with STM32CubeIDE. But you can use it for any stm32 microcontrollers. There is a function which is generate 1.5 KHz sine wave for the test. It can help you to find any problems or measuring the strength of noise in the output.
More datail amout the DAC: https://www.ti.com/product/PCM5122