Fix BLTOUCH and FAN PWM conflicts on SKR E3 boards (#15547)
This commit is contained in:
parent
8668571bee
commit
53abfdc2c3
|
@ -27,8 +27,8 @@
|
||||||
|
|
||||||
#ifdef __STM32F1__
|
#ifdef __STM32F1__
|
||||||
|
|
||||||
#include "HAL.h"
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
#include "HAL.h"
|
||||||
|
|
||||||
#include <STM32ADC.h>
|
#include <STM32ADC.h>
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
|
|
||||||
#ifdef __STM32F1__
|
#ifdef __STM32F1__
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <libmaple/timer.h>
|
#include <libmaple/timer.h>
|
||||||
|
#include "../../core/boards.h"
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Defines
|
// Defines
|
||||||
|
@ -54,7 +55,13 @@ typedef uint16_t hal_timer_t;
|
||||||
#define TEMP_TIMER_NUM 2 // index of timer to use for temperature
|
#define TEMP_TIMER_NUM 2 // index of timer to use for temperature
|
||||||
//#define TEMP_TIMER_NUM 4 // 2->4, Timer 2 for Stepper Current PWM
|
//#define TEMP_TIMER_NUM 4 // 2->4, Timer 2 for Stepper Current PWM
|
||||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||||
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH
|
|
||||||
|
#if MB(BIGTREE_SKR_MINI_E3, BIGTREE_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
|
||||||
|
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
|
||||||
|
#define SERVO0_TIMER_NUM 8
|
||||||
|
#else
|
||||||
|
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH
|
||||||
|
#endif
|
||||||
|
|
||||||
#define STEP_TIMER_IRQ_PRIO 1
|
#define STEP_TIMER_IRQ_PRIO 1
|
||||||
#define TEMP_TIMER_IRQ_PRIO 2
|
#define TEMP_TIMER_IRQ_PRIO 2
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "macros.h"
|
||||||
|
|
||||||
#define BOARD_UNKNOWN -1
|
#define BOARD_UNKNOWN -1
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -316,4 +318,7 @@
|
||||||
|
|
||||||
#define BOARD_LINUX_RAMPS 9999
|
#define BOARD_LINUX_RAMPS 9999
|
||||||
|
|
||||||
#define MB(board) (defined(BOARD_##board) && MOTHERBOARD==BOARD_##board)
|
#define _MB_1(B) (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B)
|
||||||
|
#define MB(V...) DO(MB,||,V)
|
||||||
|
|
||||||
|
#define IS_MELZI MB(MELZI, MELZI_CREALITY, MELZI_MAKR3D, MELZI_MALYAN, MELZI_TRONXY)
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#if MB(5DPRINT)
|
#if MB(5DPRINT)
|
||||||
#define DIGIPOT_I2C_FACTOR 117.96
|
#define DIGIPOT_I2C_FACTOR 117.96
|
||||||
#define DIGIPOT_I2C_MAX_CURRENT 1.736
|
#define DIGIPOT_I2C_MAX_CURRENT 1.736
|
||||||
#elif MB(AZTEEG_X5_MINI) || MB(AZTEEG_X5_MINI_WIFI)
|
#elif MB(AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI)
|
||||||
#define DIGIPOT_I2C_FACTOR 113.5
|
#define DIGIPOT_I2C_FACTOR 113.5
|
||||||
#define DIGIPOT_I2C_MAX_CURRENT 2.0
|
#define DIGIPOT_I2C_MAX_CURRENT 2.0
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -562,7 +562,7 @@
|
||||||
#define BOOT_MARLIN_LOGO_SMALL
|
#define BOOT_MARLIN_LOGO_SMALL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IS_RE_ARM_BOARD (MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_14_RE_ARM_SF))
|
#define IS_RE_ARM_BOARD MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)
|
||||||
|
|
||||||
#define HAS_SDCARD_CONNECTION EITHER(TARGET_LPC1768, ADAFRUIT_GRAND_CENTRAL_M4)
|
#define HAS_SDCARD_CONNECTION EITHER(TARGET_LPC1768, ADAFRUIT_GRAND_CENTRAL_M4)
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
|
|
||||||
// MaKrPanel, Mini Viki, Viki 2.0, AZSMZ 12864 ST7565 controller
|
// MaKrPanel, Mini Viki, Viki 2.0, AZSMZ 12864 ST7565 controller
|
||||||
|
|
||||||
#define SMART_RAMPS (MB(RAMPS_SMART_EFB) || MB(RAMPS_SMART_EEB) || MB(RAMPS_SMART_EFF) || MB(RAMPS_SMART_EEF) || MB(RAMPS_SMART_SF))
|
#define SMART_RAMPS MB(RAMPS_SMART_EFB, RAMPS_SMART_EEB, RAMPS_SMART_EFF, RAMPS_SMART_EEF, RAMPS_SMART_SF)
|
||||||
#define U8G_CLASS U8GLIB_64128N_2X_HAL // 4 stripes (HW-SPI)
|
#define U8G_CLASS U8GLIB_64128N_2X_HAL // 4 stripes (HW-SPI)
|
||||||
#if SMART_RAMPS || DOGLCD_SCK != SCK_PIN || DOGLCD_MOSI != MOSI_PIN
|
#if SMART_RAMPS || DOGLCD_SCK != SCK_PIN || DOGLCD_MOSI != MOSI_PIN
|
||||||
#define FORCE_SOFT_SPI // SW-SPI
|
#define FORCE_SOFT_SPI // SW-SPI
|
||||||
|
|
|
@ -49,11 +49,11 @@
|
||||||
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
|
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
|
||||||
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
|
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
|
||||||
#define CPU_ST7920_DELAY_3 DELAY_NS(50)
|
#define CPU_ST7920_DELAY_3 DELAY_NS(50)
|
||||||
#elif MB(3DRAG) || MB(K8200) || MB(K8400) || MB(SILVER_GATE)
|
#elif MB(3DRAG, K8200, K8400, SILVER_GATE)
|
||||||
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
|
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
|
||||||
#define CPU_ST7920_DELAY_2 DELAY_NS(188)
|
#define CPU_ST7920_DELAY_2 DELAY_NS(188)
|
||||||
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
|
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
|
||||||
#elif MB(MINIRAMBO) || MB(EINSY_RAMBO) || MB(EINSY_RETRO)
|
#elif MB(MINIRAMBO, EINSY_RAMBO, EINSY_RETRO)
|
||||||
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
|
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
|
||||||
#define CPU_ST7920_DELAY_2 DELAY_NS(250)
|
#define CPU_ST7920_DELAY_2 DELAY_NS(250)
|
||||||
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
|
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
|
||||||
|
|
|
@ -164,7 +164,7 @@
|
||||||
#define SHIFT_OUT 34
|
#define SHIFT_OUT 34
|
||||||
#define SHIFT_EN 44
|
#define SHIFT_EN 44
|
||||||
|
|
||||||
#if MB(MEGATRONICS_31) || MB(MEGATRONICS_32)
|
#if MB(MEGATRONICS_31, MEGATRONICS_32)
|
||||||
#define SD_DETECT_PIN 56
|
#define SD_DETECT_PIN 56
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -35,15 +35,15 @@
|
||||||
|
|
||||||
#define MAX_EXTRUDERS 6
|
#define MAX_EXTRUDERS 6
|
||||||
|
|
||||||
#if MB(RAMPS_13_EFB) || MB(RAMPS_14_EFB) || MB(RAMPS_PLUS_EFB) || MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_SMART_EFB) || MB(RAMPS_DUO_EFB) || MB(RAMPS4DUE_EFB)
|
#if MB(RAMPS_13_EFB, RAMPS_14_EFB, RAMPS_PLUS_EFB, RAMPS_14_RE_ARM_EFB, RAMPS_SMART_EFB, RAMPS_DUO_EFB, RAMPS4DUE_EFB)
|
||||||
#define IS_RAMPS_EFB
|
#define IS_RAMPS_EFB
|
||||||
#elif MB(RAMPS_13_EEB) || MB(RAMPS_14_EEB) || MB(RAMPS_PLUS_EEB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_SMART_EEB) || MB(RAMPS_DUO_EEB) || MB(RAMPS4DUE_EEB)
|
#elif MB(RAMPS_13_EEB, RAMPS_14_EEB, RAMPS_PLUS_EEB, RAMPS_14_RE_ARM_EEB, RAMPS_SMART_EEB, RAMPS_DUO_EEB, RAMPS4DUE_EEB)
|
||||||
#define IS_RAMPS_EEB
|
#define IS_RAMPS_EEB
|
||||||
#elif MB(RAMPS_13_EFF) || MB(RAMPS_14_EFF) || MB(RAMPS_PLUS_EFF) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_SMART_EFF) || MB(RAMPS_DUO_EFF) || MB(RAMPS4DUE_EFF)
|
#elif MB(RAMPS_13_EFF, RAMPS_14_EFF, RAMPS_PLUS_EFF, RAMPS_14_RE_ARM_EFF, RAMPS_SMART_EFF, RAMPS_DUO_EFF, RAMPS4DUE_EFF)
|
||||||
#define IS_RAMPS_EFF
|
#define IS_RAMPS_EFF
|
||||||
#elif MB(RAMPS_13_EEF) || MB(RAMPS_14_EEF) || MB(RAMPS_PLUS_EEF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_SMART_EEF) || MB(RAMPS_DUO_EEF) || MB(RAMPS4DUE_EEF)
|
#elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF)
|
||||||
#define IS_RAMPS_EEF
|
#define IS_RAMPS_EEF
|
||||||
#elif MB(RAMPS_13_SF) || MB(RAMPS_14_SF) || MB(RAMPS_PLUS_SF) || MB(RAMPS_14_RE_ARM_SF) || MB(RAMPS_SMART_SF) || MB(RAMPS_DUO_SF) || MB(RAMPS4DUE_SF)
|
#elif MB(RAMPS_13_SF, RAMPS_14_SF, RAMPS_PLUS_SF, RAMPS_14_RE_ARM_SF, RAMPS_SMART_SF, RAMPS_DUO_SF, RAMPS4DUE_SF)
|
||||||
#define IS_RAMPS_SF
|
#define IS_RAMPS_SF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
|
|
||||||
#elif MB(RAMBO)
|
#elif MB(RAMBO)
|
||||||
#include "rambo/pins_RAMBO.h" // ATmega2560 env:rambo
|
#include "rambo/pins_RAMBO.h" // ATmega2560 env:rambo
|
||||||
#elif MB(MINIRAMBO) || MB(MINIRAMBO_10A)
|
#elif MB(MINIRAMBO, MINIRAMBO_10A)
|
||||||
#include "rambo/pins_MINIRAMBO.h" // ATmega2560 env:rambo
|
#include "rambo/pins_MINIRAMBO.h" // ATmega2560 env:rambo
|
||||||
#elif MB(EINSY_RAMBO)
|
#elif MB(EINSY_RAMBO)
|
||||||
#include "rambo/pins_EINSY_RAMBO.h" // ATmega2560 env:rambo
|
#include "rambo/pins_EINSY_RAMBO.h" // ATmega2560 env:rambo
|
||||||
|
@ -214,7 +214,7 @@
|
||||||
#include "mega/pins_MEGATRONICS.h" // ATmega2560 env:megaatmega2560
|
#include "mega/pins_MEGATRONICS.h" // ATmega2560 env:megaatmega2560
|
||||||
#elif MB(MEGATRONICS_2)
|
#elif MB(MEGATRONICS_2)
|
||||||
#include "mega/pins_MEGATRONICS_2.h" // ATmega2560 env:megaatmega2560
|
#include "mega/pins_MEGATRONICS_2.h" // ATmega2560 env:megaatmega2560
|
||||||
#elif MB(MEGATRONICS_3) || MB(MEGATRONICS_31) || MB(MEGATRONICS_32)
|
#elif MB(MEGATRONICS_3, MEGATRONICS_31, MEGATRONICS_32)
|
||||||
#include "mega/pins_MEGATRONICS_3.h" // ATmega2560 env:megaatmega2560
|
#include "mega/pins_MEGATRONICS_3.h" // ATmega2560 env:megaatmega2560
|
||||||
#elif MB(ELEFU_3)
|
#elif MB(ELEFU_3)
|
||||||
#include "mega/pins_ELEFU_3.h" // ATmega2560 env:megaatmega2560
|
#include "mega/pins_ELEFU_3.h" // ATmega2560 env:megaatmega2560
|
||||||
|
|
|
@ -29,5 +29,4 @@
|
||||||
#define BOARD_INFO_NAME "Melzi"
|
#define BOARD_INFO_NAME "Melzi"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IS_MELZI
|
|
||||||
#include "pins_SANGUINOLOLU_12.h"
|
#include "pins_SANGUINOLOLU_12.h"
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(FAN_PIN) && (MB(AZTEEG_X1) || MB(STB_11) || ENABLED(IS_MELZI))
|
#if !defined(FAN_PIN) && (MB(AZTEEG_X1, STB_11) || IS_MELZI)
|
||||||
#define FAN_PIN 4 // Works for Panelolu2 too
|
#define FAN_PIN 4 // Works for Panelolu2 too
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
//#define SDSS 24
|
//#define SDSS 24
|
||||||
#define SDSS 31
|
#define SDSS 31
|
||||||
|
|
||||||
#if ENABLED(IS_MELZI)
|
#if IS_MELZI
|
||||||
#define LED_PIN 27
|
#define LED_PIN 27
|
||||||
#elif MB(STB_11)
|
#elif MB(STB_11)
|
||||||
#define LCD_BACKLIGHT_PIN 17 // LCD backlight LED
|
#define LCD_BACKLIGHT_PIN 17 // LCD backlight LED
|
||||||
|
@ -160,7 +160,7 @@
|
||||||
|
|
||||||
#if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
|
#if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
|
||||||
|
|
||||||
#if ENABLED(IS_MELZI)
|
#if IS_MELZI
|
||||||
#define LCD_PINS_RS 30 // CS chip select /SS chip slave select
|
#define LCD_PINS_RS 30 // CS chip select /SS chip slave select
|
||||||
#define LCD_PINS_ENABLE 29 // SID (MOSI)
|
#define LCD_PINS_ENABLE 29 // SID (MOSI)
|
||||||
#define LCD_PINS_D4 17 // SCK (CLK) clock
|
#define LCD_PINS_D4 17 // SCK (CLK) clock
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
#define DOGLCD_CS 17
|
#define DOGLCD_CS 17
|
||||||
#define LCD_BACKLIGHT_PIN 28 // PA3
|
#define LCD_BACKLIGHT_PIN 28 // PA3
|
||||||
|
|
||||||
#elif ENABLED(IS_MELZI)
|
#elif IS_MELZI
|
||||||
|
|
||||||
#define BEEPER_PIN 27
|
#define BEEPER_PIN 27
|
||||||
#define DOGLCD_CS 28
|
#define DOGLCD_CS 28
|
||||||
|
@ -219,7 +219,7 @@
|
||||||
|
|
||||||
#if ENABLED(LCD_I2C_PANELOLU2)
|
#if ENABLED(LCD_I2C_PANELOLU2)
|
||||||
|
|
||||||
#if ENABLED(IS_MELZI)
|
#if IS_MELZI
|
||||||
#define BTN_ENC 29
|
#define BTN_ENC 29
|
||||||
#define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi
|
#define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Build tests for STM32F103RC Bigtreetech (SKR Mini v1.1)
|
# Build tests for STM32F103RC Bigtreetech (SKR Mini E3)
|
||||||
#
|
#
|
||||||
|
|
||||||
# exit on first failure
|
# exit on first failure
|
||||||
|
@ -10,10 +10,10 @@ set -e
|
||||||
# Build with the default configurations
|
# Build with the default configurations
|
||||||
#
|
#
|
||||||
restore_configs
|
restore_configs
|
||||||
opt_set MOTHERBOARD BOARD_BIGTREE_SKR_MINI_V1_1
|
opt_set MOTHERBOARD BOARD_BIGTREE_SKR_MINI_E3
|
||||||
opt_set SERIAL_PORT 1
|
opt_set SERIAL_PORT 1
|
||||||
opt_set SERIAL_PORT_2 -1
|
opt_set SERIAL_PORT_2 -1
|
||||||
exec_test $1 $2 "Bigtreetech SKR Mini v1.1 - Basic Configuration"
|
exec_test $1 $2 "Bigtreetech SKR Mini E3 - Basic Configuration"
|
||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
restore_configs
|
restore_configs
|
||||||
|
|
Loading…
Reference in a new issue