A simple signal generator using an ARM Cortex-M4 microcontroller
This was made specifically for the NUCLEO-F303RE development kit using STM CubeMX to configure the board and ARM Keil v5 to program it.
The idea behind this is quite easy, use microcontroller's DAC and one single digital output to make three kinds of outputs:
- sine wave, PA5 pin, DAC's channel 2
- triangular wave, PA4 pin, DAC's channel 1
- squared wave, PA6 pin as you can see at the configuration file.
The program flowchart (english version or spanish version) shows how the program works
On this board working at 36MHz the APB1 (max clock speed for the DAC bus) and this program, the output can go from 835Hz up to 11.29KHz with nice waveforms.