Author SHA1 Message Date
rehius 1c497e1f1e Update config.h 2024-09-03 17:19:16 +00:00
rehius 476dd2212e Update boot_detect.c 2024-09-03 17:19:07 +00:00
rehius 5c2cf01ac1 Update boot_detect.c 2024-09-01 14:50:07 +00:00
rehius f1078f48cb Update boot_detect.c 2024-09-01 14:36:07 +00:00
rehius e307c02199 Update config.h 2024-09-01 14:33:29 +00:00
rehius e2c0bcea68 Update boot_detect.c 2024-09-01 14:33:14 +00:00
2 changed files with 16 additions and 14 deletions

No files matched your search

+15 -13
View File
@@ -20,12 +20,23 @@ bool wait_for_boot(int timeout_ms) {
bool was_cmd1 = false;
int reset_attempts = 0;
while(!time_reached(tio_full)) {
while(1) {
if (time_reached(tio_cmd1))
{
if (reset_attempts > 4)
{
halt_with_error(0, 3);
if (was_read_zero) {
halt_with_error(1, 3);
}
else if (tio_cmd1 != tio_full) {
halt_with_error(0, 3);
}
else if (was_cmd1) {
halt_with_error(2, 3);
} else {
halt_with_error(3, 3);
}
return false;
}
reset_attempts++;
reset_cpu();
@@ -45,7 +56,7 @@ bool wait_for_boot(int timeout_ms) {
}
else if (last_word == 0x51000000 && word == 0x0055) //read block 0
{
tio_full = make_timeout_time_ms(100);
tio_cmd1 = make_timeout_time_ms(400);
was_read_zero = true;
} else if (was_read_zero && last_word == 0x4D000200 && word == 0x00B1) // read status - erista only
{
@@ -58,13 +69,4 @@ bool wait_for_boot(int timeout_ms) {
last_word = word;
}
}
if (was_read_zero) {
halt_with_error(1, 3);
}
else if (was_cmd1) {
halt_with_error(2, 3);
} else {
halt_with_error(3, 3);
}
return false;
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
#define OFFSET_MAX 6900
#define VER_HI 2
#define VER_LO 77
#define VER_LO 79
bool is_configured();
void init_config();