From bfcb358a699e08f738e1b0b46ea6aa821a6b3145 Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Wed, 1 Jun 2016 13:36:32 +0200 Subject: Wait for FPGA_DONE on startup (available on Alpha board) --- projects/board-test/fmc-test.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/projects/board-test/fmc-test.c b/projects/board-test/fmc-test.c index 98e950f..bc5a768 100644 --- a/projects/board-test/fmc-test.c +++ b/projects/board-test/fmc-test.c @@ -86,13 +86,15 @@ int main(void) stm_init(); - uart_send_string("Keep calm for Novena boot...\r\n"); + uart_send_string("Keep calm for FPGA bitstream loading...\r\n"); - // Blink blue LED for six seconds to not upset the Novena at boot. + // Blink blue LED until the FPGA reports it has loaded it's bitstream led_on(LED_BLUE); - for (i = 0; i < 4; i++) { - HAL_Delay(500); - led_toggle(LED_BLUE); + while (! fpgacfg_check_done()) { + for (i = 0; i < 4; i++) { + HAL_Delay(500); + led_toggle(LED_BLUE); + } } // initialize rng -- cgit v1.2.3