mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-01-03 13:30:40 -07:00
Add support for gd31f303xe MCU used on Creality K1 Max (and others)
This commit is contained in:
parent
1fc6d214f4
commit
a7bce2f3d3
1 changed files with 4 additions and 0 deletions
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue