aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/PWM/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32/PWM/main.c')
-rw-r--r--testhal/STM32/PWM/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/testhal/STM32/PWM/main.c b/testhal/STM32/PWM/main.c
index bda66573d..71daaacdc 100644
--- a/testhal/STM32/PWM/main.c
+++ b/testhal/STM32/PWM/main.c
@@ -60,8 +60,7 @@ static PWMConfig pwmcfg = {
};
/*
- * Entry point, note, the main() function is already a thread in the system
- * on entry.
+ * Application entry point.
*/
int main(int argc, char **argv) {
@@ -69,6 +68,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();
+
+ /*
* Creates the blinker thread.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);