aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/UART
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32/UART')
-rw-r--r--testhal/STM32/UART/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/testhal/STM32/UART/main.c b/testhal/STM32/UART/main.c
index b823430c9..ac4afc1c7 100644
--- a/testhal/STM32/UART/main.c
+++ b/testhal/STM32/UART/main.c
@@ -111,8 +111,7 @@ static UARTConfig uart_cfg_1 = {
};
/*
- * Entry point, note, the main() function is already a thread in the system
- * on entry.
+ * Application entry point.
*/
int main(int argc, char **argv) {
@@ -120,6 +119,16 @@ int main(int argc, char **argv) {
(void)argv;
/*
+ * System initializations.
+ * - HAL initialization, this also initializes the configured device drivers
+ * and performs the board-specific initializations.
+ * - Kernel initialization, the main() function becomes a thread and the
+ * RTOS is active.
+ */
+ halInit();
+ chSysInit();
+
+ /*
* Activates the serial driver 2 using the driver default configuration.
*/
uartStart(&UARTD2, &uart_cfg_1);