EasyManuals Logo

ST STM32G0 1 Series User Manual

ST STM32G0 1 Series
1390 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #413 background imageLoading...
Page #413 background image
RM0444 Rev 5 413/1390
RM0444 Digital-to-analog converter (DAC)
441
16.4.10 Triangle-wave generation
It is possible to add a small-amplitude triangular waveform on a DC or slowly varying signal.
DAC triangle-wave generation is selected by setting WAVEx[1:0] to 10”. The amplitude is
configured through the MAMPx[3:0] bits in the DAC_CR register. An internal triangle counter
is incremented three dac_pclk clock cycles after each trigger event. The value of this
counter is then added to the DAC_DHRx register without overflow and the sum is
transferred into the DAC_DORx register. The triangle counter is incremented as long as it is
less than the maximum amplitude defined by the MAMPx[3:0] bits. Once the configured
amplitude is reached, the counter is decremented down to 0, then incremented again and so
on.
It is possible to reset triangle wave generation by resetting the WAVEx[1:0] bits.
Figure 65. DAC triangle wave generation
Figure 66. DAC conversion (SW trigger enabled) with triangle wave generation
Note: The DAC trigger must be enabled for triangle wave generation by setting the TENx bit in the
DAC_CR register.
The MAMPx[3:0] bits must be configured before enabling the DAC, otherwise they cannot
be changed.
MAMPx[3:0] max amplitude
+ DAC_DHRx base value
DAC_DHRx base value
Incrementation
ai14715c
Decrementation
0
MS45321V1
dac_pclk
0xABE
0xABE
DHR
DOR
0xABF
SWTRIG
0xAC0

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32G0 1 Series and is the answer not in the manual?

ST STM32G0 1 Series Specifications

General IconGeneral
BrandST
ModelSTM32G0 1 Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals