diff --git a/klippy/extras/temperature_mcu.py b/klippy/extras/temperature_mcu.py index 6f3386a4b..f4bf65521 100644 --- a/klippy/extras/temperature_mcu.py +++ b/klippy/extras/temperature_mcu.py @@ -80,6 +80,7 @@ class PrinterTemperatureMCU: ('stm32l4', self.config_stm32g0), ('stm32h723', self.config_stm32h723), ('stm32h7', self.config_stm32h7), + ('gd32f303xe', self.config_gd32f303xe), ('', self.config_unknown)] for name, func in cfg_funcs: if self.mcu_type.startswith(name): @@ -164,6 +165,9 @@ class PrinterTemperatureMCU: cal_adc_110 = self.read16(0x1FF1E840) / 65535. self.slope = (110. - 30.) / (cal_adc_110 - cal_adc_30) self.base_temperature = self.calc_base(30., cal_adc_30) + def config_gd32f303xe(self): + self.slope = 3.3 / -.004100 + self.base_temperature = self.calc_base(25., 1.45 / 3.3) def read16(self, addr): params = self.debug_read_cmd.send([1, addr]) return params['val']