-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Implement reset for ARC development boards #26665
Labels
Comments
abrodkin
added
Enhancement
Changes/Updates/Additions to existing features
area: Boards
area: ARC
ARC Architecture
Hardware Support
labels
Jul 6, 2020
IRISZZW
added a commit
to foss-for-synopsys-dwc-arc-processors/zephyr
that referenced
this issue
Aug 25, 2020
In some cases it might be a good idea to reset the board for real to make sure it is completely recovered from some failed state (simple re-loading of the application binary or even Elf file contents doesn't affect most of internal CPU states so doesn't help in recovery, see zephyrproject-rtos#25022 & zephyrproject-rtos#26665). And so we may want to utilize some external utility which triggers the hard reset (in case of ARC boards it is https://github.com/foss-for-synopsys-dwc-arc-processors/rff-ftdi-reset). So we need to have a way to execute an external command before each and every test. Now given we already have quite some call-backs we try to use them before re-inventing the wheel. And pre_script seem to be a good option with just on minor note - it is called after serial port gets open. And while in some cases it might be OK if serial port on the board is not affected by the board's reset, if it is affected we'll be losing connection on reset (and that's the case with ARC boards BTW as the FTDI USB-to-Serial IC is also wired to the reset signal on most of the boards). That said we just move invocation of pre_script before opening the serial port and everything should be good now. Signed-off-by: Watson Zeng <[email protected]>
carlescufi
pushed a commit
that referenced
this issue
Aug 31, 2020
In some cases it might be a good idea to reset the board for real to make sure it is completely recovered from some failed state (simple re-loading of the application binary or even Elf file contents doesn't affect most of internal CPU states so doesn't help in recovery, see #25022 & #26665). And so we may want to utilize some external utility which triggers the hard reset (in case of ARC boards it is https://github.com/foss-for-synopsys-dwc-arc-processors/rff-ftdi-reset). So we need to have a way to execute an external command before each and every test. Now given we already have quite some call-backs we try to use them before re-inventing the wheel. And pre_script seem to be a good option with just on minor note - it is called after serial port gets open. And while in some cases it might be OK if serial port on the board is not affected by the board's reset, if it is affected we'll be losing connection on reset (and that's the case with ARC boards BTW as the FTDI USB-to-Serial IC is also wired to the reset signal on most of the boards). That said we just move invocation of pre_script before opening the serial port and everything should be good now. Signed-off-by: Watson Zeng <[email protected]>
@nashif, @galak is there any interest in bundling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Originated from #25022.
Short story is: in some cases the board might enter non-recoverable state from which we may only recover with help of real HW reset. And fortunately this is easily doable on most of ARC development boards. Read-on...
Most of ARC development boards (excluding just a legacy EM StarterKit) have global board's reset wired to the same FTDI IC which is used for both JTAG connection & UART. And what we do internally we use a simple homebrew
rff-reset
utility (see https://github.com/foss-for-synopsys-dwc-arc-processors/rff-ftdi-reset, kudos to @Palmyr3) to cold-reset our boards.What we may do is to integrate its utilization by the sanitycheck script, for example we tried it that way:
Indeed that's just a mock-up and we should do it more-elegant and still quite universal because upcoming MDB-runner (#24806) will also benefit from this feature.
Also if we need to package
rff-reset
in the Zephyr's SDK. That we may do super-easy via https://github.com/zephyrproject-rtos/sdk-ng/tree/master/meta-zephyr-sdk or in any other way given simplicity of the utility and not that many dependencies (justlibftdi
&libusb
). Here I guess @stephanosio might suggest what's the best option ATM and looking forward.The text was updated successfully, but these errors were encountered: