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

trunner: armv7a9: provide soft restarts #305

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand it's only needed on zynq target, so why do we add it in the common code?

Copy link
Contributor Author

@maska989 maska989 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On other targets are no impact about that, because construction and way how they change states are different from zynq 7000. On other targets we can easily first up reboot and in this time change state. Zynq7000 need to have to change state as first because it prepares target for what is needed after reboot. I added this code there because it doesn't colidate with other targets and clarify situation with order in flashing state.

This is Reset cycle of zynq7000-zedboard:
image

And there is reason why Reboot is needed and what types of Signals can be needed in this situation:
image
image


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)
Comment on lines 30 to +35
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already defined in the same form in the parent class, so you can just remove it just like it's done there: https://github.com/phoenix-rtos/phoenix-rtos-tests/blob/8c6d062c2fbd327e2664ec371fcf8bddf1135483/trunner/target/armv7m7.py#L21C14-L21C14

Copy link
Contributor Author

@maska989 maska989 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@damianloew look closely on line 32. Same history like before. It needs more time to bring down the target.


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