From 8d336134388da92e4606226e87f5215fc404f494 Mon Sep 17 00:00:00 2001 From: QQY <979527038@qq.com> Date: Mon, 4 Sep 2023 14:05:48 +0800 Subject: [PATCH] =?utf8?q?=E4=BB=A3=E7=A0=81bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- STM32/code/MAX31865/max31865.c | 33 --------------------------------- STM32/code/app/App_ADC.c | 6 +++++- STM32/code/app/Rn8302_cal.c | 2 +- STM32/code/mcu_com/mcu_com.c | 3 +++ 4 files changed, 9 insertions(+), 35 deletions(-) diff --git a/STM32/code/MAX31865/max31865.c b/STM32/code/MAX31865/max31865.c index a9a421e4..01b65db7 100644 --- a/STM32/code/MAX31865/max31865.c +++ b/STM32/code/MAX31865/max31865.c @@ -203,39 +203,6 @@ int Get_MAX31865Temp(uint8_t ch,float *p) return 1; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /* 2023_0620 re-write max31865 driver for: diff --git a/STM32/code/app/App_ADC.c b/STM32/code/app/App_ADC.c index 07ec2b6c..0cb4afe0 100644 --- a/STM32/code/app/App_ADC.c +++ b/STM32/code/app/App_ADC.c @@ -122,6 +122,7 @@ static void _Check_PT100_Hard() if((chipflashpara.temp_ctrl_para.PT100_4_Vaild == FALSE) && (i == PT100_CH_4)) { Mcu_to_Arm_state.sensor_self_test |=(1<<6); + Mcu_to_Arm_state.sensor_state &=~(1<<7); continue; } //Get_MAX31865Temp(i,&temp); @@ -179,7 +180,10 @@ static void _Conv_ADC_PT100_To_Temperture() //temp = Pt100_Temp(i); //Get_MAX31865Temp(i,&rt_temperture[i]); MAX31865_S3_ReadTemp(i,&rt_temperture[i]); + printf("ÎÂ¶È = %.3f\r\n",rt_temperture[i]); + } + printf("______________________________________________________________\r\n"); } @@ -326,7 +330,7 @@ static void Power_Adc_Daemon() { now_timer = HAL_GetTick(); if((now_timer-start_power_off_timer)>=DC_POWEROFF_MAX_TIME) - MyGpioWrite(PIN_OUT_POWER_SW, LOW); /* µç³Ø¹©µç¶Ï¿ª */ + MyGpioWrite(PIN_OUT_POWER_SW, LOW); /* µç³Ø¹©µç¶Ï¿ª */ } } diff --git a/STM32/code/app/Rn8302_cal.c b/STM32/code/app/Rn8302_cal.c index 2379f25b..ef80f9b7 100644 --- a/STM32/code/app/Rn8302_cal.c +++ b/STM32/code/app/Rn8302_cal.c @@ -1681,7 +1681,7 @@ uint8_t Rd_EMUReg(uint16_t RN8302Reg,uint8_t * dst) -BOOL Wr_EMUReg(uint16_t WrRegadr,uint32_t WrRegDat) +BOOL Wr_EMUReg(uint16_t WrRegadr,uint32_t WrRegDat) { uint8_t i; uint32_t EMUOpData; diff --git a/STM32/code/mcu_com/mcu_com.c b/STM32/code/mcu_com/mcu_com.c index 9b352574..046fa02f 100644 --- a/STM32/code/mcu_com/mcu_com.c +++ b/STM32/code/mcu_com/mcu_com.c @@ -460,11 +460,13 @@ void ArmMcu_Set(ARM_SET_E fun, uint8_t *data) { Mcu_Fan_Contr.time_config.time_enable = true; Md_RegisterData.State_Register1 |=(1<<3); + Mcu_to_Arm_state.sensor_self_test |= (1<<7); } else { Mcu_Fan_Contr.time_config.time_enable = false; Md_RegisterData.State_Register1 &=~(1<<3); + Mcu_to_Arm_state.sensor_self_test &=~ (1<<7); } SetRunFlag(TCM_FLAG_CHIPFLASHPARA_Save, FLAG_SET); break; @@ -977,6 +979,7 @@ void Mcu_Set_Config_Enable(ARM_CONFIG_E fan, uint8_t *data) else { chipflashpara.temp_ctrl_para.PT100_4_Vaild = true; + Mcu_to_Arm_state.sensor_state |=(1<<7); Md_RegisterData.State_Register1 |=(1<<11); } -- 2.34.1