Skip to content

NO MERGE Cosmo SP hang debug #2163

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

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft

NO MERGE Cosmo SP hang debug #2163

wants to merge 11 commits into from

Conversation

labbott
Copy link
Collaborator

@labbott labbott commented Jul 18, 2025

No description provided.

mkeeter and others added 10 commits July 17, 2025 14:07
We have an awkward problem where if some task is looping forever
we are stuck and can't access anything except via SWD. There
are some situatiosn (read racks) where we can't get dongle access.
We already have a watchdog which is used for reset.

The RTC block has a small set of backup registers that will not
be reset so long as we don't lose power to VDD (i.e. don't ignition
cycle). This makes our scheme:

- Setup our RTC block and use registers 0 and 1 for our purposes
- On context switch store the task ID into Register 0
- On bootup, copy the contents of Register 0 to Register 1
- In a separate task, set a timer to turn the watchdog off/on
- Log the value of Register 1 to see what the last task ID that
  was running was
 Conflicts:
	app/cosmo/base.toml
	app/grapefruit/base.toml
@labbott labbott marked this pull request as draft July 18, 2025 18:54
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

Successfully merging this pull request may close these issues.

2 participants