-
Notifications
You must be signed in to change notification settings - Fork 804
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
SOM boot recovery #1712
SOM boot recovery #1712
Conversation
adeebshihadeh
commented
Nov 9, 2023
•
edited
Loading
edited
- logging
- HITL test
- check GPIO + serial
board/drivers/bootkick.h
Outdated
waiting_to_boot_countdown = 45U; | ||
} | ||
if (waiting_to_boot_countdown > 0U) { | ||
if (current_board->read_som_gpio() || (boot_state != BOOT_BOOTKICK)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, close if not an issue
As discussed, we shouldn't only rely on the GPIO being set, but also look for serial messages to detect a boot. This would be compatible with all XBLs that we have shipped with 3X. |
@robbederks can you do a final review? This should only trigger in a very narrow case, so any potential FPs shouldn't be too bad. |
/* | ||
Ensure SOM boots in case it goes into QDL mode. Reset behavior: | ||
* shouldn't trigger on the first boot after power-on | ||
* only try reset once per bootkick, i.e. don't keep trying until booted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once per bootkick
? bootkick_reset_triggered
is not reset anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this is worded in a confusing way, but the reset should only happen once per panda boot, and consequently once per bootkick
if (!bootkick_reset_triggered && (boot_state == BOOT_BOOTKICK) && (boot_state_prev == BOOT_STANDBY)) { | ||
waiting_to_boot_countdown = 45U; | ||
} | ||
if (waiting_to_boot_countdown > 0U) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you get a heartbeat before this is 0? It will enter STANDBY, then enter this condition again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(boot_state != BOOT_BOOTKICK)
will trip and the "waiting to boot" state will clear