summaryrefslogtreecommitdiffstats
path: root/flash
diff options
context:
space:
mode:
Diffstat (limited to 'flash')
-rw-r--r--flash/bootloader/bootloader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/flash/bootloader/bootloader.c b/flash/bootloader/bootloader.c
index 7179bbef95..543a950129 100644
--- a/flash/bootloader/bootloader.c
+++ b/flash/bootloader/bootloader.c
@@ -139,8 +139,9 @@ void PlatformInit(void)
PBDR |= 0x20; // set PB5 to keep power (fixes the ON-holding problem)
PBIOR |= 0x20; // make PB5 an output
if (ReadADC(0) < 0x1FF) // charger plugged?
- {
- // how do we switch this off?
+ { // switch off the HD, else a flat battery may not start
+ PACR2 &= 0xFBFF; // GPIO for PA5
+ PAIOR |= 0x20; // make PA5 an output (low by default)
}
#endif