From 172abc305b68a0ccb9cd0c58b342be206a0ca73c Mon Sep 17 00:00:00 2001 From: "J.C. Nelson" <32139633+xC0000005@users.noreply.github.com> Date: Mon, 6 May 2019 16:07:13 -0700 Subject: [PATCH] Malyan M200 core fixes (#13927) --- Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp | 4 ++-- Marlin/src/pins/pins_MALYAN_M200.h | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp b/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp index 179bc1417..20f1a7bc0 100644 --- a/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp @@ -52,8 +52,8 @@ #define END_FLASH_ADDR 0x00020000 #endif -#ifdef __STM32F1__ -// For STM32F103ZET6/STM32F103VET6 +#if defined(__STM32F1__) || defined(STM32F1xx) || defined(STM32F0xx) +// For STM32F103ZET6/STM32F103VET6/STM32F0xx // SRAM (0x20000000 - 0x20010000) (64kb) // FLASH (0x00000000 - 0x00080000) (512kb) // diff --git a/Marlin/src/pins/pins_MALYAN_M200.h b/Marlin/src/pins/pins_MALYAN_M200.h index fc61cdfdd..b35e77966 100644 --- a/Marlin/src/pins/pins_MALYAN_M200.h +++ b/Marlin/src/pins/pins_MALYAN_M200.h @@ -24,7 +24,7 @@ * MALYAN M200 pin assignments */ -#ifndef __STM32F1__ +#if !defined(__STM32F1__) && !defined(STM32F1xx) && !defined(STM32F0xx) #error "Oops! You must be compiling for STM32." #endif @@ -37,6 +37,13 @@ #define SDSS SS_PIN +// Based on PWM timer usage, we have to use these timers and soft PWM for the fans +// On STM32F103: +// PB3, PB6, PB7, and PB8 can be used with pwm, which rules out TIM2 and TIM4. +// On STM32F070, 16 and 17 are in use, but 1 and 3 are available. +#define STEP_TIMER 1 +#define TEMP_TIMER 3 + // // Limit Switches //