-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
[BUG] Unconditionnal definition of SUICIDE_PIN
for BOARD_RAMPS_CREALITY
, leading to issue with PSU_CONTROL
#27142
Comments
I also have an interrogation about the suicide feature, what is it exactly ? I can't find any documentation or discussion about it. It seems to be a legacy of Marlin 1. Should it be mapped to a pin connected to the reset pin of a the microcontroller to force reset in case of a critical failure ? |
SUICIDE_PIN
for BOARD_RAMPS_CREALITY
, leading to issue with PSU_CONTROL
Some boards (ZM3) and add-ons ( |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
I have a CR-10 S5 with a Creality mainboard v2.2. It runs on Marlin 2.1.2.3 with
BOARD_RAMPS_CREALITY
I was setting up
PSU_CONTROL
to turn off my printer onM81
using a static relay located before my power supply unit.To use
PSU_CONTROL
, aPS_ON_PIN
is required. The default pin 40, inpins_RAMPS CREALITY.h
isn't accessible in my board. The CR2020 must have a specific board with pin 40 exposed, which is not my case.So, I added
#define PS_ON_PIN EXP4_PIN
in myConfiguration.h
, based onpins_RAMPS CREALITY.h
. Comments suggest thatPS_ON_PIN
could be use on pin 12, which seems much more logical than pin 40.At this time,
PSU_CONTROL
comportement was inversed (M80 turned off and M81 turned on) no matter what was the value ofPSU_ACTIVE_STATE
. After digging a bit, I found that inM80_M81.cpp
forM81()
(turn off), the usage ofsuicide()
is prioritary topowerManager.power_off_soon()
:For
M80()
(turn on), this time afterpowerManager.power_on()
, it turn low theSUICIDE_PIN
:PSU_CONTROL
comportement was inversed because :SUICIDE_PIN
is unconditionnally defined to pin 12 (the one I use)suicide
is the opposite of the one I was searching forsuicide
was prioritary toPSU_CONTROL
This unconfitionnal definition sounds problematic to me, as it seems to be specific to one printer among the tens of creality's printer.
I solved my problem by replacing this part with this
and
#define SUICIDE_PIN -1
in myConfiguration.h
(I'll make a PR for this, looks like a good fix to me)Nevertheless, I'm not convinced that one specific printer using a modified version of a more standard board should drive the default definition of the standard one.
At least, I think that
PS_ON_PIN
andSUICIDE_PIN
should be modified. Pin 40 (PS_ON_PIN
) isn't exposed on the standard creality mainboard, so this is irrelevant. Pin 12 (SUICIDE_PIN
) is a part of a group of 4 pins planned as extensions pins.If a default
PS_ON_PIN
is really required, then its sounds more logic to me to use pin 12, as comments suggested.PS: After some research, the board used in the CR2020 seems to be the Creality mainboard v3.1, which seems to be discontinued.
Maybe, this board should have its own
pins.h
file.Bug Timeline
No response
Expected behavior
No response
Actual behavior
No response
Steps to Reproduce
No response
Version of Marlin Firmware
2.1.2.3
Printer model
Creality CR-10 S5
Electronics
Power Supply Control with a static relay
LCD/Controller
No response
Other add-ons
No response
Bed Leveling
None
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
Configuration.zip
The text was updated successfully, but these errors were encountered: