Browse Source

stm32/dac: Follow ref-man guidelines on GPIO config

GPIO pins should be configured for Analog IN on virtually all families
to reduce parasitic consumption.

Reported-by: Roger Wolff <R.E.Wolff@BitWizard.nl>
pull/310/merge
Karl Palsson 11 years ago
parent
commit
b37597f1db
  1. 7
      lib/stm32/common/dac_common_all.c

7
lib/stm32/common/dac_common_all.c

@ -11,8 +11,11 @@ of the connection line, high density and XL devices.
Two DAC channels are available, however unlike the ADC channels these
are separate DAC devices controlled by the same register block.
The DAC is on APB1. Its clock must be enabled in RCC and the GPIO
The DAC is on APB1. Its clock must be enabled in RCC and depending on
specific family, the GPIO
ports set to alternate function output before it can be used.
On most families, the GPIO pins should be configured to Analog IN to
avoid parasitic consumption.
The digital output driver is disabled so the output driver mode
(push-pull/open drain) is arbitrary.
@ -48,7 +51,7 @@ by specifying the appropriate register to the DMA controller.
@section dac_api_basic_ex Basic DAC handling API.
Set the DAC's GPIO port to any alternate function output mode. Enable the
Set the DAC's GPIO port to Analog IN. Enable the
DAC clock. Enable the DAC, set a trigger source and load the buffer
with the first value. After the DAC is triggered, load the buffer with
the next value. This example uses software triggering and added noise.

Loading…
Cancel
Save