STM32F0xx Standard Peripherals Firmware Library: DAC_SignalsGeneration

STM32F0xx Standard Peripherals Library

STM32F0xx Standard Peripherals Firmware Library

Defines

#define DAC_DHR12R1_ADDRESS   0x40007408
#define DAC_DHR8R1_ADDRESS   0x40007410
#define DAC_DHR8R2_ADDRESS   0x4000741C

Functions

static void DAC_Config (void)
 PrecConfiguration: configure PA4 in analog, enable DAC clock, enable DMA1 clock.
int main (void)
 Main program.
static void TIM_Config (void)
 TIM2 Configuration.

Variables

DAC_InitTypeDef DAC_InitStructure
DMA_InitTypeDef DMA_InitStructure
const uint8_t Escalator8bit [6] = {0x0, 0x33, 0x66, 0x99, 0xCC, 0xFF}
uint8_t Idx = 0
__IO uint8_t SelectedWavesForm = 1
const uint16_t Sine12bit [32]
__IO uint8_t WaveChange = 1

Define Documentation

#define DAC_DHR12R1_ADDRESS   0x40007408

Definition at line 41 of file STM32F0xx_StdPeriph_Examples/DAC/DAC_SignalsGeneration/main.c.

Referenced by main().

#define DAC_DHR8R1_ADDRESS   0x40007410

Definition at line 43 of file STM32F0xx_StdPeriph_Examples/DAC/DAC_SignalsGeneration/main.c.

Referenced by main().

#define DAC_DHR8R2_ADDRESS   0x4000741C

Definition at line 42 of file STM32F0xx_StdPeriph_Examples/DAC/DAC_SignalsGeneration/main.c.

Referenced by main().


Function Documentation

static void DAC_Config ( void  ) [static]

PrecConfiguration: configure PA4 in analog, enable DAC clock, enable DMA1 clock.

Parameters:
None
Return values:
None

Definition at line 279 of file STM32F0xx_StdPeriph_Examples/DAC/DAC_SignalsGeneration/main.c.

References GPIO_InitStructure.

Referenced by main().

int main ( void  )

Main program.

Parameters:
None
Return values:
None

< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_stm32f0xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f0xx.c file

Definition at line 68 of file STM32F0xx_StdPeriph_Examples/DAC/DAC_SignalsGeneration/main.c.

References DAC_Config(), DAC_DHR12R1_ADDRESS, DAC_DHR8R1_ADDRESS, DAC_DHR8R2_ADDRESS, DAC_InitStructure, DMA_InitStructure, Escalator8bit, SelectedWavesForm, Sine12bit, TIM_Config(), and WaveChange.

static void TIM_Config ( void  ) [static]

TIM2 Configuration.

Parameters:
None
Return values:
None

Definition at line 310 of file STM32F0xx_StdPeriph_Examples/DAC/DAC_SignalsGeneration/main.c.

References TIM_TimeBaseStructure.

Referenced by main().


Variable Documentation

DAC_InitTypeDef DAC_InitStructure
const uint8_t Escalator8bit[6] = {0x0, 0x33, 0x66, 0x99, 0xCC, 0xFF}

Definition at line 53 of file STM32F0xx_StdPeriph_Examples/DAC/DAC_SignalsGeneration/main.c.

Referenced by main().

uint8_t Idx = 0
const uint16_t Sine12bit[32]
Initial value:
 {
                      2047, 2447, 2831, 3185, 3498, 3750, 3939, 4056, 4095, 4056,
                      3939, 3750, 3495, 3185, 2831, 2447, 2047, 1647, 1263, 909, 
                      599, 344, 155, 38, 0, 38, 155, 344, 599, 909, 1263, 1647}

Definition at line 49 of file STM32F0xx_StdPeriph_Examples/DAC/DAC_SignalsGeneration/main.c.

Referenced by DMA_Config(), and main().

__IO uint8_t WaveChange = 1
STM32L1xx Standard Peripherals Library: Footer

 

 

 For complete documentation on STM32 Microcontrollers visit www.st.com/STM32