stm32: add STM32H723 support

Signed-off-by: Chen.BJ from BigTreeTech chenbj@biqu3d.com
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
bigtreetech 2022-11-23 11:29:44 +08:00 committed by Kevin O'Connor
parent 50b2e2e67e
commit a42f615881
5 changed files with 119 additions and 61 deletions

View file

@ -74,6 +74,7 @@ class PrinterTemperatureMCU:
('stm32g0', self.config_stm32g0),
('stm32g4', self.config_stm32g0),
('stm32l4', self.config_stm32g0),
('stm32h723', self.config_stm32h723),
('stm32h7', self.config_stm32h7),
('', self.config_unknown)]
for name, func in cfg_funcs:
@ -146,6 +147,11 @@ class PrinterTemperatureMCU:
cal_adc_130 = self.read16(0x1FFF75CA) * 3.0 / (3.3 * 4095.)
self.slope = (130. - 30.) / (cal_adc_130 - cal_adc_30)
self.base_temperature = self.calc_base(30., cal_adc_30)
def config_stm32h723(self):
cal_adc_30 = self.read16(0x1FF1E820) / 4095.
cal_adc_130 = self.read16(0x1FF1E840) / 4095.
self.slope = (130. - 30.) / (cal_adc_130 - cal_adc_30)
self.base_temperature = self.calc_base(30., cal_adc_30)
def config_stm32h7(self):
cal_adc_30 = self.read16(0x1FF1E820) / 65535.
cal_adc_110 = self.read16(0x1FF1E840) / 65535.