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 more STM32F1 Serial hangs due to overflows #19464

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3e3e187
Update Malyan LCD to use MSerial on STM32F1, and try to prevent use o…
sjasonsmith Sep 21, 2020
6a718b2
Add Configuration.h option.
sjasonsmith Sep 21, 2020
d59c3d2
Allow compiling with STM32 HAL (for Malyan M200/M300)
sjasonsmith Sep 22, 2020
2b824e4
Fix minor issues impacting CI
sjasonsmith Sep 22, 2020
3432150
Macros for other serial port defines
thinkyhead Sep 23, 2020
60a7c21
tweak option name
thinkyhead Sep 23, 2020
d7986fa
Misc fixes, adjustments
thinkyhead Sep 23, 2020
9d81ee6
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/19464
thinkyhead Sep 23, 2020
62b4062
Tweak ANY_RX
thinkyhead Sep 23, 2020
997cad7
Update MarlinSerial.h
thinkyhead Sep 23, 2020
4b0aa06
Fix, consolidate serial sanity-checking
thinkyhead Sep 23, 2020
6a6432c
Merge branch 'PR/18358_F1_Serial_Ints' of https://github.com/sjasonsm…
thinkyhead Sep 23, 2020
678799c
Macro patch
thinkyhead Sep 23, 2020
19abe24
prep for redo
thinkyhead Sep 23, 2020
5cc87f9
Define NUM_SERIAL once
thinkyhead Sep 23, 2020
2d4d582
keep feet on ground
thinkyhead Sep 23, 2020
f16388b
etc
thinkyhead Sep 24, 2020
804d1b1
Update Configuration.h
thinkyhead Sep 24, 2020
d6035bc
HAL and serial cleanup
thinkyhead Sep 24, 2020
98a225d
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/19464
thinkyhead Sep 24, 2020
db35a68
Merge branch 'bf2_lcd_serial_fixups_19464' into pr/19464
thinkyhead Sep 24, 2020
3732dd8
typo
thinkyhead Sep 24, 2020
d974f7a
fix test
thinkyhead Sep 24, 2020
b253be5
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/19464
thinkyhead Sep 24, 2020
e24ee2e
Consolidate LCD_SERIAL defines
thinkyhead Sep 24, 2020
a2641dc
lcd baudrate
thinkyhead Sep 24, 2020
69c6c3d
Serial fixes
thinkyhead Sep 24, 2020
a598fc7
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/19464
thinkyhead Sep 24, 2020
824d31a
better
thinkyhead Sep 24, 2020
ab550c8
Shift MarlinSerial left
thinkyhead Sep 24, 2020
1bb005d
Ok to keep JTAG off?
thinkyhead Sep 24, 2020
d3d5f91
Remove duplicate LCD_SERIAL check
sjasonsmith Sep 24, 2020
f49dc6b
Add MSerial::emergency_parser_enabled
thinkyhead Sep 25, 2020
9428396
Add a bunch of logic
thinkyhead Sep 25, 2020
d98d7d8
Apply to other HALs
thinkyhead Sep 25, 2020
f8d538d
Fix ep-enabled
thinkyhead Sep 25, 2020
9bfdbee
Evaluate macro arg
thinkyhead Sep 25, 2020
a830dbd
undo 1
thinkyhead Sep 25, 2020
4c54163
Revert serial logic
thinkyhead Sep 25, 2020
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
5 changes: 4 additions & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2165,6 +2165,9 @@
// Touch-screen LCD for Malyan M200/M300 printers
//
//#define MALYAN_LCD
#if ENABLED(MALYAN_LCD)
#define LCD_SERIAL_PORT 1 // Default is 1 for Malyan M200
#endif
thinkyhead marked this conversation as resolved.
Show resolved Hide resolved

//
// Touch UI for FTDI EVE (FT800/FT810) displays
Expand All @@ -2178,7 +2181,7 @@
//#define ANYCUBIC_LCD_I3MEGA
//#define ANYCUBIC_LCD_CHIRON
#if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
#define ANYCUBIC_LCD_SERIAL_PORT 3
#define LCD_SERIAL_PORT 3 // Default is 3 for Anycubic
//#define ANYCUBIC_LCD_DEBUG
#endif

Expand Down
10 changes: 5 additions & 5 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1404,8 +1404,8 @@
// Additional options for DGUS / DWIN displays
//
#if HAS_DGUS_LCD
#define DGUS_SERIAL_PORT 3
#define DGUS_BAUDRATE 115200
#define LCD_SERIAL_PORT 3
#define LCD_BAUDRATE 115200

#define DGUS_RX_BUFFER_SIZE 128
#define DGUS_TX_BUFFER_SIZE 48
Expand Down Expand Up @@ -3419,10 +3419,10 @@
#if ENABLED(PRUSA_MMU2)

// Serial port used for communication with MMU2.
// For AVR enable the UART port used for the MMU. (e.g., internalSerial)
// For AVR enable the UART port used for the MMU. (e.g., mmuSerial)
// For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
#define INTERNAL_SERIAL_PORT 2
#define MMU2_SERIAL internalSerial
#define MMU2_SERIAL_PORT 2
#define MMU2_SERIAL mmuSerial

// Use hardware reset for MMU if a pin is defined for it
//#define MMU2_RST_PIN 23
Expand Down
17 changes: 6 additions & 11 deletions Marlin/src/HAL/AVR/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,14 @@ typedef int8_t pin_t;
#endif
#endif

#ifdef DGUS_SERIAL_PORT
#if !WITHIN(DGUS_SERIAL_PORT, -1, 3)
#error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
#ifdef LCD_SERIAL_PORT
#if !WITHIN(LCD_SERIAL_PORT, -1, 3)
#error "LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration."
#endif
#define DGUS_SERIAL internalDgusSerial
#define DGUS_SERIAL_GET_TX_BUFFER_FREE DGUS_SERIAL.get_tx_buffer_free
#endif

#ifdef ANYCUBIC_LCD_SERIAL_PORT
#if !WITHIN(ANYCUBIC_LCD_SERIAL_PORT, -1, 3)
#error "ANYCUBIC_LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration."
#define LCD_SERIAL lcdSerial
#if HAS_DGUS_LCD
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
#endif
#define ANYCUBIC_LCD_SERIAL anycubicLcdSerial
#endif

// ------------------------
Expand Down
Loading