MKS Robin Pins fixes for STM32 and STM32F1 (#20404)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Victor Oliveira 2020-12-09 18:43:49 -03:00 committed by GitHub
parent 3404cb1fc4
commit 6e4925e6b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 22 deletions

View File

@ -23,7 +23,6 @@
/** /**
* MKS Robin (STM32F130ZET6) board pin assignments * MKS Robin (STM32F130ZET6) board pin assignments
*
* https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware * https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware
*/ */
@ -121,18 +120,9 @@
#define PS_ON_PIN PA3 // PW_OFF #define PS_ON_PIN PA3 // PW_OFF
#define FIL_RUNOUT_PIN PF11 // MT_DET #define FIL_RUNOUT_PIN PF11 // MT_DET
#ifdef ARDUINO_ARCH_STM32F1 #define BEEPER_PIN PC13
#define BEEPER_PIN PC13
#else
#define BEEPER_PIN -1
#endif
#define LED_PIN PB2 #define LED_PIN PB2
#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT
#define TFT_CS_PIN PG12 // NE4
#define TFT_RS_PIN PF0 // A0
#endif
#if HAS_FSMC_TFT #if HAS_FSMC_TFT
/** /**
* Note: MKS Robin TFT screens use various TFT controllers * Note: MKS Robin TFT screens use various TFT controllers
@ -140,23 +130,27 @@
* ILI9488 is not supported * ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
* *
* If the screen stays white, disable 'LCD_RESET_PIN' * If the screen stays white, disable 'TFT_RESET_PIN'
* to let the bootloader init the screen. * to let the bootloader init the screen.
* *
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD. * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/ */
//#define LCD_RESET_PIN PF6 #define TFT_CS_PIN PG12 // NE4
#define LCD_BACKLIGHT_PIN PG11 #define TFT_RS_PIN PF0 // A0
#define FSMC_CS_PIN TFT_CS_PIN #define FSMC_CS_PIN TFT_CS_PIN
#define FSMC_RS_PIN TFT_RS_PIN #define FSMC_RS_PIN TFT_RS_PIN
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2 #define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5 #define FSMC_DMA_CHANNEL DMA_CH5
#elif HAS_GRAPHICAL_TFT
#define TFT_RESET_PIN PF6 #define TFT_RESET_PIN PF6
#define TFT_BACKLIGHT_PIN PG11 #define TFT_BACKLIGHT_PIN PG11
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
#endif #endif
#if NEED_TOUCH_PINS #if NEED_TOUCH_PINS
@ -170,11 +164,23 @@
// SPI1(PA7) & SPI3(PB5) not available // SPI1(PA7) & SPI3(PB5) not available
#define SPI_DEVICE 2 #define SPI_DEVICE 2
#define SDIO_SUPPORT
#if ENABLED(SDIO_SUPPORT) #if ENABLED(SDIO_SUPPORT)
#define SCK_PIN PB13 // SPI2 #define SCK_PIN PB13 // SPI2
#define MISO_PIN PB14 // SPI2 #define MISO_PIN PB14 // SPI2
#define MOSI_PIN PB15 // SPI2 #define MOSI_PIN PB15 // SPI2
#define SD_DETECT_PIN PF12 // SD_CD /**
* MKS Robin has a few hardware revisions
* https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware
*
* MKS Robin less or equal to V2.3 don't have SD_DETECT_PIN.
*
* MKS Robin greater or equal to V2.4 have SD_DETECT_PIN at PF12.
*
* You can uncomment it here, or you can add it SD_DETECT_PIN to your Configuration.h
*/
//#define SD_DETECT_PIN -1
//#define SD_DETECT_PIN PF12 // SD_CD
#else #else
// SD as custom software SPI (SDIO pins) // SD as custom software SPI (SDIO pins)
#define SCK_PIN PC12 #define SCK_PIN PC12

View File

@ -23,6 +23,7 @@
/** /**
* MKS Robin nano (STM32F130VET6) board pin assignments * MKS Robin nano (STM32F130VET6) board pin assignments
* https://github.com/makerbase-mks/MKS-Robin-Nano-V1.X/tree/master/hardware
*/ */
#if NOT_TARGET(STM32F1, STM32F1xx) #if NOT_TARGET(STM32F1, STM32F1xx)
@ -167,18 +168,14 @@
/** /**
* Note: MKS Robin TFT screens use various TFT controllers. * Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN' * If the screen stays white, disable 'TFT_RESET_PIN'
* to let the bootloader init the screen. * to let the bootloader init the screen.
*/ */
// Shared FSMC Configs // Shared FSMC Configs
#if HAS_FSMC_TFT #if HAS_FSMC_TFT
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
#define DOGLCD_SCK -1 #define DOGLCD_SCK -1
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define TOUCH_CS_PIN PA7 // SPI2_NSS #define TOUCH_CS_PIN PA7 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK #define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO #define TOUCH_MISO_PIN PB14 // SPI2_MISO