Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MKS Robin E3 extruder SPI bus conflicts #24889

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@
#elif MB(MKS_ROBIN_PRO)
#include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro env:mks_robin_pro_maple
#elif MB(MKS_ROBIN_E3)
#include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3 env:mks_robin_e3_maple
#include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3
thinkyhead marked this conversation as resolved.
Show resolved Hide resolved
#elif MB(MKS_ROBIN_E3_V1_1)
#include "stm32f1/pins_MKS_ROBIN_E3_V1_1.h" // STM32F1 env:mks_robin_e3
#elif MB(MKS_ROBIN_E3D)
Expand Down
42 changes: 24 additions & 18 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN EXP1_05_PIN
#define NEOPIXEL_PIN EXP1_06_PIN
#define DOGLCD_MOSI EXP2_06_PIN
#define DOGLCD_SCK EXP2_02_PIN
#define FORCE_SOFT_SPI
#define SOFTWARE_SPI
#define DOGLCD_MOSI EXP2_06_PIN // SPI2_MOSI
#define DOGLCD_SCK EXP2_02_PIN // SPI2_SCK
//#define FORCE_SOFT_SPI
//#define SOFTWARE_SPI
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270

#else
Expand Down Expand Up @@ -249,17 +249,23 @@
//
// SD Card
//
#define SDCARD_CONNECTION ONBOARD
#define SPI_DEVICE 2
#define ONBOARD_SPI_DEVICE 2
#define SDSS SD_SS_PIN
#define ONBOARD_SD_CS_PIN SD_SS_PIN
#define SD_DETECT_PIN PC10 // EXP2_07_PIN
#define NO_SD_HOST_DRIVE

// TODO: This is the only way to set SPI for SD on STM32 (for now)
#define ENABLE_SPI2
#define SD_SCK_PIN EXP2_02_PIN
#define SD_MISO_PIN EXP2_01_PIN
#define SD_MOSI_PIN EXP2_06_PIN
#define SD_SS_PIN EXP2_04_PIN
// DEFAULT_SPI == 2 defines the following pins
//
// #define PIN_SPI_SS PB12
// #define PIN_SPI_MOSI PB15
// #define PIN_SPI_MISO PB14
// #define PIN_SPI_SCK PB13
//
// Onboard SDCARD uses thes pins and is shared on EXP2 for LCD's
//
// SPI2_CS PA15
// SPI2_MOSI PB15
// SPI2_SCK PB13
// SPI2_MISO PB14
// SPI2_DET PC10

#if ENABLED(SDSUPPORT)
#define NO_SD_HOST_DRIVE
#define SDSS EXP2_04_PIN // PA15
#define SD_DETECT_PIN EXP2_07_PIN // PC10
#endif
2 changes: 1 addition & 1 deletion ini/stm32f1.ini
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ board_build.encrypt_mks = Robin_e3.bin
board_build.offset = 0x5000
board_upload.offset_address = 0x08005000
build_flags = ${common_STM32F103RC_variant.build_flags}
-DTIMER_SERVO=TIM5 -DDEFAULT_SPI=3
-DTIMER_SERVO=TIM5 -DDEFAULT_SPI=2
build_unflags = ${common_STM32F103RC_variant.build_unflags}
-DUSBCON -DUSBD_USE_CDC
debug_tool = stlink
Expand Down