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

[BUG] bugfix-2.0.x: "Init KILL, SUICIDE, PSU earlier (#20810)" [ b9ed1395] results in boot loop on LPC1768 platform. #21297

Closed
chrisqwertz opened this issue Mar 9, 2021 · 10 comments

Comments

@chrisqwertz
Copy link
Contributor

chrisqwertz commented Mar 9, 2021

Bug Description

bugfix-2.0.x commit b9ed139 "Init KILL, SUICIDE, PSU earlier (#20810)" results in boot loop on LPC1768 + RAMPS platform.
My stepper drivers are TMC2208.

Configuration Files

Conf_files_b9ed1395.zip

Just to be sure, here's my pins_RAMPS_RE_ARM.h file for my modified RAMPS 1.4 board.

pins_RAMPS_RE_ARM.zip

Steps to Reproduce

Have a LPC1768 + RAMPS 1.4 setup and flash bugfix-2.0.x b9ed139

Expected behavior:

after a reset the controller fan should start up and stop again for about ~0.4s 3 times in a row before stopping again. The bed would start heating during that short time period. Then the marlin logo should appear in display and the printer should go to idle with all IO pins including bed heater having their respective level set.

Actual behavior:

Controller fan spins up and doesn't stop. Heating bed keeps on heating and display stays blank forever.

Additional Information

Reverting the commit and going back to 85d61de fixes the issue again.

@thisiskeithb
Copy link
Member

It's not clear from your report since the referenced commits are from January, but have you tried the latest bugfix-2.0.x (without reverting that commit) to test with the latest code?

@thisiskeithb thisiskeithb added A: LPC176x Needs: More Data We need more data in order to proceed labels Mar 9, 2021
@chrisqwertz
Copy link
Contributor Author

chrisqwertz commented Mar 9, 2021

Yes sir, in fact, that's why I reverted to a known good and spent quite a while applying, reverting and compiling commits until I narrowed it down to the aforementioned culprit.

Upon closer inspection I might have found a lead:

in MarlinCore.cpp moving

 #if HAS_TMC220x
    SETUP_RUN(tmc_serial_begin());
 #endif

so it sits before the PSU_CONTROL init seems to fix it.

Maybe someone with a similar setup can verify that.

I vaguely remember having the TMC in the wrong order and breaking the boot sequence a year or so ago.

If I can be of more help, please let me know.

@thisiskeithb thisiskeithb added Bug: Potential ? and removed Needs: More Data We need more data in order to proceed labels Mar 9, 2021
@chrisqwertz
Copy link
Contributor Author

chrisqwertz commented Mar 9, 2021

I'm now on the latest commit and the issue did not reappear.

To confirm the suspicion I placed SETUP_RUN(tmc_serial_begin()); after

  #if ENABLED(PSU_CONTROL)
    SETUP_LOG("PSU_CONTROL");
    powersupply_on = ENABLED(PSU_DEFAULT_OFF);
    if (ENABLED(PSU_DEFAULT_OFF)) PSU_OFF(); else PSU_ON();
  #endif

which results in getting stuck in the boot loop again.

@thisiskeithb
Copy link
Member

I'm now on the latest commit and the issue did not reappear.

Great news!

@chrisqwertz
Copy link
Contributor Author

I added a proposed fix for the issue: b7f0391

@thisiskeithb
Copy link
Member

I added a proposed fix for the issue: b7f0391

So this issue isn't resolved?

@chrisqwertz
Copy link
Contributor Author

I'm sorry, I didn't word that right:
What I meant was, on the latest bugfix2.0. commit, I moved the TMC init before the PSU init which fixed the issue.

@thisiskeithb
Copy link
Member

What I meant was, on the latest bugfix2.0. commit, I moved the TMC init before the PSU init which fixed the issue.

Got it.

Since you've provided a fix, it'd be faster if you submitted a Pull Request so it can be reviewed.

@thisiskeithb
Copy link
Member

Merged.

@github-actions
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants