You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

638 B

NTC

  • (可选)打开外部晶振

  • 给PA4选择ADC1_IN4

  • 进入ADC配置

    • Enable Continuous Conversion Mode
    • Rank - Sampling Time配置为239.5Cycles
  • ADC结果转换到温度

    • 通过ADC结果计算NTC电阻值单位欧姆

    • 通过NTC电阻值计算温度单位摄氏度

      开发板配置的NTC电阻参数如下

      B值 3950

      常温 T2 = 25℃

      常温电阻R2 = 10KΩ

  • 注意默认无法使用sprintf打印浮点数需要在工程Properties - C/C++ Build - Settings - MCU Settings中勾选Use float with printf from newlib -nano