完善PGA设置:ADC通道改为CH6、添加PB4(PGA2_OUT)模拟模式、配置CHSMPR2采样时间

This commit is contained in:
2026-05-12 12:44:14 +08:00
parent 33070e9e0b
commit 458860f85e
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ ret_code_t adc_init(void)
ADC1->CFGR1 = ADC_CFGR1_RES_1;
ADC1->CHSMPR2 = (0x7 << 0);
ADC1->CHSMPR2 = (0x7 << 3);
ADC1->SMPR1 = 0x07;
+1 -1
View File
@@ -5,7 +5,7 @@
#include "sys_data_bus.h"
#include <stdint.h>
#define PGA_ADC_CH ADC_CH_0
#define PGA_ADC_CH ADC_CH_6
#define PGA_GAIN_1 0x00
#define PGA_GAIN_2 0x01