Skip to content

Commit

Permalink
Bugfix 2.0.x update (#1)
Browse files Browse the repository at this point in the history
* TMCStepper 0.7.0 followup (MarlinFirmware#18388)

* Improve U8G+SPI delay override (MarlinFirmware#18386)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>

* Better STM32 Tone timer int priority (MarlinFirmware#18385)

* Fix 3-point middle point (MarlinFirmware#18383)

* Fix LPC176x RGB NEOPIXEL startup (MarlinFirmware#18380)

* Fix ExtUI automatic font scaling (MarlinFirmware#18377)

* [cron] Bump distribution date (2020-06-23)

* No 'probing failed' with retry (MarlinFirmware#18379)

* Add SERIAL_FLOAT_PRECISION option (MarlinFirmware#18367)

* Move tests up one level

* Use libraries from the registry

* Graphical LCD note

* Update LPC176x platform version (MarlinFirmware#18392)

* Add maintenance actions

* [cron] Bump distribution date (2020-06-24)

* General cleanup

* Run close-stale once per day

* Board-based ST7920 delays

* TFT_LITTLE_VGL_UI followup (MarlinFirmware#18410)

* Display PID Autotune status (MarlinFirmware#18408)

* [cron] Bump distribution date (2020-06-25)

* Use Preheat 1 as M303 default (MarlinFirmware#18407)

* Fix issues with no hotend / bed / fan (MarlinFirmware#18395)

* Fix material preset type

* NO_LCD_REINIT for FSMC (or, no SD_DETECT_PIN)

* Fix material preset editing

* Clean up preheat edit items

* [cron] Bump distribution date (2020-06-26)

* Minor LCD cleanup, improvement

* Fix typo in DWIN, preheat array

* Update Italian language (MarlinFirmware#18414)

* [samd51] Manifest assigned timers priority (MarlinFirmware#18402)

* Update MKS Robin Nano auto-build env (MarlinFirmware#18417)

* SAMD51 cleanup (MarlinFirmware#18419)

* BTT SKR Pro runout pins (MarlinFirmware#18416)

* Update Brazilian Portuguese language (MarlinFirmware#18411)

* Fix Fan Speed menu items (MarlinFirmware#18400)

* Patch some DGUS warnings

* Allow larger ADC debounce

Reference MarlinFirmware#17205

* [cron] Bump distribution date (2020-06-27)

* [cron] Bump distribution date (2020-06-28)

* Update language fonts

* Tool Change Migration fixes and debugging (MarlinFirmware#18448)

* ExtUI additions (MarlinFirmware#18447)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* Add Romanian language (MarlinFirmware#18455)

Co-authored-by: cristyanul <47246451+cristyanul@users.noreply.github.com>

* Fix "probing failed" false positives (MarlinFirmware#18435)

* Adjustable delta_diagonal_rod_trim (MarlinFirmware#18423)

* Russian, Ukranian for wide LCD (MarlinFirmware#18433)

* Tweak pins formatting

* Suppress unused var warning

* ClosedLoop as singleton

* [cron] Bump distribution date (2020-06-29)

* MKS Robin Nano flash-based EEPROM (MarlinFirmware#18466)

* Use "reset reason" defines (MarlinFirmware#18462)

* [cron] Bump distribution date (2020-06-30)

* [cron] Bump distribution date (2020-07-01)

* Fix missing parenthesis (MarlinFirmware#18473)

* Fix FYSETC CHEETAH V1.2 SD re-insert (MarlinFirmware#18474)

Include this board with other Cheetah stepper reset.

* Hide menu item with no fan (MarlinFirmware#18470)

* Permit independent X2,Y2,Z2,Z3,Z4 endstop inverting (MarlinFirmware#18481)

* Add TFT_LVGL_UI support (MarlinFirmware#18438)

* Per-Hotend Default PIDs (MarlinFirmware#18483)

* Enforce sensor range for temperature target (MarlinFirmware#18465)

* Mitigate stepper timeout

* Add CHAMBER PWM code

* Structured thermistor tables

* Fix reversed sensor ranges

* Prevent temps outside sensor range

* [cron] Bump distribution date (2020-07-02)

* Tweak stepper shutdown test

* Extend thermistor 1047 to 500°C

* [cron] Bump distribution date (2020-07-03)

* Keep filament runout pin for Creality Melzi (MarlinFirmware#18504)

* Add FYSETC 2.42 inch OLED support (MarlinFirmware#18485)

* Option to set manual Babystepping distance in mm (MarlinFirmware#18503)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>

* Clean up LCD Manual Move / UBL Mesh Edit (MarlinFirmware#18373)

* FYSETC OLED followup (MarlinFirmware#18519)

* Ensure Git applies Unix line-endings in tests (MarlinFirmware#18495)

* Fix axis name in serial output (MarlinFirmware#18522)

* Fix env:mks_robin_nano35 (MarlinFirmware#18516)

* FIx Sanguino/1284p board_upload.maximum_size (MarlinFirmware#18502)

* M150 I to set Neopixel by index (MarlinFirmware#18490)

* [cron] Bump distribution date (2020-07-04)

* PID Accelerated Edit (MarlinFirmware#18532)

* [cron] Bump distribution date (2020-07-05)

* Fix "'ubl' not declared" error (MarlinFirmware#18541)

* Fix thermistors exist-for-reading tests (MarlinFirmware#18533)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* Fix "Probing mesh point" message

Closes MarlinFirmware#17770

Co-Authored-By: Jan-Gerard van der Toorn <jan-gerard@users.noreply.github.com>

* Probing points followup (MarlinFirmware#18552)

* Update actions on bugfix branch

* Add CI for pushed commits (MarlinFirmware#18549)

* Fix Neopixel set_color (MarlinFirmware#18544)

* Fix stall sensitivity adjustment for FTDI screens (MarlinFirmware#18554)

* Minor pins cleanup

* Add comment to M412

* Reduce string duplication

* STM32: No compile-time check for PWM_PIN (MarlinFirmware#18539)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* Filament Runout Inverting => State (MarlinFirmware#18537)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* Simplify home_z_safely, respect HOME_AFTER_DEACTIVATE

* [cron] Bump distribution date (2020-07-06)

* Filament state followup

* Get SAMD51 CXX flags from script

* Use Material Preset 1 for PID autotune (MarlinFirmware#18446)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* Fix broken POWER_LOSS_RECOVERY prompt (MarlinFirmware#18557)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>

* Add Lerdge S,X,K (MarlinFirmware#18302)

* Fix TMC homing phase coils alignment (MarlinFirmware#18528)

Co-authored-by: Fabio Santos <fabiosan@live.com>

* Scale runout distance setting for editable range (MarlinFirmware#18567)

* 0.7.1 <= TMCStepper <= 0.7.9 (MarlinFirmware#18564)

* Reduce 'first loop' temperature residency time (MarlinFirmware#18421)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* Update and fix POWER_MONITOR (MarlinFirmware#18561)

* [cron] Bump distribution date (2020-07-07)

* Temp Residency followup

* Combine command macros

* Whitespace cleanup

* Fix typo in Configuration_adv.h (MarlinFirmware#18570)

* [cron] Bump distribution date (2020-07-08)

* SKR 1.4 alert for unsupported LCD

* Tweak PLR debug

* Fix warning with PIO

* Update Chinese (zh_CN) language (MarlinFirmware#18580)

* Show fixed V in Power Display with no V sensor (MarlinFirmware#18579)

* Fix User Temp Sensor (1000), reversed Pt100 / Pt1000 (MarlinFirmware#18590)

* Add `Cap:RUNOUT`

Co-Authored-By: Julius ter Pelkwijk <mrseeker@users.noreply.github.com>

* Fix some comments

* [cron] Bump distribution date (2020-07-09)

* Fix missing controller fan include

* Consolidate probe clearance, add section debug (MarlinFirmware#18576)

* Better section / function log
* Add do_z_clearance motion function

* Remove outdated comment (MarlinFirmware#18597)

* Clean up some MMU comments

* MarlinUI support for up to 5 Material Presets (MarlinFirmware#18488)

- Add `I` preset parameter to `G26`, `M106`, `M140`, and `M190`.
- Extend menu items to permit a string interpolation.
- Keep material names in a list and interpolate in menu items.
- Extend material presets to support up to 5 predefined materials.

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

Co-authored-by: Jason Smith <jason.inet@gmail.com>
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
Co-authored-by: MoellerDi <MoellerDi@users.noreply.github.com>
Co-authored-by: ellensp <ellensp@hotmail.com>
Co-authored-by: RudolphRiedel <31180093+RudolphRiedel@users.noreply.github.com>
Co-authored-by: thinkyhead <thinkyhead@users.noreply.github.com>
Co-authored-by: Kirill Vergun <647149+o-nix@users.noreply.github.com>
Co-authored-by: Fabio Santos <fabiosan@live.com>
Co-authored-by: Chris Pepper <p3p@p3psoft.co.uk>
Co-authored-by: Victor <rhapsodyv@gmail.com>
Co-authored-by: Pascal de Bruijn <pmjdebruijn@pcode.nl>
Co-authored-by: Giuliano Zaro <3684609+GMagician@users.noreply.github.com>
Co-authored-by: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com>
Co-authored-by: Johnny Eshak <info@johnnytheone.com>
Co-authored-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Co-authored-by: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com>
Co-authored-by: cristyanul <47246451+cristyanul@users.noreply.github.com>
Co-authored-by: JP Flouret <jflouret@microsoft.com>
Co-authored-by: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com>
Co-authored-by: George Fu <nailao_5918@163.com>
Co-authored-by: Robby Candra <robbycandra.mail@gmail.com>
Co-authored-by: cbteeple <cbteeple@g.harvard.edu>
Co-authored-by: notabucketofspam <43456540+notabucketofspam@users.noreply.github.com>
Co-authored-by: Jan-Gerard van der Toorn <jan-gerard@users.noreply.github.com>
Co-authored-by: Oliver Jean Eifler <olli.eifler@gmail.com>
Co-authored-by: ManuelMcLure <manuel@mclure.org>
Co-authored-by: GhostlyCrowd <jeffjiggens@gmail.com>
Co-authored-by: Luc Hoang Long <i.me.mine@luchoanglong.com>
Co-authored-by: J.C. Nelson <32139633+xC0000005@users.noreply.github.com>
Co-authored-by: shuttercat <67816426+shuttercat@users.noreply.github.com>
Co-authored-by: espr14 <espr14@gmail.com>
Co-authored-by: cccc <cuiwei_cv@163.com>
Co-authored-by: Julius ter Pelkwijk <mrseeker@users.noreply.github.com>
  • Loading branch information
1 parent e3397e6 commit 49fa99c
Show file tree
Hide file tree
Showing 357 changed files with 9,745 additions and 4,845 deletions.
40 changes: 40 additions & 0 deletions .github/lock.yml
@@ -0,0 +1,40 @@
#
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app
#

# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 60

# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false

# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: [ 'no-locking' ]

# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false

# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: true

# Limit to only `issues` or `pulls`
# only: issues

# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
# exemptLabels:
# - help-wanted
# lockLabel: outdated

# pulls:
# daysUntilLock: 30

# Repository to extend settings from
# _extends: repo
17 changes: 13 additions & 4 deletions .github/workflows/test-builds.yml
Expand Up @@ -9,7 +9,14 @@ on:
pull_request:
branches:
- bugfix-2.0.x
- dev-2.1.x
paths-ignore:
- config/**
- data/**
- docs/**
- '**/*.md'
push:
branches:
- bugfix-2.0.x
paths-ignore:
- config/**
- data/**
Expand All @@ -18,6 +25,8 @@ on:

jobs:
test_builds:
name: Run All Tests
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest

Expand Down Expand Up @@ -67,6 +76,7 @@ jobs:
- rumba32
- mks_robin_pro
- STM32F103RET6_creality
- LERDGEX

# Put lengthy tests last

Expand Down Expand Up @@ -104,8 +114,7 @@ jobs:
- name: Run ${{ matrix.test-platform }} Tests
run: |
# Inline tests script
[[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
chmod +x buildroot/bin/*
chmod +x buildroot/share/tests/*
export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH}
chmod +x buildroot/tests/*
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH}
run_tests . ${{ matrix.test-platform }}
31 changes: 22 additions & 9 deletions Marlin/Configuration.h
Expand Up @@ -1162,12 +1162,11 @@
*
* RAMPS-based boards use SERVO3_PIN for the first runout sensor.
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
* By default the firmware assumes HIGH=FILAMENT PRESENT.
*/
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor.
#define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
Expand Down Expand Up @@ -1376,14 +1375,14 @@
//
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing.
// - Prevent Z homing when the Z probe is outside bed area.
//
//#define Z_SAFE_HOMING

#if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT X_CENTER // X point for Z homing when homing all axes (G28).
#define Z_SAFE_HOMING_Y_POINT Y_CENTER // Y point for Z homing when homing all axes (G28).
#define Z_SAFE_HOMING_X_POINT X_CENTER // X point for Z homing
#define Z_SAFE_HOMING_Y_POINT Y_CENTER // Y point for Z homing
#endif

// Homing speeds (mm/m)
Expand Down Expand Up @@ -1638,9 +1637,9 @@
* Select the language to display on the LCD. These languages are available:
*
* en, an, bg, ca, cz, da, de, el, el_gr, es, eu, fi, fr, gl, hr, hu, it,
* jp_kana, ko_KR, nl, pl, pt, pt_br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test
* jp_kana, ko_KR, nl, pl, pt, pt_br, ro ru, sk, tr, uk, vi, zh_CN, zh_TW, test
*
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el_gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el_gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en

Expand Down Expand Up @@ -1928,6 +1927,8 @@
// IMPORTANT: The U8glib library is required for Graphical Display!
// https://github.com/olikraus/U8glib_Arduino
//
// NOTE: If the LCD is unresponsive you may need to reverse the plugs.
//

//
// RepRapDiscount FULL GRAPHIC Smart Controller
Expand Down Expand Up @@ -2089,6 +2090,11 @@
//
//#define OVERLORD_OLED

//
// FYSETC OLED 2.42" 128 × 64 FULL GRAPHICS CONTROLLER with WS2812 RGB
// Where to find : https://www.aliexpress.com/item/4000345255731.html
//#define FYSETC_242_OLED_12864 // Uses the SSD1309 controller

//=============================================================================
//========================== Extensible UI Displays ===========================
//=============================================================================
Expand Down Expand Up @@ -2119,6 +2125,10 @@
//
//#define EXTENSIBLE_UI

#if ENABLED(EXTENSIBLE_UI)
//#define EXTUI_LOCAL_BEEPER // Enables use of local Beeper pin with external display
#endif

//=============================================================================
//=============================== Graphical TFTs ==============================
//=============================================================================
Expand All @@ -2129,9 +2139,12 @@
//#define FSMC_GRAPHICAL_TFT

//
// TFT Little VGL UI
// TFT LVGL UI
//
// Default MKS icons and fonts: https://git.io/JJvzK
// Copy mks_pic and mks_font folders to the root of your SD
//
//#define TFT_LITTLE_VGL_UI
//#define TFT_LVGL_UI

//=============================================================================
//============================ Other Controllers ============================
Expand Down
30 changes: 18 additions & 12 deletions Marlin/Configuration_adv.h
Expand Up @@ -36,7 +36,7 @@
// @section temperature

//===========================================================================
//=============================Thermal Settings ============================
//============================= Thermal Settings ============================
//===========================================================================

/**
Expand Down Expand Up @@ -1519,7 +1519,7 @@
// ADC Button Debounce
//
#if HAS_ADC_BUTTONS
#define ADC_BUTTON_DEBOUNCE_DELAY 16 // (ms) Increase if buttons bounce or repeat too fast
#define ADC_BUTTON_DEBOUNCE_DELAY 16 // Increase if buttons bounce or repeat too fast
#endif

// @section safety
Expand Down Expand Up @@ -1553,8 +1553,9 @@
//#define BABYSTEP_WITHOUT_HOMING
//#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
#define BABYSTEP_MULTIPLICATOR_Z 1 // Babysteps are very small. Increase for faster motion.
#define BABYSTEP_MULTIPLICATOR_XY 1
//#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps
#define BABYSTEP_MULTIPLICATOR_Z 1 // (steps or mm) Steps or millimeter distance for each Z babystep
#define BABYSTEP_MULTIPLICATOR_XY 1 // (steps or mm) Steps or millimeter distance for each XY babystep

//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
Expand Down Expand Up @@ -1828,7 +1829,7 @@

// @section motion

// The number of lineear moves that can be in the planner at once.
// The number of linear moves that can be in the planner at once.
// The value of BLOCK_BUFFER_SIZE must be a power of 2 (e.g. 8, 16, 32)
#if BOTH(SDSUPPORT, DIRECT_STEPPING)
#define BLOCK_BUFFER_SIZE 8
Expand Down Expand Up @@ -1901,6 +1902,9 @@
// This option inserts short delays between lines of serial output.
#define SERIAL_OVERRUN_PROTECTION

// For serial echo, the number of digits after the decimal point
//#define SERIAL_FLOAT_PRECISION 4

// @section extras

/**
Expand Down Expand Up @@ -3425,23 +3429,25 @@

/**
* MMU Extruder Sensor
* Add support for Prusa IR Sensor (or other) to detect that filament reach the extruder to make loading filament more reliable
* If your extruder is equipped with a filament sensor located less than 38mm from the gears you can use this feature
* During loading to the extruder, the sensor will stop the loading command when he's triggered and make a last move to load filament to the gears
* If no filament is detected, MMU2 will make more loading attemps, if finally no filament is detected, the printer will enter in runout state
*
* Support for a Prusa (or other) IR Sensor to detect filament near the extruder
* and make loading more reliable. Suitable for an extruder equipped with a filament
* sensor less than 38mm from the gears.
*
* During loading the extruder will stop when the sensor is triggered, then do a last
* move up to the gears. If no filament is detected, the MMU2 can make some more attempts.
* If all attempts fail, a filament runout will be triggered.
*/

//#define MMU_EXTRUDER_SENSOR
#if ENABLED(MMU_EXTRUDER_SENSOR)
#define MMU_LOADING_ATTEMPTS_NR 5 //max. number of attempts to load filament if first load fail
#endif

/**
* Using a sensor like the MMU2S
* This mode only work if you have a MK3S extruder with sensor sensing the extruder idler mmu2s
* This mode requires a MK3S extruder with a sensor at the extruder idler, like the MMU2S.
* See https://help.prusa3d.com/en/guide/3b-mk3s-mk2-5s-extruder-upgrade_41560, step 11
*/

//#define PRUSA_MMU2_S_MODE
#if ENABLED(PRUSA_MMU2_S_MODE)
#define MMU2_C0_RETRY 5 // Number of retries (total time = timeout*retries)
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/LPC1768/main.cpp
Expand Up @@ -122,7 +122,7 @@ void HAL_init() {
delay(1000); // Give OS time to notice
USB_Connect(TRUE);

#if !BOTH(SHARED_SD_CARD, INIT_SDCARD_ON_BOOT) && DISABLED(NO_SD_HOST_DRIVE)
#if DISABLED(NO_SD_HOST_DRIVE)
MSC_SD_Init(0); // Enable USB SD card access
#endif

Expand All @@ -140,7 +140,7 @@ void HAL_init() {

// HAL idle task
void HAL_idletask() {
#if ENABLED(SHARED_SD_CARD)
#if HAS_SHARED_MEDIA
// If Marlin is using the SD card we need to lock it to prevent access from
// a PC via USB.
// Other HALs use IS_SD_PRINTING() and IS_SD_FILE_OPEN() to check for access but
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/SAMD51/HAL.h
Expand Up @@ -129,7 +129,6 @@ void HAL_adc_init();
#define HAL_ADC_READY() true

void HAL_adc_start_conversion(const uint8_t adc_pin);
inline uint16_t HAL_adc_get_result() { return HAL_adc_result; }

//
// Pin Map
Expand Down
10 changes: 5 additions & 5 deletions Marlin/src/HAL/SAMD51/timers.cpp
Expand Up @@ -36,15 +36,15 @@
// --------------------------------------------------------------------------

const tTimerConfig TimerConfig[NUM_HARDWARE_TIMERS+1] = {
{ {.pTc=TC0}, TC0_IRQn, TC_PRIORITY(0) }, // 0 - stepper
{ {.pTc=TC0}, TC0_IRQn, TC_PRIORITY(0) }, // 0 - stepper (assigned priority 2)
{ {.pTc=TC1}, TC1_IRQn, TC_PRIORITY(1) }, // 1 - stepper (needed by 32 bit timers)
{ {.pTc=TC2}, TC2_IRQn, TC_PRIORITY(2) }, // 2 - tone (framework)
{ {.pTc=TC3}, TC3_IRQn, TC_PRIORITY(3) }, // 3 - servo
{ {.pTc=TC4}, TC4_IRQn, TC_PRIORITY(4) }, // 4 - software serial
{ {.pTc=TC2}, TC2_IRQn, 5 }, // 2 - tone (reserved by framework and fixed assigned priority 5)
{ {.pTc=TC3}, TC3_IRQn, TC_PRIORITY(3) }, // 3 - servo (no interrupts used)
{ {.pTc=TC4}, TC4_IRQn, TC_PRIORITY(4) }, // 4 - software serial (no interrupts used)
{ {.pTc=TC5}, TC5_IRQn, TC_PRIORITY(5) },
{ {.pTc=TC6}, TC6_IRQn, TC_PRIORITY(6) },
{ {.pTc=TC7}, TC7_IRQn, TC_PRIORITY(7) },
{ {.pRtc=RTC}, RTC_IRQn, TC_PRIORITY(8) } // 8 - temperature
{ {.pRtc=RTC}, RTC_IRQn, TC_PRIORITY(8) } // 8 - temperature (assigned priority 6)
};

// --------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/HAL/STM32/fastio.h
Expand Up @@ -81,6 +81,7 @@ void FastIO_init(); // Must be called before using fast io macros
#define IS_OUTPUT(IO)

#define PWM_PIN(P) digitalPinHasPWM(P)
#define NO_COMPILE_TIME_PWM

// digitalRead/Write wrappers
#define extDigitalRead(IO) digitalRead(IO)
Expand Down
9 changes: 9 additions & 0 deletions Marlin/src/HAL/STM32/timers.cpp
Expand Up @@ -36,6 +36,15 @@
#define TEMP_TIMER_IRQ_PRIO 14 // 14 = after hardware ISRs
#endif

// Ensure the default timer priority is somewhere between the STEP and TEMP priorities.
// The STM32 framework defaults to interrupt 14 for all timers. This should be increased so that
// timing-sensitive operations such as speaker output are note impacted by the long-running
// temperature ISR. This must be defined in the platformio.ini file or the board's variant.h,
// so that it will be consumed by framework code.
#if !(TIM_IRQ_PRIO > STEP_TIMER_IRQ_PRIO && TIM_IRQ_PRIO < TEMP_TIMER_IRQ_PRIO)
#error "Default timer interrupt priority is unspecified or set to a value which may degrade performance."
#endif

#if HAS_TMC_SW_SERIAL
#include <SoftwareSerial.h>
#ifndef SWSERIAL_TIMER_IRQ_PRIO
Expand Down
7 changes: 3 additions & 4 deletions Marlin/src/HAL/STM32F1/HAL.cpp
Expand Up @@ -258,15 +258,15 @@ void HAL_init() {
// HAL idle task
void HAL_idletask() {
#ifdef USE_USB_COMPOSITE
#if ENABLED(SHARED_SD_CARD)
#if HAS_SHARED_MEDIA
// If Marlin is using the SD card we need to lock it to prevent access from
// a PC via USB.
// Other HALs use IS_SD_PRINTING() and IS_SD_FILE_OPEN() to check for access but
// this will not reliably detect delete operations. To be safe we will lock
// the disk if Marlin has it mounted. Unfortunately there is currently no way
// to unmount the disk from the LCD menu.
// if (IS_SD_PRINTING() || IS_SD_FILE_OPEN())
/* copy from lpc1768 framework, should be fixed later for process SHARED_SD_CARD*/
/* copy from lpc1768 framework, should be fixed later for process HAS_SHARED_MEDIA*/
#endif
// process USB mass storage device class loop
MarlinMSC.loop();
Expand All @@ -277,9 +277,8 @@ void HAL_clear_reset_source() { }

/**
* TODO: Check this and change or remove.
* currently returns 1 that's equal to poweron reset.
*/
uint8_t HAL_get_reset_source() { return 1; }
uint8_t HAL_get_reset_source() { return RST_POWER_ON; }

void _delay_ms(const int delay_ms) { delay(delay_ms); }

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_fsmc.cpp
Expand Up @@ -291,7 +291,7 @@ uint32_t LCD_IO_ReadData(uint16_t RegValue, uint8_t ReadSize) {
return uint32_t(data);
}

#if ENABLED(LCD_USE_DMA_FSMC)
#ifdef LCD_USE_DMA_FSMC

void LCD_IO_WriteMultiple(uint16_t color, uint32_t count) {
while (count > 0) {
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32F1/onboard_sd.cpp
Expand Up @@ -20,7 +20,7 @@
#include "SPI.h"
#include "fastio.h"

#if ENABLED(SHARED_SD_CARD)
#if HAS_SHARED_MEDIA
#ifndef ON_BOARD_SPI_DEVICE
#define ON_BOARD_SPI_DEVICE SPI_DEVICE
#endif
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32_F4_F7/eeprom_emul.cpp
Expand Up @@ -336,7 +336,7 @@ uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data) {
* @brief Erases PAGE and PAGE1 and writes VALID_PAGE header to PAGE
* @param None
* @retval Status of the last operation (Flash write or erase) done during
* EEPROM formating
* EEPROM formatting
*/
static HAL_StatusTypeDef EE_Format() {
FLASH_EraseInitTypeDef pEraseInit;
Expand Down

0 comments on commit 49fa99c

Please sign in to comment.