STM32G473 DAC 3至运算放大器输出卡在低电平。
我从G473的DAC 3生成输出信号,并在跟随器模式下通过OPAMP 1输出该值。运算放大器引脚的输出***保持在低电平。我将CUBEIDE中的DAC设置为:static void MX_DAC3_Init(void) { DAC_ChannelConfTypeDef sConfig = {0}; hdac3.Instance = DAC3; if (HAL_DAC_Init(&hdac3) != HAL_OK) {Error_Handler(); }/** DAC channel OUT1 config */ sConfig.DAC_HighFrequency = DAC_HIGH_FREQUENCY_INTERFACE_MODE_AUTOMATIC; sConfig.DAC_DMADoubleDataMode = DISABLE; sConfig.DAC_SignedFormat = DISABLE; sConfig.DAC_SampleAndHold = DAC_SAMPLEANDHOLD_DISABLE; sConfig.DAC_Trigger = DAC_TRIGGER_NONE; sConfig.DAC_Trigger2 = DAC_TRIGGER_NONE; sConfig.DAC_OutputBuffer = DAC_OUTPUTBUFFER_DISABLE; sConfig.DAC_ConnectOnChipPeripheral = DAC_CHIPCONNECT_INTERNAL; sConfig.DAC_UserTrimming = DAC_TRIMMING_FACTORY; if (HAL_DAC_ConfigChannel(&hdac3, &sConfig, DAC_CHANNEL_1) != HAL_OK){Error_Handler(); }}我将CUBEIDE中的OPAMP设置为:static void MX_OPAMP1_Init(void){hopamp1.Instance = OPAMP1;hopamp1.Init.PowerMode = OPAMP_POWERMODE_NORMAL;hopamp1.Init.Mode = OPAMP_FOLLOWER_MODE;hopamp1.Init.NonInvertingInput = OPAMP_NONINVERTINGINPUT_DAC;hopamp1.Init.InternalOutput = DISABLE;hopamp1.Init.TimerControlledMuxmode = OPAMP_TIMERCONTROLLEDMUXMODE_DISABLE;hopamp1.Init.UserTrimming = OPAMP_TRIMMING_FACTORY;if (HAL_OPAMP_Init(&hopamp1) != HAL_OK){ Error_Handler();}}可能是DAC输出阻抗与负载不匹配导致的。 可能存在地线干扰吧。 运算放大器电源电压是否兼容。 电源时序问题? 在DAC初始化配置中启用输出缓冲器,将输出阻抗从15kΩ降低至低阻状态,避免分压效应。 建议增加隔离与滤波。
页:
[1]