cancel
Showing results for 
Search instead for 
Did you mean: 

4 DACs, 4 audio rate sawtooth waves with SMT32G4

julianf20
Associate

Hello,

I am looking to develop with the STM32 microcontrollers for the first time and was hoping to get some help. I need to create a device capable of outputting 3 separate sawtooth waves that are individually controllable to synthesize audio based on user input. I was looking at the STM32G431K6T6 or something similar, as it has a development board, the NUCLEO-G431KB, and claims to have 4 DACs. I am confused about this however. It says that 2 DACs are external and 2 are internal. Does this mean that only 2 can be sent to external circuitry? Is there any way to get 3 observable and individually controllable waves out of this device? Also from what I've read, it seems that the way to create a sawtooth wave is to increment the DACs output and reset it with a timer. Since these timers are configured in STM32Cube with prescalers etc. is there a way to actually change the frequency of the DACs wave after the code is running?

Would this maybe be easier to implement with an external DAC IC instead of inside the STM32 device?

Thank you

1 REPLY 1
AScha.3
Principal III

Hi,

Not all dacs have output to pins, but seems your lucky :  3 have...

AScha3_0-1707242919118.png

(This is different to description in ds : 

AScha3_1-1707243055552.png

-- maybe STM knows, what they build...)

Do a simple test to prove it :

in stm32Cube or - IDE , start new project, with this chip, you want to use (or is on nucleo board),

and set the dacs -> to output pins ; then you see: will it work, to get 3 dac signals out (or only 2 ).

If you feel a post has answered your question, please click "Accept as Solution".