diff options
author | Fredrik Thulin <fredrik@thulin.net> | 2016-06-01 13:36:32 +0200 |
---|---|---|
committer | Fredrik Thulin <fredrik@thulin.net> | 2016-06-01 13:36:32 +0200 |
commit | bfcb358a699e08f738e1b0b46ea6aa821a6b3145 (patch) | |
tree | f94386b402ac77594468cf55de793de61502e95b | |
parent | d8ede68bee96b810ad7bfcbd126daf67e2e7b92a (diff) |
Wait for FPGA_DONE on startup (available on Alpha board)
-rw-r--r-- | projects/board-test/fmc-test.c | 12 |
1 files 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 |