Audio Output with the STM32F411 Microcontroller
I obtained an STM32F411 development board recently. Among other peripherals, it has a Cirrus CS43L22 audio DAC on the board and a typical 1/8" adapter allowing you to plug in headphones or typical PC speakers as shown below.
Searching the web, I found a couple of code examples using audio with the STM32F411 board, however, they either used STM's HAL or Standard Peripheral Library. These API's are great for rapid development and cross-product compatibility but they can make it difficult to understand exactly how the MCU is configured.
I rewrote one example I found so that it operates without relying on an intermediate library between my code and the MCU's registers. I also changed it to output a sine wave instead of a sawtooth. With a sine tone, I find it's easier to hear abnormalities (as well as see them with an oscilloscope).