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

THERMAL_PROTECTION_GRACE_PERIOD is obsolete #14798

Conversation

robbycandra
Copy link
Contributor

SKR 1.3 Takes long time to boot up if the SD card enabled but SD card is not inserted.
This make the printer halted and show BED MAX TEMP error.

However if the SD Card is inserted or BLTouch ENABLED, BED MAX TEMP error never happened.

I measure on my printer, It need around 4 sec. So I make it 5 sec.

@robbycandra
Copy link
Contributor Author

There is another issue about MAXTEMP at #14139

@thinkyhead
Copy link
Member

Wow. Is this board actually unstable for 5 full seconds? Is something broken with its design?

@tpruvot
Copy link
Contributor

tpruvot commented Aug 2, 2019

the bltouch could slow down a lot the start
tip: tpruvot@4dd6248

@thinkyhead
Copy link
Member

thinkyhead commented Aug 2, 2019

I see the thermal manager doesn't get initialized until after the SD card and EEPROM, which is all very sensible, since some of the temperature timer is bound to depend on loaded settings. However, I wonder if we could initialize that timer sooner so that ADC readings will start much earlier, perhaps even before the boot screen appears. Then the grace period can be timed from the start of ADC reading (instead of from where it is now handled, in manage_heater —called from idle— and applying a best-guess worst-case startup time).

@p3p
Copy link
Member

p3p commented Aug 2, 2019

I greatly reduced the Lowpass filtering on LPC based boards so it only takes 32 samples to converge, this shouldn't be an issue at all anymore, never-mind needing the grace period increased.

@thinkyhead
Copy link
Member

@p3p — That's encouraging. The commit I just added doesn't change much, but saves 4 bytes of SRAM by not duplicating the grace_period variable, and is more explicit about where grace_period gets initialized.

@thinkyhead
Copy link
Member

@robbycandra — Can you check to see that the lowpass filtering improvement has removed the need for a long grace period with the newest PlatformIO LPC core? If you can discover the minimum required grace period, that would be useful data for updating the default value.

@robbycandra
Copy link
Contributor Author

@thinkyhead , great.. Now it can boot perfectly using Grace Period = 0. With SD Card Inserted or Not Inserted.

@robbycandra robbycandra changed the title [LPC1768] Change grace period to 5 sec if SDSUPPORT enabled [LPC1768] Initialize Temp Timer Sooner to minimalize grace period and prevent MAX TEMP BED error Aug 4, 2019
@robbycandra
Copy link
Contributor Author

Do we still need Grace Period ?

I confirm that, With

  #define THERMAL_PROTECTION_GRACE_PERIOD 0

WIth SD Card inserted or Not, With BLTOUCH or Not.
Max Temp Bed Error Halt is not triggered.

I think it is save to remove THERMAL_PROTECTION_GRACE_PERIOD.

@thinkyhead
Copy link
Member

I think it is [safe] to remove THERMAL_PROTECTION_GRACE_PERIOD.

I'll review the related issues to see if this was useful for any other platforms.

@thinkyhead thinkyhead force-pushed the bugfix-2.0.x-Change_Grace_Period branch from f2c60fc to 464b8cc Compare August 6, 2019 01:31
@thinkyhead thinkyhead changed the title [LPC1768] Initialize Temp Timer Sooner to minimalize grace period and prevent MAX TEMP BED error THERMAL_PROTECTION_GRACE_PERIOD is obsolete Aug 6, 2019
@thinkyhead thinkyhead merged commit 5bc2fb0 into MarlinFirmware:bugfix-2.0.x Aug 6, 2019
@robbycandra robbycandra deleted the bugfix-2.0.x-Change_Grace_Period branch August 6, 2019 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants