This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# ADC
- (可选)配置RCC,High Speed Clock配置为Crystal/Ceramic Resonator
- (可选)Clock Configuration,PLL Source Mux选择HSE,X9,System Clock Mux选择为PLLCLK,APB1 Prescaler选择/2,ADC Prescaler选择/6
- 给PA5选择ADC1_IN5,在Analog,ADC1中
- 配置Continuous Conversion Mode为Enable,这样转换会一直进行,不用每次手动触发
- 配置Rank - Sampling Time为239.5Cycles,这样采样时间长,数据更稳定
- 配置USART2,Mode配置为Asynchronous,用于输出ADC数据
- 先HAL_ADC_Start打开ADC转换
- 再通过HAL_ADC_GetValue获得ADC结果