/****************************************************/
// 程序用途:用来测试通过内部基准电压计算外部VDDA的值
// 程序作者:孟瑞生
// 微信公众号:科技老顽童
/****************************************************/
#include "stm32f0xx.h"
#include "stdio.h"
__IO uint16_t VREFINT_CAL;
__IO uint16_t VREFINT_DATA;
__IO float VDDA_VAL;
// 下面三个延时函数,是用示波器试出来的,非精确延时(48MHz)
void delay_1us(void)
{
volatile uint16_t i=1;
while(i--);
}
void delay_us(uint16_t us)
{
while(us--)
{
delay_1us();
}
}
void delay_ms(uint16_t ms)
{
while(ms--)
{
delay_us(995);
}
}
/**
* @brief ADC Configuration
* @param None
* @retval None
*