void DAC_CONFIG(void)
{
DAC_SetInMode();//浮空输入
CLK_PeripheralClockConfig(CLK_Peripheral_DAC,ENABLE);
CLK_PeripheralClockConfig(CLK_Peripheral_COMP,ENABLE);
DAC_DeInit();
DAC_Init(DAC_Channel_1,DAC_Trigger_T4_TRGO,DAC_OutputBuffer_Enable);
DAC_Cmd(DAC_Channel_1,ENABLE);
SYSCFG_RIDeInit();
SYSCFG_RIIOSwitchConfig(RI_IOSwitch_14,ENABLE);
DAC_DMACmd(DAC_Channel_1, ENABLE);
//DAC_SoftwareTriggerCmd(DAC_Channel_1,ENABLE);
DAC_SetChannel1Data(DAC_Align_12b_R,4095);
//DMA1_Channel1
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>