[Cryptech-Commits] [sw/stm32] 01/06: Wait for FPGA_DONE on startup (available on Alpha board)

git at cryptech.is git at cryptech.is
Thu Jun 2 12:58:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

fredrik at thulin.net pushed a commit to branch master
in repository sw/stm32.

commit bfcb358a699e08f738e1b0b46ea6aa821a6b3145
Author: Fredrik Thulin <fredrik at thulin.net>
AuthorDate: Wed Jun 1 13:36:32 2016 +0200

    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



More information about the Commits mailing list