mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-07-08 21:18:48 +08:00

If the controller frequency is high, system timer interrupts will eventually interrupt the controller function, thereby increasing the execution time. This may lead to skipping the control cycle, which negatively affects the control algorithm. With this option enabled, interrupts are disabled for the duration of the controller function execution. Here example results from CONFIG_EXAMPLES_FOC_PERF output for b-g431b-esc1 board with CONFIG_EXAMPLES_FOC_NOTIFIER_FREQ=10000: 1. CONFIG_EXAMPLES_FOC_CONTROL_CRITSEC=n exec ticks=5258 nsec=30929 per ticks=21268 nsec=125105 2. CONFIG_EXAMPLES_FOC_CONTROL_CRITSEC=y exec ticks=3428 nsec=20164 per ticks=19203 nsec=112958 The difference is ~12us!