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

Implement the watchdog timer #2

Open
joshctaylor opened this issue Oct 7, 2020 · 8 comments
Open

Implement the watchdog timer #2

joshctaylor opened this issue Oct 7, 2020 · 8 comments

Comments

@joshctaylor
Copy link
Contributor

joshctaylor commented Oct 7, 2020

The watchdog timer could be used to force a hard reboot if the software locks up

@nedhorning
Copy link
Owner

I'll need help with this.

@joshctaylor
Copy link
Contributor Author

I'll need help with this.

I just uploaded a demo for you - slowly getting around to the other bits :)

@nedhorning
Copy link
Owner

I noticed that the counter increments by 2 when a reset happens and can't figure out why since it's set in the setup. .

@joshctaylor
Copy link
Contributor Author

I have to admit, I tested the reset counter before adding it to the watchdog example. I'll get some time later this week to look.

@joshctaylor
Copy link
Contributor Author

Hi @nedhorning I can't recreate this error - its counting correctly for me and tested up to 45 cycles and counting. Did you use the tool to initialise the EPROM to zero?

image

@nedhorning
Copy link
Owner

I didn't initialize the EPROM to zero. Should I do that? I wasn't sure which tool you refer to. I can set all registers to zero but not sure how else to initialize it.

@joshctaylor
Copy link
Contributor Author

Moving from emails back to this thread - yes it looks as though this could be the terminal app (I'm using the one built into Arduino on mac) or the serial driver on the PC taking its time. Does adding a delay of a few seconds before the startup message solve the issue?

@nedhorning
Copy link
Owner

I tried setting delays at different places and also move Serial.begin and associated while loop to the top of the setup() but the sporadic reset messages persisted. I have a feeling there is an issue reestablishing the serial connection after a restart although not sure why that would be and especially why it would be sporadic. If I can get some time this weekend I'll add the watchdog timer to the tracker code and will try to monitor it via the LoRa packet. I'll add the STM chip temperature as well.

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

2 participants