mirror of
https://github.com/andreili/katapult.git
synced 2025-08-23 19:34:06 +02:00
deployer: Wait 100ms before overwriting existing bootloader
If the power supply isn't fully stable or the reset line is glitchy then there may be a few reboots before the mcu becomes stable. If the deployer runs during this unstable period, it may erase the existing bootloader, but not be able to fully write the new bootloader. Wait a 100ms before erasing the existing bootloader in an effort to avoid this situation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
f4ac6470bf
commit
1b71e856a4
@ -77,6 +77,10 @@ sched_main(void)
|
||||
halt();
|
||||
}
|
||||
|
||||
// Wait 100ms to help ensure power supply is stable before
|
||||
// overwriting existing bootloader
|
||||
udelay(100000);
|
||||
|
||||
// Write CanBoot to flash
|
||||
const uint8_t *p = deployer_canboot_binary, *end = &p[cbsize];
|
||||
while (p < end) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user