STM32H7的HAL库ADC线性度校准溢出时间设计小了,否则校准不成功,要特别注意!

[复制链接]
340|0
 楼主| kaloulin 发表于 2018-8-3 19:24 | 显示全部楼层 |阅读模式
简单的修改,64000后面先添加几个0测试就行:/* Fixed timeout value for ADC calibration.                                   */
/* Values defined to be higher than worst cases: low clock frequency,         */
/* maximum prescalers.                                                        */
/* Ex of profile low frequency : f_ADC at 0.35 MHz (minimum value             */
/* according to Data sheet), calibration_time MAX = 112 / f_ADC               */
/*           112 / 350,000 = 0.32 ms                                           */
/* At maximum CPU speed (200 MHz), this means                                  */
/*    0.8 ms * 200 MHz = 64000 CPU cycles                                      */
#define ADC_CALIBRATION_TIMEOUT         ((uint32_t) 64000)   /*!< ADC calibration time-out value */
您需要登录后才可以回帖 登录 | 注册

本版积分规则

439

主题

448

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部