Skip to content

Commit

Permalink
trunner: armv7a9: provide soft restarts
Browse files Browse the repository at this point in the history
JIRA: CI-389
  • Loading branch information
maska989 committed Dec 5, 2023
1 parent c789b19 commit f184945
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions trunner/harness/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ def __call__(self, flash=False, hard=False):

self._set_flash_mode(flash)

# Ensuring that first up target will change state before restart
time.sleep(0.5)

if self.host.has_gpio():
self._reboot_dut_gpio(hard=hard)
else:
Expand Down
6 changes: 5 additions & 1 deletion trunner/target/armv7a9.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ class ARMv7A9TargetRebooter(Rebooter):
# TODO add text mode reboot

def _reboot_soft(self):
self._reboot_hard()
self.host.set_reset(0)
time.sleep(0.5)
self.dut.clear_buffer()
self.host.set_reset(1)
time.sleep(0.25)

def _reboot_hard(self):
self.host.set_power(False)
Expand Down

0 comments on commit f184945

Please sign in to comment.