Welcome! Log In Create A New Profile

Advanced

Heater on for brief period during boot

Posted by tyguy2 
Heater on for brief period during boot
May 17, 2021 07:42PM
Hello all,

I've got a quick question related to Marlin bootup. I've been working on a custom version of Marlin, and ran into a weird error on the hardware side. Currently, when I power my board, the pins used to drive the hot end and bed stay on for a brief period, raising the temps of both. Once the firmware boots, the pins turn off and the firmware functions normally. I don't really feel comfortable with uncontrolled heating, even if it's brief. How do I configure Marlin v2 to make sure the hot end and bed aren't being driven right when the board turns on? I'm fairly sure this isn't a bootloader issue, as I had ran rep rap on this board before Marlin without this issue, and the problem doesn't occur if no program is loaded onto the board.

Thanks in advance for the help!
Re: Heater on for brief period during boot
May 17, 2021 08:42PM
This is a boot loader issue
The boot loader has to ensure that any heater pins are off.
Marlin turns them off as soon as it can, but that is after the boot loader has timed out.

Or if they have been silly enough to put the heaters on open drain pins see [github.com]

Edited 1 time(s). Last edit at 05/17/2021 08:51PM by Dust.
Re: Heater on for brief period during boot
May 19, 2021 01:26PM
I'm 100% positive it's not the bootloader now, I tested the board and the heater doesn't turn on until Marlin sends PWM signals to drive the cooling fan on the board. I don't think it's configured open drain, but just to check that, how exactly would I specify that to the firmware, the github page is a bit less clear on that.

Assuming it's not open drain, where in the firmware would the program "begin" (ie what line of code in what file does execution begin on?) I assumed it was MarlinCore.cpp in the setup() function, but I don't think that's correct, because even after adding "OUT_WRITE(HEATER_0_PIN, HEATER_0_INVERTING);" to the line directly under "void setup()", I still have the fan PWM start before the heater turns off. I added this line just to see if I could force Marlin to turn the pin off immediately at boot, just as a test. Any ideas?
Sorry, only registered users may post in this forum.

Click here to login