2025-04-09 5:02 AM
Hello everyone !
Hope you are fine,
The file I use is one of the example on stm32G431RB "DAC_SignalGeneration2" and for this example, the output frequency on Oscillo is 1kHz but for my use, I want to have high frequency for sinusoidal signal on oscilloscope. I try many issu but i don't have what i want.
For example, I calculated PSC et ARR corresponding to my frequency i want or double the number of step in tab sinewave or do (programmed a specific tab sinwave at the frequency i want but i stil don't have good result on oscilloscope.
And i don't understand the specific roles of each timer (TIM2 & TIM6) in this code.
Thank you for you respond
2025-04-10 7:47 AM
Hello @mala,
In the provided code, TIM2 is configured to trigger the DAC conversion at a specified frequency, which determines how often the DAC updates its output value.
TIM6 works similarly but used for different timing requirements!
The frequency of the DAC output is directly related to the timer's update events. To increase the frequency, you need to decrease the period of the timer.
This article could help you to better understand the project: Creating a STM32CubMX ioc project for older STM32C... - STMicroelectronics Community
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.