新手上路
- 积分
- 25
- 金钱
- 25
- 注册时间
- 2021-8-28
- 在线时间
- 5 小时
|

楼主 |
发表于 2021-9-6 20:43:47
|
显示全部楼层
图片忘发了
修改的宏定义:
#define RHEOSTAT_ADC_GPIO_PORT GPIOA
#define RHEOSTAT_ADC_GPIO_PIN GPIO_Pin_5
#define RHEOSTAT_ADC_GPIO_CLK RCC_AHB1Periph_GPIOA
// ADC
#define RHEOSTAT_ADC ADC2
#define RHEOSTAT_ADC_CLK RCC_APB2Periph_ADC2
#define RHEOSTAT_ADC_CHANNEL ADC_Channel_5
// ADC DR数据寄存器
#define RHEOSTAT_ADC_DR_ADDR ((u32)ADC2+0x4c)
// ADC DMA通道
#define RHEOSTAT_ADC_DMA_CLK RCC_AHB1Periph_DMA2
#define RHEOSTAT_ADC_DMA_CHANNEL DMA_Channel_0
#define RHEOSTAT_ADC_DMA_STREAM DMA2_Stream0
ADC1的串口助手:
The current AD value = 0x0E13
The current AD value = 2.877026 V
The current AD value = 0x0DFA
The current AD value = 2.889917 V
The current AD value = 0x0DFF
The current AD value = 2.896362 V
The current AD value = 0x0DED
The current AD value = 2.893140 V
The current AD value = 0x0DF2
The current AD value = 2.886694 V
The current AD value = 0x0DFE
The current AD value = 2.893140 V
ADC2的串口助手:
The current AD value = 0x0000
The current AD value = 0.000000 V
The current AD value = 0x0000
The current AD value = 0.000000 V
The current AD value = 0x0000
The current AD value = 0.000000 V
The current AD value = 0x0000
The current AD value = 0.000000 V
|
|