fix: migrate CMSIS-RTOS v1 to v2 API, fix stack overflow and float format crash

- Replace osThreadDef/osThreadCreate/osThread with osThreadNew/osThreadAttr_t
- Replace osSignalWait with osThreadFlagsWait
- Change osThreadId to osThreadId_t, osPriority to osPriority_t
- Increase daemon task stack from 128 to 512 to fix stack overflow HardFault
- Cast BMI088.Temperature float to int before %d format to fix va_list misalignment
This commit is contained in:
2026-05-30 20:38:30 +08:00
parent dff49cb462
commit b7328a0c93
4 changed files with 56 additions and 36 deletions
+6 -1
View File
@@ -176,10 +176,15 @@ void INS_Task(void)
IMU_Temperature_Ctrl();
}
if ((count++ % 1000) == 0)
if ((count % 1000) == 0)
{
// 1Hz 可以加入monitor函数,检查IMU是否正常运行/离线
LOGINFO("[IMU] Temperature: %d C, PWM: %d", (int)(BMI088.Temperature * 100), (int)TempCtrl.Output);
}
count++;
if (count >= 10000)
count = 0;
}
/**