Move before starting scheduler to avoid race condition

- If a CAN message arrives during boot time ISR will fire and try to put
  data into xCAN1RxQueue. At that time queue is NULL: calling RTOS APIs
  on NULL handles will cause a HardFault
This commit is contained in:
2026-06-15 14:11:11 +02:00
parent 8c8fe93d5b
commit ce85e473b3
+1 -1
View File
@@ -110,7 +110,6 @@ int main(void)
MX_SDIO_SD_Init();
/* USER CODE BEGIN 2 */
CAN_Logger_Init(&hcan1, &hcan2);
/* USER CODE END 2 */
/* Init scheduler */
@@ -185,6 +184,7 @@ int main(void)
/* USER CODE END RTOS_EVENTS */
/* USER CODE BEGIN 3 */
CAN_Logger_Init(&hcan1, &hcan2);
/* USER CODE END 3 */
/* Start scheduler */