mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-29 15:04:06 +08:00
When the timer callback is called at a higher rate than the logger can execute the main loop (which is never the case under normal conditions), the semaphore counter will increase unbounded, and eventually lead to an assertion failure in NuttX. The maximum semaphore counter is 0x7FFF, and when the logger runs at default rate (3.5ms), the logger task must be blocked for 0x7FFF*3.5/1000 = 114 seconds continuously for an overflow to happen. I see 2 cases where that could happen: - the logger execution blocks somehow, or busy-loops in an inner loop - a higher-prio task runs busy and hogs the CPU over a long period of time