diff options
author | Paul Selkirk <paul@psgd.org> | 2016-06-28 01:16:51 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2016-06-28 01:16:51 -0400 |
commit | 75ddc749d6f86bbb5d0f7ca8fc52eeb1fb531426 (patch) | |
tree | 728e8f03fff23c7caaae6444d6a5a929b41fca1b /projects/bootloader/bootloader.c | |
parent | 494081d72999946076995bacf844e022f1bc09b1 (diff) |
Fix the bootloader to accept firmware (with PIN login).
This involves entirely too much duplication of the CLI.
Diffstat (limited to 'projects/bootloader/bootloader.c')
-rw-r--r-- | projects/bootloader/bootloader.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/projects/bootloader/bootloader.c b/projects/bootloader/bootloader.c index 30cd120..3040bd1 100644 --- a/projects/bootloader/bootloader.c +++ b/projects/bootloader/bootloader.c @@ -35,6 +35,7 @@ #include "stm-init.h" #include "stm-led.h" #include "stm-uart.h" +#include "stm-fmc.h" #include "dfu.h" #undef HAL_Delay @@ -72,12 +73,12 @@ int should_dfu() int i; uint8_t rx = 0; - /* While blinking the blue LED for one second, see if we receive a CR on the MGMT UART. + /* While blinking the blue LED for 5 seconds, see if we receive a CR on the MGMT UART. * We've discussed also requiring one or both of the FPGA config jumpers installed * before allowing DFU of the STM32 - that check could be done here. */ led_on(LED_BLUE); - for (i = 0; i < 10; i++) { + for (i = 0; i < 50; i++) { HAL_Delay(100); led_toggle(LED_BLUE); if (uart_recv_char2(STM_UART_MGMT, &rx, 0) == HAL_OK) { @@ -93,6 +94,7 @@ main() int status; stm_init(); + fmc_init(); uart_send_string2(STM_UART_MGMT, (char *) "\r\n\r\nThis is the bootloader speaking..."); |