<p>The problem not with marlin,
The board is reset by the Serial port DTR line going low and pulsing the Arduino reset pin,
You can prevent this if you can disable DTR on your PC or by removing the capacitor that connects the DTR Serial pin to the reset pin.</p>

CC BY-SA 4.0
2022-08-20T08:52:12.950Z
2022-08-20T08:52:12.950Z
ioen jid
<p>My hardware Arduino Mega with RAMPS 1.6 with Marlin 1.0.2 and powered by external power to prevent my board from losing memory, when I reconnect the USB and serial goes offline, the board set last position e.g 10,0,0 to 0,0,0 as x,y,z</p>
<p>How to prevent last position  from reset ?</p>

CC BY-SA 4.0
2022-08-17T13:12:44.543Z
Easy answer is to not reconnect the USB, maybe you need to explain why you reconnect.
0scar
<marlin><firmware>
Prevent postion from reset to 0.0.0 when serial goes offline
ioen jid
# Prevent postion from reset to 0.0.0 when serial goes offline

(Asked by: username_0 on 2022-08-16)

My hardware Arduino Mega with RAMPS 1.6 with Marlin 1.0.2 and powered by external power to prevent my board from losing memory, when I reconnect the USB and serial goes offline, the board set last position e.g 10,0,0 to 0,0,0 as x,y,z

How to prevent last position from reset ?

**Tags:** marlin, firmware

> **Comments:**
> **username_1**: Easy answer is to not reconnect the USB, maybe you need to explain why you reconnect.  

---

## 1 answers

### Answer by username_0 on 2022-08-20. Score: 2

The problem not with marlin,
The board is reset by the Serial port DTR line going low and pulsing the Arduino reset pin,
You can prevent this if you can disable DTR on your PC or by removing the capacitor that connects the DTR Serial pin to the reset pin.


---

