DAC_DualModeDMA_SineWave
[STM32F10x_StdPeriph_Examples]

Defines

#define DAC_DHR12RD_Address   0x40007420

Functions

void BusFault_Handler (void)
 This function handles Bus Fault exception.
void DebugMon_Handler (void)
 This function handles Debug Monitor exception.
void Delay (__IO uint32_t nCount)
 Inserts a delay time.
void GPIO_Configuration (void)
 Configures the different GPIO ports.
void HardFault_Handler (void)
 This function handles Hard Fault exception.
int main (void)
 Main program.
void MemManage_Handler (void)
 This function handles Memory Manage exception.
void NMI_Handler (void)
 This function handles NMI exception.
void PendSV_Handler (void)
 This function handles PendSV_Handler exception.
void RCC_Configuration (void)
 Configures the different system clocks.
void SVC_Handler (void)
 This function handles SVCall exception.
void SysTick_Handler (void)
 This function handles SysTick Handler.
void UsageFault_Handler (void)
 This function handles Usage Fault exception.

Variables

DAC_InitTypeDef DAC_InitStructure
DMA_InitTypeDef DMA_InitStructure
uint32_t DualSine12bit [32]
uint32_t Idx = 0
const uint16_t Sine12bit [32]
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure

Define Documentation

#define DAC_DHR12RD_Address   0x40007420

Definition at line 34 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/main.c.

Referenced by main().


Function Documentation

void BusFault_Handler ( void   ) 

This function handles Bus Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 85 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/stm32f10x_it.c.

void DebugMon_Handler ( void   ) 

This function handles Debug Monitor exception.

Parameters:
None 
Return values:
None 

Definition at line 120 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/stm32f10x_it.c.

void Delay ( __IO uint32_t  nCount  ) 

Inserts a delay time.

Parameters:
nCount,: specifies the delay time length.
Return values:
None 

Definition at line 202 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/main.c.

void GPIO_Configuration ( void   ) 

Configures the different GPIO ports.

Parameters:
None 
Return values:
None 

Definition at line 185 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/main.c.

References GPIO_Init(), GPIO_InitStructure, GPIO_InitTypeDef::GPIO_Mode, GPIO_Mode_AIN, GPIO_InitTypeDef::GPIO_Pin, GPIO_Pin_4, GPIO_Pin_5, and GPIOA.

void HardFault_Handler ( void   ) 

This function handles Hard Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 59 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/stm32f10x_it.c.

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_stm32f10x_xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f10x.c file

Definition at line 63 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/main.c.

References DAC_Channel_1, DAC_Channel_2, DAC_Cmd(), DAC_DHR12RD_Address, DAC_DMACmd(), DAC_Init(), DAC_InitTypeDef::DAC_OutputBuffer, DAC_OutputBuffer_Disable, DAC_InitTypeDef::DAC_Trigger, DAC_Trigger_T2_TRGO, DAC_InitTypeDef::DAC_WaveGeneration, DAC_WaveGeneration_None, DMA1_Channel4, DMA2_Channel4, DMA_InitTypeDef::DMA_BufferSize, DMA_Cmd(), DMA_DeInit(), DMA_InitTypeDef::DMA_DIR, DMA_DIR_PeripheralDST, DMA_Init(), DMA_InitTypeDef::DMA_M2M, DMA_M2M_Disable, DMA_InitTypeDef::DMA_MemoryBaseAddr, DMA_InitTypeDef::DMA_MemoryDataSize, DMA_MemoryDataSize_Word, DMA_InitTypeDef::DMA_MemoryInc, DMA_MemoryInc_Enable, DMA_InitTypeDef::DMA_Mode, DMA_Mode_Circular, DMA_InitTypeDef::DMA_PeripheralBaseAddr, DMA_InitTypeDef::DMA_PeripheralDataSize, DMA_PeripheralDataSize_Word, DMA_InitTypeDef::DMA_PeripheralInc, DMA_PeripheralInc_Disable, DMA_InitTypeDef::DMA_Priority, DMA_Priority_High, DualSine12bit, ENABLE, GPIO_Configuration(), Idx, RCC_Configuration(), Sine12bit, TIM2, TIM_TimeBaseInitTypeDef::TIM_ClockDivision, TIM_Cmd(), TIM_TimeBaseInitTypeDef::TIM_CounterMode, TIM_CounterMode_Up, TIM_TimeBaseInitTypeDef::TIM_Period, TIM_TimeBaseInitTypeDef::TIM_Prescaler, TIM_SelectOutputTrigger(), TIM_TimeBaseInit(), TIM_TimeBaseStructInit(), and TIM_TRGOSource_Update.

void MemManage_Handler ( void   ) 

This function handles Memory Manage exception.

Parameters:
None 
Return values:
None 

Definition at line 72 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/stm32f10x_it.c.

void NMI_Handler ( void   ) 

This function handles NMI exception.

Parameters:
None 
Return values:
None 

Definition at line 50 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/stm32f10x_it.c.

void PendSV_Handler ( void   ) 

This function handles PendSV_Handler exception.

Parameters:
None 
Return values:
None 

Definition at line 129 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/stm32f10x_it.c.

void RCC_Configuration ( void   ) 
void SVC_Handler ( void   ) 

This function handles SVCall exception.

Parameters:
None 
Return values:
None 

Definition at line 111 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/stm32f10x_it.c.

void SysTick_Handler ( void   ) 

This function handles SysTick Handler.

Parameters:
None 
Return values:
None 

Definition at line 138 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/stm32f10x_it.c.

void UsageFault_Handler ( void   ) 

This function handles Usage Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 98 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/stm32f10x_it.c.


Variable Documentation

uint32_t DualSine12bit[32]

Definition at line 49 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/main.c.

Referenced by main().

uint32_t Idx = 0

Definition at line 40 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/main.c.

Referenced by main().

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 44 of file STM32F10x_StdPeriph_Examples/DAC/DualModeDMA_SineWave/main.c.

Referenced by main().

STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32