STM32F1, STMCubeMX, ADC, Internal Temperature Sensor
STM32F1 내부에 있는 온도 센서를 ADC합니다.
0. 참고 사이트
1. ADC1 > Temperature Sensor Channel
2. Configuration > ADC1
3. Continous Conversion Mode > Enabled
4. ADC 계산법
/* |
HAL_ADC_Start(&hadc1); while(1) { HAL_ADC_PollForConversion(&hadc1, 100); temperature = ((adc1*vsense - 1.43)/0.0043) + 25; HAL_Delay(1000); } HAL_ADC_Stop(&hadc1); |
5. 소스
https://github.com/sglee0223/stm32f103ve/tree/master/internal_temperature_sensor
6. 실행 결과
'STM32F1' 카테고리의 다른 글
STM32F1, STMCubeMX, GPIO, PWM, Digital Buzzer (0) | 2018.08.06 |
---|---|
STM32F1, STMCubeMX, I2C, PCF8563 (0) | 2018.08.03 |
STM32F1, STMCubeMX, SPI, LCD22 (0) | 2018.08.03 |
STM32F1, STMCubeMX, I2C, LCD1602 (0) | 2018.08.03 |
STM32F1, STMCubeMX, 1us delay (0) | 2018.08.03 |