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 M876 called from EP (STM32F103, et.al.) #21210

Merged

Conversation

arjanmels
Copy link
Contributor

Description

This change fixes crashes on STM32F103 (and probably other platforms) with the mergency M876 parser.
The host_response_handler used for M876 is called on an interrupt routine for the emergency response handler. The original routine sent output to the serial port and this causes crashed on STM32F103.
The fix removes all serial output from the routine. This should not affect the essential functionality.

Requirements

Crash can be reproduced on boards using STM32F103, like teh BigTreeTech SKR mini E3 v1.2. A simple "M876 S0" already caused the crash.

Benefits

This change fixes crashes on STM32F103 (and probably other platforms) with the mergency M876 parser.

Configurations

EMERGENCY_PARSER and HOST_ACTION_COMMANDS need to be enabled

Related Issues

It might fix issues with confirmation via the screen, but I cannot test this myself:
bigtreetech/BIGTREETECH-TouchScreenFirmware#1528
bigtreetech/BIGTREETECH-TouchScreenFirmware#1571
bigtreetech/BIGTREETECH-TouchScreenFirmware#1590

@thinkyhead thinkyhead merged commit 83a156e into MarlinFirmware:bugfix-2.0.x Feb 27, 2021
@thinkyhead thinkyhead changed the title Fix m876 emergency on stm32f103 Fix M876 called from EP (STM32F103, et.al.) Feb 27, 2021
vyacheslav-shubin pushed a commit to vyacheslav-shubin/Marlin that referenced this pull request Mar 10, 2021
vyacheslav-shubin pushed a commit to vyacheslav-shubin/Marlin that referenced this pull request Mar 10, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
thinkyhead pushed a commit that referenced this pull request Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants