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

Live Debug don't work, device resets because of watchdog #184

Closed
tadeubas opened this issue Feb 7, 2023 · 3 comments
Closed

Live Debug don't work, device resets because of watchdog #184

tadeubas opened this issue Feb 7, 2023 · 3 comments

Comments

@tadeubas
Copy link
Contributor

tadeubas commented Feb 7, 2023

I've tried to follow the steps here to live debug a MaixDock: https://github.com/selfcustody/krux#live-debug-a-device

Win 10 Pro v 21H2 - AMD x64 processor - USB 2.0
MaixPy IDE 0.2.5 (Tools > Open Terminal)
MaixDock M1 (without wireless, encoder KY-040 soldered)

Everything works but after a while Krux resets the device, the image below shows the terminal running, CRTL+C pressed, some arbitrary math executed and suddenly the Krux watchdog restart:

image

@ghost
Copy link

ghost commented Feb 7, 2023

Makes sense. That's unfortunately the watchdog working as designed. This can be worked around by increasing the RESET_TIMEOUT value in src/wdt.py during development and testing: https://github.com/selfcustody/krux/blob/main/src/krux/wdt.py#L24

If this isn't sufficient, there may be a way to modify maixpy_main.c in the MaixPy repo to disable the watchdog on interrupt.

@tadeubas
Copy link
Contributor Author

tadeubas commented Feb 7, 2023

Yes I have disabled it! You just need to add this line on the src/wdt.py:

wdt.stop()

The only problem is that you need to compile the code and flash the device... I will submit a PR complementing this info in README

@tadeubas
Copy link
Contributor Author

tadeubas commented Feb 8, 2023

I've created a way to disable Krux watchdog without the need to build the project from source (see the open PR).

Instructions are presented at README, the user only needs to create a property called WATCHDOG_DISABLE in the config.jsonfile at the device /flash (this is possible to do just before the Krux watchdog resets the device)

@ghost ghost closed this as completed Feb 18, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant