ds18b20 读不出温度
时间:10-02
整理:3721RD
点击:
初始化void RCC_HSE_Configuration() 之后,温度就读不出来了,,不初始化void RCC_HSE_Configuration(),,温度读的正常,,,这是为什么
//==================================================================================================
//==================================================================================================
// Name : systick.c
// Purpose : sysclock
// Version : Ver 1.0
// Author : Nature Power
// Date : 20170424
// Hardware: ARM.Cortex M3.STM32F103ZE
#include "System_Main.h"
/*******************************************************************************
* oˉ êy ?? : delay_us
* oˉêy1|?ü : ?óê±oˉêy£??óê±us
* ê? è? : i
* ê? 3? : ?T
*******************************************************************************/
double temper;
void delay_us(u32 i)
{
u32 temp;
SysTick->LOAD=9*i; //éè????×°êy?μ, 72MHZê±
SysTick->CTRL=0X01; //ê1?ü£???μ?á?ê??T?ˉ×÷£?2éó?ía2?ê±?ó?′
SysTick->VAL=0; //??á???êy?÷
do
{
temp=SysTick->CTRL; //?áè?μ±?°μ1??êy?μ
}
while((temp&0x01)&&(!(temp&(1<<16)))); //μè′yê±??μ?′?
SysTick->CTRL=0; //1?±???êy?÷
SysTick->VAL=0; //??????êy?÷
}
/*******************************************************************************
* oˉ êy ?? : delay_ms
* oˉêy1|?ü : ?óê±oˉêy£??óê±ms
* ê? è? : i
* ê? 3? : ?T
*******************************************************************************/
void delay_ms(u32 i)
{
u32 temp;
SysTick->LOAD=9000*i; //éè????×°êy?μ, 72MHZê±
SysTick->CTRL=0X01; //ê1?ü£???μ?á?ê??T?ˉ×÷£?2éó?ía2?ê±?ó?′
SysTick->VAL=0; //??á???êy?÷
do
{
temp=SysTick->CTRL; //?áè?μ±?°μ1??êy?μ
}
while((temp&0x01)&&(!(temp&(1<<16)))); //μè′yê±??μ?′?
SysTick->CTRL=0; //1?±???êy?÷
SysTick->VAL=0; //??????êy?÷
}
/*******************************************************************************
* oˉ êy ?? : RCC_HSE_Configuration
* oˉêy1|?ü : ×??¨ò??μí3ê±?ó£??éò?í¨1yDT??PLLê±?ó?′oí±??μ?μêyêμ??ê±?óμ÷??
* ê? è? : ?T
* ê? 3? : ?T
*******************************************************************************/
void RCC_HSE_Configuration() //×??¨ò??μí3ê±??£¨?éò?DT??ê±?ó£?
{
RCC_DeInit(); //??íaéèRCC??′??÷??éè?aè±ê??μ
RCC_HSEConfig(RCC_HSE_ON);//éè??ía2????ù?§??£¨HSE£?
if(RCC_WaitForHSEStartUp()==SUCCESS) //μè′yHSE?e??
{
RCC_HCLKConfig(RCC_SYSCLK_Div1);//éè??AHBê±?ó£¨HCLK£?
RCC_PCLK1Config(RCC_HCLK_Div2);//éè??μí?ùAHBê±?ó£¨PCLK1£?
RCC_PCLK2Config(RCC_HCLK_Div1);//éè?????ùAHBê±?ó£¨PCLK2£?
RCC_PLLConfig(RCC_PLLSource_HSE_Div2,RCC_PLLMul_9);//éè??PLLê±?ó?′?°±??μ?μêy
RCC_PLLCmd(ENABLE); //ê1?ü?ò??ê§?üPLL
while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY)==RESET);//?ì2é???¨μ?RCC±ê????éè??ó?·?,PLL?íD÷
RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);//éè???μí3ê±?ó£¨SYSCLK£?
while(RCC_GetSYSCLKSource()!=0x08);//·μ??ó?×÷?μí3ê±?óμ?ê±?ó?′,0x08£oPLL×÷?a?μí3ê±?ó
}
}
//-----------------------------------------------------------------------------------
void TIM3_Int_Init(u16 arr,u16 psc)
{
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
NVIC_InitTypeDef NVIC_InitStructure;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE); //ê±?óê1?ü
TIM_TimeBaseStructure.TIM_Period = arr; //éè???ú??ò????üD?ê??t×°è????ˉμ?×??ˉ??×°????′??÷?ü?úμ??μ ??êyμ?5000?a500ms
TIM_TimeBaseStructure.TIM_Prescaler =psc; //éè??ó?à′×÷?aTIMxê±?ó?μ?ê3yêyμ??¤·??μ?μ 10Khzμ???êy?μ?ê
TIM_TimeBaseStructure.TIM_ClockDivision = 0; //éè??ê±?ó·???:TDTS = Tck_tim
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; //TIM?òé???êy?£ê?
TIM_TimeBaseInit(TIM3, &TIM_TimeBaseStructure); //?ù?YTIM_TimeBaseInitStruct?D???¨μ?2?êy3?ê??ˉTIMxμ?ê±???ùêyμ¥??
TIM_ITConfig( //ê1?ü?ò??ê§?ü???¨μ?TIM?D??
TIM3, //TIM2
TIM_IT_Update ,
ENABLE //ê1?ü
);
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0); //×??o?óμ?
NVIC_InitStructure.NVIC_IRQChannel = TIM3_IRQn; //TIM3?D??
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; //?è??ó??è??0??
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; //′óó??è??3??
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; //IRQí¨μà±?ê1?ü
NVIC_Init(&NVIC_InitStructure); //?ù?YNVIC_InitStruct?D???¨μ?2?êy3?ê??ˉíaéèNVIC??′??÷
TIM_Cmd(TIM3, ENABLE); //ê1?üTIMxíaéè
}
void TIM3_IRQHandler(void) //TIM3?D??
{
UART1_SendByte(0x00);
if (TIM_GetITStatus(TIM3, TIM_IT_Update) != RESET) //?ì2é???¨μ?TIM?D??·¢éúó?·?:TIM ?D???′
{
// UART1_SendByte(0x01);
// TIM_ClearITPendingBit(TIM3, TIM_IT_Update ); //??3yTIMxμ??D??′y′|àí??:TIM ?D???′
// UART1_SendByte(0x02);
temper=readtemp();
sprintf(UART1.TxBuff,"μ±?°???è?a£o%0.4lf ??\r\n",temper);
UART1.Length = strlen(UART1.TxBuff);
for(UART1.Counter = 0;UART1.Counter<UART1.Length;UART1.Counter++)
{
UART1_SendByte(UART1.TxBuff[UART1.Counter]);
}
// UART1_SendByte(0x03);
// ADC_value();
UART1_SendByte(0x04);
}
}
//========================================--NO MORE--===============================================
====================================================================================
DS18b20、、、、、、、、、、
#include "System_Main.h"
#include "System_Macro.h"
/*******************************************************************************
* oˉ êy ?? : ds18b20_init
* oˉêy1|?ü : IO???úê±?ó3?ê??ˉoˉêy
* ê? è? : ?T
* ê? 3? : ?T
*******************************************************************************/
void ds18b20_init()
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOG,ENABLE);
GPIO_InitStructure.GPIO_Pin=dq;
GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;
GPIO_Init(GPIO_ds18b20,&GPIO_InitStructure);
}
/*******************************************************************************
* oˉ êy ?? : DQININT
* oˉêy1|?ü : ê?è?????
* ê? è? : ?T
* ê? 3? : ?T
*******************************************************************************/
void DQININT() //ê?è?????
{
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin=dq;
GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IN_FLOATING;
GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;
GPIO_Init(GPIO_ds18b20,&GPIO_InitStructure);
}
/*******************************************************************************
* oˉ êy ?? : DQOUTINT
* oˉêy1|?ü : ê?3?????
* ê? è? : ?T
* ê? 3? : ?T
*******************************************************************************/
void DQOUTINT() //ê?3?????
{
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin=dq;
GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;
GPIO_Init(GPIO_ds18b20,&GPIO_InitStructure);
}
/*******************************************************************************
* oˉ êy ?? : ds18b20init
* oˉêy1|?ü : DS18B203?ê??ˉê±Dò
* ê? è? : ?T
* ê? 3? : ?T
*******************************************************************************/
void ds18b20init()
{
DQOUTINT();//ê?3?
ds18b20_dq_L;
delay_us(480);//?óê±480?¢??
ds18b20_dq_H;
delay_us(480);//?óê±480?¢??
}
/*******************************************************************************
* oˉ êy ?? : ds18b20wr
* oˉêy1|?ü : DS18B20D′êy?Yê±Dò
* ê? è? : dat
* ê? 3? : ?T
*******************************************************************************/
void ds18b20wr(u8 dat)
{
u8 i=0;
DQOUTINT();//ê?3?
for(i=0;i<8;i++)
{
ds18b20_dq_L; //à-μí
delay_us(15);//?óê±15?¢??
if((dat&0x01)==1)
{
ds18b20_dq_H;
}
else
{
ds18b20_dq_L;
}
delay_us(60);//?óê±60?¢??
ds18b20_dq_H;
dat>>=1;//×?±???ò???êy?Yμ?·¢?í
}
}
/*******************************************************************************
* oˉ êy ?? : DS18b20rd
* oˉêy1|?ü : DS18B20?áêy?Yê±Dò
* ê? è? : ?T
* ê? 3? : value
*******************************************************************************/
u8 DS18b20rd()
{
u8 i=0,value=0;
for(i=0;i<8;i++)
{
value>>=1;
DQOUTINT();//ê?3?
ds18b20_dq_L; //à-μí
delay_us(4);//?óê±4?¢??
ds18b20_dq_H;
delay_us(10);//?óê±10?¢??
DQININT(); //ê?è?????
if(GPIO_ReadInputDataBit(GPIO_ds18b20,dq)==1)
{
value|=0x80;//?áêy?Y ′óμí???aê?
}
delay_us(45);//?óê±45?¢??
}
return value;
}
/*******************************************************************************
* oˉ êy ?? : readtemp
* oˉêy1|?ü : DS18B2???è??′??÷????£????è?áè?
* ê? è? : ?T
* ê? 3? : value
*******************************************************************************/
double readtemp() //?áè????è?úDèòa?′??μ?
{
u16 temp;
extern u8 a,b;
extern double value1;
ds18b20init(); //3?ê??ˉ
ds18b20wr(0xcc); //·¢?ío???ROM??á?
ds18b20wr(0x44); //·¢?í???è×a????á?
delay_ms(800);
ds18b20init(); //3?ê??ˉ
ds18b20wr(0xcc); //·¢?ío???ROM??á?
ds18b20wr(0xbe); //·¢?á?Y′??÷??á?
a=DS18b20rd(); //???èμ?μí°???
b=DS18b20rd(); //???èμ???°???
temp=b;
temp=(temp<<8)+a;
if((temp&0xf800)==0xf800)
{
temp=(~temp)+1;
value1=temp*(-0.0625);
}
else
{
value1=temp*0.0625;
}
return value1;
}
初始化void RCC_HSE_Configuration() 之后,温度就读不出来了,,不初始化void RCC_HSE_Configuration(),,温度读的正常,,,这是为什么
//==================================================================================================
//==================================================================================================
// Name : systick.c
// Purpose : sysclock
// Version : Ver 1.0
// Author : Nature Power
// Date : 20170424
// Hardware: ARM.Cortex M3.STM32F103ZE
#include "System_Main.h"
/*******************************************************************************
* oˉ êy ?? : delay_us
* oˉêy1|?ü : ?óê±oˉêy£??óê±us
* ê? è? : i
* ê? 3? : ?T
*******************************************************************************/
double temper;
void delay_us(u32 i)
{
u32 temp;
SysTick->LOAD=9*i; //éè????×°êy?μ, 72MHZê±
SysTick->CTRL=0X01; //ê1?ü£???μ?á?ê??T?ˉ×÷£?2éó?ía2?ê±?ó?′
SysTick->VAL=0; //??á???êy?÷
do
{
temp=SysTick->CTRL; //?áè?μ±?°μ1??êy?μ
}
while((temp&0x01)&&(!(temp&(1<<16)))); //μè′yê±??μ?′?
SysTick->CTRL=0; //1?±???êy?÷
SysTick->VAL=0; //??????êy?÷
}
/*******************************************************************************
* oˉ êy ?? : delay_ms
* oˉêy1|?ü : ?óê±oˉêy£??óê±ms
* ê? è? : i
* ê? 3? : ?T
*******************************************************************************/
void delay_ms(u32 i)
{
u32 temp;
SysTick->LOAD=9000*i; //éè????×°êy?μ, 72MHZê±
SysTick->CTRL=0X01; //ê1?ü£???μ?á?ê??T?ˉ×÷£?2éó?ía2?ê±?ó?′
SysTick->VAL=0; //??á???êy?÷
do
{
temp=SysTick->CTRL; //?áè?μ±?°μ1??êy?μ
}
while((temp&0x01)&&(!(temp&(1<<16)))); //μè′yê±??μ?′?
SysTick->CTRL=0; //1?±???êy?÷
SysTick->VAL=0; //??????êy?÷
}
/*******************************************************************************
* oˉ êy ?? : RCC_HSE_Configuration
* oˉêy1|?ü : ×??¨ò??μí3ê±?ó£??éò?í¨1yDT??PLLê±?ó?′oí±??μ?μêyêμ??ê±?óμ÷??
* ê? è? : ?T
* ê? 3? : ?T
*******************************************************************************/
void RCC_HSE_Configuration() //×??¨ò??μí3ê±??£¨?éò?DT??ê±?ó£?
{
RCC_DeInit(); //??íaéèRCC??′??÷??éè?aè±ê??μ
RCC_HSEConfig(RCC_HSE_ON);//éè??ía2????ù?§??£¨HSE£?
if(RCC_WaitForHSEStartUp()==SUCCESS) //μè′yHSE?e??
{
RCC_HCLKConfig(RCC_SYSCLK_Div1);//éè??AHBê±?ó£¨HCLK£?
RCC_PCLK1Config(RCC_HCLK_Div2);//éè??μí?ùAHBê±?ó£¨PCLK1£?
RCC_PCLK2Config(RCC_HCLK_Div1);//éè?????ùAHBê±?ó£¨PCLK2£?
RCC_PLLConfig(RCC_PLLSource_HSE_Div2,RCC_PLLMul_9);//éè??PLLê±?ó?′?°±??μ?μêy
RCC_PLLCmd(ENABLE); //ê1?ü?ò??ê§?üPLL
while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY)==RESET);//?ì2é???¨μ?RCC±ê????éè??ó?·?,PLL?íD÷
RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);//éè???μí3ê±?ó£¨SYSCLK£?
while(RCC_GetSYSCLKSource()!=0x08);//·μ??ó?×÷?μí3ê±?óμ?ê±?ó?′,0x08£oPLL×÷?a?μí3ê±?ó
}
}
//-----------------------------------------------------------------------------------
void TIM3_Int_Init(u16 arr,u16 psc)
{
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
NVIC_InitTypeDef NVIC_InitStructure;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE); //ê±?óê1?ü
TIM_TimeBaseStructure.TIM_Period = arr; //éè???ú??ò????üD?ê??t×°è????ˉμ?×??ˉ??×°????′??÷?ü?úμ??μ ??êyμ?5000?a500ms
TIM_TimeBaseStructure.TIM_Prescaler =psc; //éè??ó?à′×÷?aTIMxê±?ó?μ?ê3yêyμ??¤·??μ?μ 10Khzμ???êy?μ?ê
TIM_TimeBaseStructure.TIM_ClockDivision = 0; //éè??ê±?ó·???:TDTS = Tck_tim
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; //TIM?òé???êy?£ê?
TIM_TimeBaseInit(TIM3, &TIM_TimeBaseStructure); //?ù?YTIM_TimeBaseInitStruct?D???¨μ?2?êy3?ê??ˉTIMxμ?ê±???ùêyμ¥??
TIM_ITConfig( //ê1?ü?ò??ê§?ü???¨μ?TIM?D??
TIM3, //TIM2
TIM_IT_Update ,
ENABLE //ê1?ü
);
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0); //×??o?óμ?
NVIC_InitStructure.NVIC_IRQChannel = TIM3_IRQn; //TIM3?D??
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; //?è??ó??è??0??
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; //′óó??è??3??
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; //IRQí¨μà±?ê1?ü
NVIC_Init(&NVIC_InitStructure); //?ù?YNVIC_InitStruct?D???¨μ?2?êy3?ê??ˉíaéèNVIC??′??÷
TIM_Cmd(TIM3, ENABLE); //ê1?üTIMxíaéè
}
void TIM3_IRQHandler(void) //TIM3?D??
{
UART1_SendByte(0x00);
if (TIM_GetITStatus(TIM3, TIM_IT_Update) != RESET) //?ì2é???¨μ?TIM?D??·¢éúó?·?:TIM ?D???′
{
// UART1_SendByte(0x01);
// TIM_ClearITPendingBit(TIM3, TIM_IT_Update ); //??3yTIMxμ??D??′y′|àí??:TIM ?D???′
// UART1_SendByte(0x02);
temper=readtemp();
sprintf(UART1.TxBuff,"μ±?°???è?a£o%0.4lf ??\r\n",temper);
UART1.Length = strlen(UART1.TxBuff);
for(UART1.Counter = 0;UART1.Counter<UART1.Length;UART1.Counter++)
{
UART1_SendByte(UART1.TxBuff[UART1.Counter]);
}
// UART1_SendByte(0x03);
// ADC_value();
UART1_SendByte(0x04);
}
}
//========================================--NO MORE--===============================================
====================================================================================
DS18b20、、、、、、、、、、
#include "System_Main.h"
#include "System_Macro.h"
/*******************************************************************************
* oˉ êy ?? : ds18b20_init
* oˉêy1|?ü : IO???úê±?ó3?ê??ˉoˉêy
* ê? è? : ?T
* ê? 3? : ?T
*******************************************************************************/
void ds18b20_init()
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOG,ENABLE);
GPIO_InitStructure.GPIO_Pin=dq;
GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;
GPIO_Init(GPIO_ds18b20,&GPIO_InitStructure);
}
/*******************************************************************************
* oˉ êy ?? : DQININT
* oˉêy1|?ü : ê?è?????
* ê? è? : ?T
* ê? 3? : ?T
*******************************************************************************/
void DQININT() //ê?è?????
{
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin=dq;
GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IN_FLOATING;
GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;
GPIO_Init(GPIO_ds18b20,&GPIO_InitStructure);
}
/*******************************************************************************
* oˉ êy ?? : DQOUTINT
* oˉêy1|?ü : ê?3?????
* ê? è? : ?T
* ê? 3? : ?T
*******************************************************************************/
void DQOUTINT() //ê?3?????
{
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin=dq;
GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;
GPIO_Init(GPIO_ds18b20,&GPIO_InitStructure);
}
/*******************************************************************************
* oˉ êy ?? : ds18b20init
* oˉêy1|?ü : DS18B203?ê??ˉê±Dò
* ê? è? : ?T
* ê? 3? : ?T
*******************************************************************************/
void ds18b20init()
{
DQOUTINT();//ê?3?
ds18b20_dq_L;
delay_us(480);//?óê±480?¢??
ds18b20_dq_H;
delay_us(480);//?óê±480?¢??
}
/*******************************************************************************
* oˉ êy ?? : ds18b20wr
* oˉêy1|?ü : DS18B20D′êy?Yê±Dò
* ê? è? : dat
* ê? 3? : ?T
*******************************************************************************/
void ds18b20wr(u8 dat)
{
u8 i=0;
DQOUTINT();//ê?3?
for(i=0;i<8;i++)
{
ds18b20_dq_L; //à-μí
delay_us(15);//?óê±15?¢??
if((dat&0x01)==1)
{
ds18b20_dq_H;
}
else
{
ds18b20_dq_L;
}
delay_us(60);//?óê±60?¢??
ds18b20_dq_H;
dat>>=1;//×?±???ò???êy?Yμ?·¢?í
}
}
/*******************************************************************************
* oˉ êy ?? : DS18b20rd
* oˉêy1|?ü : DS18B20?áêy?Yê±Dò
* ê? è? : ?T
* ê? 3? : value
*******************************************************************************/
u8 DS18b20rd()
{
u8 i=0,value=0;
for(i=0;i<8;i++)
{
value>>=1;
DQOUTINT();//ê?3?
ds18b20_dq_L; //à-μí
delay_us(4);//?óê±4?¢??
ds18b20_dq_H;
delay_us(10);//?óê±10?¢??
DQININT(); //ê?è?????
if(GPIO_ReadInputDataBit(GPIO_ds18b20,dq)==1)
{
value|=0x80;//?áêy?Y ′óμí???aê?
}
delay_us(45);//?óê±45?¢??
}
return value;
}
/*******************************************************************************
* oˉ êy ?? : readtemp
* oˉêy1|?ü : DS18B2???è??′??÷????£????è?áè?
* ê? è? : ?T
* ê? 3? : value
*******************************************************************************/
double readtemp() //?áè????è?úDèòa?′??μ?
{
u16 temp;
extern u8 a,b;
extern double value1;
ds18b20init(); //3?ê??ˉ
ds18b20wr(0xcc); //·¢?ío???ROM??á?
ds18b20wr(0x44); //·¢?í???è×a????á?
delay_ms(800);
ds18b20init(); //3?ê??ˉ
ds18b20wr(0xcc); //·¢?ío???ROM??á?
ds18b20wr(0xbe); //·¢?á?Y′??÷??á?
a=DS18b20rd(); //???èμ?μí°???
b=DS18b20rd(); //???èμ???°???
temp=b;
temp=(temp<<8)+a;
if((temp&0xf800)==0xf800)
{
temp=(~temp)+1;
value1=temp*(-0.0625);
}
else
{
value1=temp*0.0625;
}
return value1;
}
初始化void RCC_HSE_Configuration() 之后,温度就读不出来了,,不初始化void RCC_HSE_Configuration(),,温度读的正常,,,这是为什么
那是你的IO频率设置的不对吧