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

SOM boot recovery #1712

Merged
merged 5 commits into from
Nov 10, 2023
Merged

SOM boot recovery #1712

merged 5 commits into from
Nov 10, 2023

Conversation

adeebshihadeh
Copy link
Contributor

@adeebshihadeh adeebshihadeh commented Nov 9, 2023

  • logging
  • HITL test
  • check GPIO + serial

board/drivers/bootkick.h Outdated Show resolved Hide resolved
waiting_to_boot_countdown = 45U;
}
if (waiting_to_boot_countdown > 0U) {
if (current_board->read_som_gpio() || (boot_state != BOOT_BOOTKICK)) {
Copy link
Contributor

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

board/drivers/bootkick.h Outdated Show resolved Hide resolved
board/drivers/bootkick.h Show resolved Hide resolved
@robbederks
Copy link
Contributor

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.

@adeebshihadeh
Copy link
Contributor Author

@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.

@adeebshihadeh adeebshihadeh marked this pull request as ready for review November 10, 2023 00:53
/*
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
Copy link
Contributor

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.

Copy link
Contributor Author

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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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

@adeebshihadeh adeebshihadeh merged commit a1d699b into master Nov 10, 2023
9 checks passed
@adeebshihadeh adeebshihadeh deleted the reset3 branch November 10, 2023 02:01
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.

3 participants