|
||
---|---|---|
.. | ||
build | ||
board_init.c | ||
board_init.h | ||
clock_init.c | ||
clock_init.h | ||
main.c | ||
pin_init.c | ||
pin_init.h | ||
readme.md |
adc_awdg
实验过程
- 初始化 adc 实例,配置精度12b,ADC输入时钟2分频,校准时钟40分频,运行在 conversion by sequence 模式下,右对齐。
- 使能 adc 转换序列。
- 使能 adc 比较器功能。
- 使能 adc 实例。
- 主函数中,用户根据提示向串口输入任意字符,adc 开始转换比较结果,串口打印结果。
实验结果
adc_awdg example. press any key to start the conversion. adc conversion start... Wait for the comparison condition to match... value=2700 comparison condition match... adc conversion start... Wait for the comparison condition to match... value=2747 comparison condition match...