MainHost: Fix board init to avoid issues when running with SBL
authorSam Nelson <sam.nelson@ti.com>
Thu, 23 Feb 2017 22:09:55 +0000 (17:09 -0500)
committerSam Nelson <sam.nelson@ti.com>
Thu, 23 Feb 2017 22:09:55 +0000 (17:09 -0500)
- Pinmux init is not needed with SBL and if called in Host can cause
issues with DSP running already

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
host_bios/simple_buffer_example/host/MainHost.c

index 6d4efe0347ccfc8c76ae4a062bf88fe3a5c25d6c..dbee1a2fac812010702b2f68ba60b3996a3eb437 100644 (file)
@@ -58,6 +58,7 @@
 /* private functions */
 Void App_taskFxn(UArg arg0, UArg arg1);
 
+//#define NO_SBL
 #define HOST_UART_PRINT
 #ifdef HOST_UART_PRINT
 #define host_printf(X) UART_printf(X)
@@ -108,11 +109,14 @@ Void App_taskFxn(UArg arg0, UArg arg1)
     Board_STATUS boardStatus;
     Board_initCfg boardCfg;
 
-    boardCfg = BOARD_INIT_UNLOCK_MMR
-               | BOARD_INIT_UART_STDIO
+    boardCfg = BOARD_INIT_UART_STDIO
+#ifdef NO_SBL 
+               /* This is only if booting without SBL */
+               | BOARD_INIT_UNLOCK_MMR
                | BOARD_INIT_MODULE_CLOCK
 #if ((!defined(PLATFORM_66AK2E)) && (!defined(PLATFORM_C6678)))
                | BOARD_INIT_PINMUX_CONFIG
+#endif
 #endif
     ;
    boardStatus = Board_init(boardCfg);