原程序:
void main(void)
{
DAC_DeInit();
/* Enable the Clock of DAC */
CLK_PeripheralClockConfig(CLK_Peripheral_DAC, ENABLE);
CLK_PeripheralClockConfig(CLK_Peripheral_COMP, ENABLE);
COMP_TriggerConfig(COMP_TriggerGroup_DACOutput,COMP_TriggerPin_1,ENABLE);
/* Init DAC channel 1 and DAC channel 2 outputs */
DAC_Init(DAC_Channel_1, DAC_Trigger_Software, DAC_OutputBuffer_Enable);
DAC_Init(DAC_Channel_2, DAC_Trigger_Software, DAC_OutputBuffer_Enable);
/* Enable DAC channel 1 and 2 outputs */
DAC_Cmd(DAC_Channel_1, ENABLE);
DAC_Cmd(DAC_Channel_2, ENABLE);
DAC_SetChannel1Data(DAC_Align_12b_R,2030);
DAC_SetChannel2Data(DAC_Align_12b_R,2030);
/* Infinite loop */
while (1)
{
DAC_DualSoftwareTriggerCmd(ENABLE);
}
}
DAC1有输出
DAC2没有输出 请ST 技术支持和那位高手指点下!谢谢!
|