From 329ebcb253c292d93e138bcf27bede9db774a33b Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Wed, 14 Oct 2020 11:50:03 -0700 Subject: [PATCH 1/8] Fix SET_SOFT_ENDSTOP_LOOSE w/out soft endstops (#19734) --- Marlin/src/module/motion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index 550168e8a86d..85b70c057aa9 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -198,7 +198,7 @@ inline float home_bump_mm(const AxisEnum axis) { extern soft_endstops_t soft_endstop; #define apply_motion_limits(V) NOOP #define update_software_endstops(...) NOOP - #define SET_SOFT_ENDSTOP_LOOSE() NOOP + #define SET_SOFT_ENDSTOP_LOOSE(V) NOOP #endif // !HAS_SOFTWARE_ENDSTOPS From ff9e08dcd19087c66c032717f584dd24355c8be8 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 14 Oct 2020 00:15:03 +0000 Subject: [PATCH 2/8] [cron] Bump distribution date (2020-10-14) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 2b07e4216981..db76af504b90 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2020-10-13" + #define STRING_DISTRIBUTION_DATE "2020-10-14" #endif /** From 23ab556ede4b493b904944e774bea32d3c406ecc Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 15 Oct 2020 00:15:10 +0000 Subject: [PATCH 3/8] [cron] Bump distribution date (2020-10-15) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index db76af504b90..efe04d64dd54 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2020-10-14" + #define STRING_DISTRIBUTION_DATE "2020-10-15" #endif /** From 21805e645fdd8d0d3896bde6ea0789fe439d90b6 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Wed, 14 Oct 2020 11:43:36 -0700 Subject: [PATCH 4/8] Fix mega2560ext environment (#19730) --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 9c9460d1a32a..22a5ba880878 100644 --- a/platformio.ini +++ b/platformio.ini @@ -445,7 +445,7 @@ board = megaatmega2560 # [env:mega2560ext] platform = atmelavr -extends = mega2560 +extends = env:mega2560 board = megaatmega2560 board_build.variant = megaextendedpins extra_scripts = ${common.extra_scripts} From 64916d79f4be5db552b3d98c61f415f43e488f70 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Tue, 13 Oct 2020 20:12:34 -0300 Subject: [PATCH 5/8] Watchdog Refresh for LVGL Asset Load (#19724) --- Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp | 17 +++++++++++++++-- .../extui/lib/mks_ui/tft_lvgl_configuration.cpp | 3 +++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp b/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp index d6f5fbf8b5fd..07ac56380262 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp @@ -266,19 +266,24 @@ void spiFlashErase_PIC() { W25QXX.init(SPI_QUARTER_SPEED); //erase 0x001000 -64K for (pic_sectorcnt = 0; pic_sectorcnt < (64 - 4) / 4; pic_sectorcnt++) { + watchdog_refresh(); W25QXX.SPI_FLASH_SectorErase(PICINFOADDR + pic_sectorcnt * 4 * 1024); } //erase 64K -- 6M - for (pic_sectorcnt = 0; pic_sectorcnt < (PIC_SIZE_xM * 1024 / 64 - 1); pic_sectorcnt++) + for (pic_sectorcnt = 0; pic_sectorcnt < (PIC_SIZE_xM * 1024 / 64 - 1); pic_sectorcnt++) { + watchdog_refresh(); W25QXX.SPI_FLASH_BlockErase((pic_sectorcnt + 1) * 64 * 1024); + } } #if HAS_SPI_FLASH_FONT void spiFlashErase_FONT() { volatile uint32_t Font_sectorcnt = 0; W25QXX.init(SPI_QUARTER_SPEED); - for (Font_sectorcnt = 0; Font_sectorcnt < 32-1; Font_sectorcnt++) + for (Font_sectorcnt = 0; Font_sectorcnt < 32-1; Font_sectorcnt++) { + watchdog_refresh(); W25QXX.SPI_FLASH_BlockErase(FONTINFOADDR + Font_sectorcnt * 64 * 1024); + } } #endif @@ -410,6 +415,7 @@ uint8_t public_buf[512]; return; } + watchdog_refresh(); disp_assets_update_progress(fn); W25QXX.init(SPI_QUARTER_SPEED); @@ -422,18 +428,21 @@ uint8_t public_buf[512]; totalSizeLoaded += pfileSize; if (assetType == ASSET_TYPE_LOGO) { do { + watchdog_refresh(); pbr = file.read(public_buf, BMP_WRITE_BUF_LEN); Pic_Logo_Write((uint8_t *)fn, public_buf, pbr); } while (pbr >= BMP_WRITE_BUF_LEN); } else if (assetType == ASSET_TYPE_TITLE_LOGO) { do { + watchdog_refresh(); pbr = file.read(public_buf, BMP_WRITE_BUF_LEN); Pic_TitleLogo_Write((uint8_t *)fn, public_buf, pbr); } while (pbr >= BMP_WRITE_BUF_LEN); } else if (assetType == ASSET_TYPE_G_PREVIEW) { do { + watchdog_refresh(); pbr = file.read(public_buf, BMP_WRITE_BUF_LEN); default_view_Write(public_buf, pbr); } while (pbr >= BMP_WRITE_BUF_LEN); @@ -443,6 +452,7 @@ uint8_t public_buf[512]; SPIFlash.beginWrite(Pic_Write_Addr); #if HAS_SPI_FLASH_COMPRESSION do { + watchdog_refresh(); pbr = file.read(public_buf, SPI_FLASH_PageSize); TERN_(MARLIN_DEV_MODE, totalSizes += pbr); SPIFlash.writeData(public_buf, SPI_FLASH_PageSize); @@ -463,6 +473,7 @@ uint8_t public_buf[512]; else if (assetType == ASSET_TYPE_FONT) { Pic_Write_Addr = UNIGBK_FLASH_ADDR; do { + watchdog_refresh(); pbr = file.read(public_buf, BMP_WRITE_BUF_LEN); W25QXX.SPI_FLASH_BufferWrite(public_buf, Pic_Write_Addr, pbr); Pic_Write_Addr += pbr; @@ -482,9 +493,11 @@ uint8_t public_buf[512]; disp_assets_update(); disp_assets_update_progress("Erasing pics..."); + watchdog_refresh(); spiFlashErase_PIC(); #if HAS_SPI_FLASH_FONT disp_assets_update_progress("Erasing fonts..."); + watchdog_refresh(); spiFlashErase_FONT(); #endif diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp index ecd4eb482a6a..a86493951e54 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp @@ -123,8 +123,11 @@ void tft_lvgl_init() { //spi_flash_read_test(); #if ENABLED(SDSUPPORT) + watchdog_refresh(); UpdateAssets(); #endif + + watchdog_refresh(); mks_test_get(); touch.Init(); From d3f62946cd04e81a1d0632db0fa33900d1d5b7b9 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Tue, 13 Oct 2020 13:58:50 -0300 Subject: [PATCH 6/8] TFT followup fixes (#19710) --- .../src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp | 3 ++- Marlin/src/lcd/tft/touch.cpp | 4 ---- Marlin/src/lcd/tft_io/ili9328.h | 8 +++++--- Marlin/src/lcd/tft_io/r65105.h | 8 +++++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp index a86493951e54..c0cd14d70dd0 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp @@ -477,7 +477,8 @@ void lv_encoder_pin_init() { #endif - static uint8_t buttons = newbutton; + static uint8_t buttons = 0; + buttons = newbutton; static uint8_t lastEncoderBits; #define encrot0 0 diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index 2124a42e28ca..80c65f074ae6 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -295,10 +295,6 @@ bool Touch::get_point(int16_t *x, int16_t *y) { if (is_touched && calibration.orientation != TOUCH_ORIENTATION_NONE) { *x = int16_t((int32_t(*x) * calibration.x) >> 16) + calibration.offset_x; *y = int16_t((int32_t(*y) * calibration.y) >> 16) + calibration.offset_y; - #if (TFT_ROTATION & TFT_ROTATE_180) - *x = TFT_WIDTH - *x; - *y = TFT_HEIGHT - *y; - #endif } return is_touched; } diff --git a/Marlin/src/lcd/tft_io/ili9328.h b/Marlin/src/lcd/tft_io/ili9328.h index 818dd05b348f..b50517adfea5 100644 --- a/Marlin/src/lcd/tft_io/ili9328.h +++ b/Marlin/src/lcd/tft_io/ili9328.h @@ -49,9 +49,11 @@ #define ILI9328_GATE_SCANCTL1_DATA 0x2700 #endif -// #define ILI9328_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9328_ETMOD_AM) | \ -// IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9328_ETMOD_ID1) | \ -// IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, ILI9328_ETMOD_ID0) +/* +#define ILI9328_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9328_ETMOD_AM) | \ + IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9328_ETMOD_ID1) | \ + IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, ILI9328_ETMOD_ID0) +*/ #define ILI9328_ETMOD_ORIENTATION (ILI9328_ETMOD_AM | ILI9328_ETMOD_ID1 | ILI9328_ETMOD_ID0) diff --git a/Marlin/src/lcd/tft_io/r65105.h b/Marlin/src/lcd/tft_io/r65105.h index a813c3260b1a..8be2afe4423c 100644 --- a/Marlin/src/lcd/tft_io/r65105.h +++ b/Marlin/src/lcd/tft_io/r65105.h @@ -51,9 +51,11 @@ #define R61505_DRVCTRL_DATA 0x2700 #endif -// #define R61505_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, R61505_ETMOD_AM) | \ -// IF_0((TFT_ORIENTATION) & TFT_INVERT_X, R61505_ETMOD_ID0) | \ -// IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, R61505_ETMOD_ID1) +/* +#define R61505_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, R61505_ETMOD_AM) | \ + IF_0((TFT_ORIENTATION) & TFT_INVERT_X, R61505_ETMOD_ID0) | \ + IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, R61505_ETMOD_ID1) +*/ #define R61505_ETMOD_ORIENTATION (R61505_ETMOD_AM | R61505_ETMOD_ID0 | R61505_ETMOD_ID1) From 5219f4724ff995f524fc881df2031077336858c1 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue, 13 Oct 2020 16:13:25 -0700 Subject: [PATCH 7/8] If needed, home before G34 (#19713) --- Marlin/src/gcode/calibrate/G34.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/gcode/calibrate/G34.cpp b/Marlin/src/gcode/calibrate/G34.cpp index fd876d3fe9ea..0ca4490eb6c1 100644 --- a/Marlin/src/gcode/calibrate/G34.cpp +++ b/Marlin/src/gcode/calibrate/G34.cpp @@ -38,7 +38,8 @@ void GcodeSuite::G34() { - if (homing_needed()) return; + // Home before the alignment procedure + if (!all_axes_known()) home_all_axes(); SET_SOFT_ENDSTOP_LOOSE(true); TEMPORARY_BED_LEVELING_STATE(false); From 222b7a7a5737b4426dc8517d2d5b3789629101a4 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Tue, 13 Oct 2020 16:03:09 -0700 Subject: [PATCH 8/8] Add NUCLEO-F767ZI dev board (#19373) Co-authored-by: Lorenzo Delana --- .../src/HAL/shared/backtrace/unwmemaccess.cpp | 2 +- Marlin/src/core/boards.h | 1 + Marlin/src/pins/pins.h | 2 + Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h | 201 ++++++++++++++++++ platformio.ini | 11 + 5 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h diff --git a/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp b/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp index 4b085f90cef5..c93494d485c3 100644 --- a/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp @@ -85,7 +85,7 @@ #define START_FLASH_ADDR 0x08000000 #define END_FLASH_ADDR 0x08100000 -#elif MB(REMRAM_V1) +#elif MB(REMRAM_V1, NUCLEO_F767ZI) // For STM32F765VI in RemRam v1 // SRAM (0x20000000 - 0x20080000) (512kb) diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 8658c8578554..da7d15ec33d5 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -363,6 +363,7 @@ #define BOARD_REMRAM_V1 5001 // RemRam v1 #define BOARD_TEENSY41 5002 // Teensy 4.1 #define BOARD_T41U5XBB 5003 // T41U5XBB Teensy 4.1 breakout board +#define BOARD_NUCLEO_F767ZI 5004 // ST NUCLEO-F767ZI Dev Board // // Espressif ESP32 WiFi diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index a7888e54d4a6..c5dbd2087627 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -634,6 +634,8 @@ #include "stm32f7/pins_THE_BORG.h" // STM32F7 env:STM32F7 #elif MB(REMRAM_V1) #include "stm32f7/pins_REMRAM_V1.h" // STM32F7 env:STM32F7 +#elif MB(NUCLEO_F767ZI) + #include "stm32f7/pins_NUCLEO_F767ZI.h" // STM32F7 env:NUCLEO_F767ZI #elif MB(TEENSY41) #include "teensy4/pins_TEENSY41.h" // Teensy-4.x env:teensy41 #elif MB(T41U5XBB) diff --git a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h new file mode 100644 index 000000000000..5e3d5f4ab538 --- /dev/null +++ b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h @@ -0,0 +1,201 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#ifndef STM32F767xx + #error "Oops! Select an STM32F767 environment" +#endif + +#define BOARD_INFO_NAME "NUCLEO-F767ZI" +#define DEFAULT_MACHINE_NAME "Prototype Board" + +#if NO_EEPROM_SELECTED + #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation +#endif + +#if ENABLED(FLASH_EEPROM_EMULATION) + // Decrease delays and flash wear by spreading writes across the + // 128 kB sector allocated for EEPROM emulation. + // Not yet supported on F7 hardware + // #define FLASH_EEPROM_LEVELING +#endif + +/** + * Timer assignments + * + * TIM1 - + * TIM2 - Hardware PWM (Fan/Heater Pins) + * TIM3 - Hardware PWM (Servo Pins) + * TIM4 - STEP_TIMER (Marlin) + * TIM5 - + * TIM6 - TIMER_TONE (variant.h) + * TIM7 - TIMER_SERVO (variant.h) + * TIM9 - TIMER_SERIAL (platformio.ini) + * TIM10 - For some reason trips Watchdog when used for SW Serial + * TIM11 - + * TIM12 - + * TIM13 - + * TIM14 - TEMP_TIMER (Marlin) + * + */ +#define STEP_TIMER 4 +#define TEMP_TIMER 14 + + +/** + * These pin assignments are arbitrary and intending for testing purposes. + * Assignments may not be ideal, and not every assignment has been tested. + * Proceed at your own risk. + * _CN7_ + * (X_STEP) PC6 | · · | PB8 (X_EN) + * (X_DIR) PB15 | · · | PB9 (X_CS) + * (LCD_D4) PB13 | · · | AVDD + * _CN8_ PB12 | · · | GND + * NC | · · | PC8 (HEATER_0) PA15 | · · | PA5 (SCLK) + * IOREF | · · | PC9 (BEEPER) PC7 | · · | PA6 (MISO) + * RESET | · · | PC10 (SERVO1_PIN) PB5 | · · | PA7 (MOSI) + * +3.3V | · · | PC11 (HEATER_BED) PB3 | · · | PD14 (SD_DETECT) + * +5V | · · | PC12 (SDSS) PA4 | · · | PD15 (LCD_ENABLE) + * GND | · · | PD2 (SERVO0_PIN) PB4 | · · | PF12 (LCD_RS) + * GND | · · | PG2  ̄ ̄ ̄ + * VIN | · · | PG3 +_*  ̄ ̄ ̄ _CN10 + * AVDD | · · | PF13 (BTN_EN1) + * _CN9_ AGND | · · | PE9 (BTN_EN2) + * (TEMP_0) PA3 | · · | PD7 GND | · · | PE11 (BTN_ENC) + * (TEMP_BED) PC0 | · · | PD6 PB1 | · · | PF14 + * PC3 | · · | PD5 PC2 | · · | PE13 + * PF3 | · · | PD4 PF4 | · · | PF15 + * PF5 | · · | PD3 (E_STEP) PB6 | · · | PG14 (E_EN) + * PF10 | · · | GND (E_DIR) PB2 | · · | PG9 (E_CS) + * NC | · · | PE2 GND | · · | PE8 + * PA7 | · · | PE4 PD13 | · · | PE7 + * PF2 | · · | PE5 PD12 | · · | GND + * (Y_STEP) PF1 | · · | PE6 (Y_EN) (Z_STEP) PD11 | · · | PE10 (Z_EN) + * (Y_DIR) PF0 | · · | PE3 (Y_CS) (Z_DIR) PE2 | · · | PE12 (Z_CS) + * GND | · · | PF8 GND | · · | PE14 + * (Z_MAX) PD0 | · · | PF7 (X_MIN) PA0 | · · | PE15 + * (Z_MIN) PD1 | · · | PF9 (X_MAX) PB0 | · · | PB10 (FAN) + * (Y_MAX) PG0 | · · | PG1 (Y_MIN) PE0 | · · | PB11 (FAN1) + *  ̄ ̄ ̄  ̄ ̄ ̄ ̄ + */ + +#define X_MIN_PIN PF7 +#define X_MAX_PIN PF9 +#define Y_MIN_PIN PG1 +#define Y_MAX_PIN PG0 +#define Z_MIN_PIN PD1 +#define Z_MAX_PIN PD0 + +// +// Steppers +// +#define X_STEP_PIN PC6 +#define X_DIR_PIN PB15 +#define X_ENABLE_PIN PB8 +#define X_CS_PIN PB9 + +#define Y_STEP_PIN PF1 +#define Y_DIR_PIN PF0 +#define Y_ENABLE_PIN PE6 +#define Y_CS_PIN PE3 + +#define Z_STEP_PIN PD11 +#define Z_DIR_PIN PE2 +#define Z_ENABLE_PIN PE10 +#define Z_CS_PIN PE12 + +#define E0_STEP_PIN PB6 +#define E0_DIR_PIN PB2 +#define E0_ENABLE_PIN PG14 +#define E0_CS_PIN PG9 + +#if HAS_TMC_UART + #define X_SERIAL_TX_PIN PB9 + #define X_SERIAL_RX_PIN PB9 + + #define Y_SERIAL_TX_PIN PE3 + #define Y_SERIAL_RX_PIN PE3 + + #define Z_SERIAL_TX_PIN PE12 + #define Z_SERIAL_RX_PIN PE12 + + #define E_SERIAL_TX_PIN PG9 + #define E_SERIAL_RX_PIN PG9 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PA3 +#define TEMP_BED_PIN PC0 + +// +// Heaters / Fans +// +#define HEATER_0_PIN PA15 // PWM Capable, TIM2_CH1 +#define HEATER_BED_PIN PB3 // PWM Capable, TIM2_CH2 + +#ifndef FAN_PIN + #define FAN_PIN PB10 // PWM Capable, TIM2_CH3 +#endif +#define FAN1_PIN PB11 // PWM Capable, TIM2_CH4 + +#ifndef E0_AUTO_FAN_PIN + #define E0_AUTO_FAN_PIN FAN1_PIN +#endif + +// +// Servos +// +#define SERVO0_PIN PB4 // PWM Capable, TIM3_CH1 +#define SERVO1_PIN PB5 // PWM Capable, TIM3_CH2 + +// SPI for external SD Card (Not entirely sure this will work) +#define SCK_PIN PA5 +#define MISO_PIN PA6 +#define MOSI_PIN PA7 +#define SS_PIN PA4 +#define SDSS PA4 + +#define LED_PIN LED_BLUE + +// +// LCD / Controller +// +#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BEEPER_PIN PC7 // LCD_BEEPER + #define BTN_ENC PE11 // BTN_ENC + #define SD_DETECT_PIN PD14 + #define LCD_PINS_RS PF12 // LCD_RS + #define LCD_PINS_ENABLE PD15 // LCD_EN + #define LCD_PINS_D4 PB13 // LCD_D4 + // #define LCD_PINS_D5 + // #define LCD_PINS_D6 + // #define LCD_PINS_D7 + #define BTN_EN1 PF13 // BTN_EN1 + #define BTN_EN2 PE9 // BTN_EN2 + + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(63) + #define BOARD_ST7920_DELAY_3 DELAY_NS(780) +#endif diff --git a/platformio.ini b/platformio.ini index 22a5ba880878..0abb4ac38810 100644 --- a/platformio.ini +++ b/platformio.ini @@ -856,6 +856,17 @@ board = remram_v1 build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F7 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED src_filter = ${common.default_src_filter} + - +# +# ST NUCLEO-F767ZI Development Board +# This environment is for testing purposes prior to control boards +# being readily available based on STM32F7 MCUs +# +[env:NUCLEO_F767ZI] +platform = ${common_stm32.platform} +extends = common_stm32 +board = nucleo_f767zi +build_flags = ${common_stm32.build_flags} -DTIMER_SERIAL=TIM9 + # # ARMED (STM32) #