Reset/Halt
Before performing a flash operation on your DUT you often want to put the DUT into a halted reset state.
halt_dut.py
from lager import DUT
mcu0 = DUT(mcu=0)
# Your DUT my be a multi-mcu architecture
# in which case you'll need more than 1 debug probe.
mcu1 = DUT(mcu=1)
# Halt your device
mcu0.reset(halt=True)
mcu1.reset(halt=True)
Halt DUT
~ lager debug reset --halt --mcu 0 --dut 1
~ lager debug reset --halt --mcu 1 --dut 1
You can also perform a reset and start operation by setting the halt
flag to False
.
reset_start_dut.py
# Reset and start
mcu0.reset()
Reset and Start DUT
~ lager debug reset --mcu 0 --dut 1