Digital-to-analog converter (DAC)
12.6
Noise generation
In order to generate a variable-amplitude pseudonoise, an LFSR (linear feedback shift
register) is available. DAC noise generation is selected by setting WAVEx[1:0] to "01". The
preloaded value in LFSR is 0xAAA. This register is updated three APB clock cycles after
each trigger event, following a specific calculation algorithm.
The LFSR value, that may be masked partially or totally by means of the MAMPx[3:0] bits in
the DAC_CR register, is added up to the DAC_DHRx contents without overflow and this
value is then stored into the DAC_DORx register.
If LFSR is 0x0000, a '1 is injected into it (antilock-up mechanism).
It is possible to reset LFSR wave generation by resetting the WAVEx[1:0] bits.
Figure 44. DAC conversion (SW trigger enabled) with LFSR wave generation
Note:
The DAC trigger must be enabled for noise generation by setting the TENx bit in the
DAC_CR register.
248/771
Figure 43. DAC LFSR register calculation algorithm
RM0401 Rev 3
RM0401
Need help?
Do you have a question about the STM32F410 and is the answer not in the manual?