sim/looper: close interrupt when looper run
@@ -162,6 +162,10 @@ static int sim_loop_task(int argc, char **argv)
{
while (1)
{
+ irqstate_t flags = up_irq_save();
+
+ sched_lock();
+
/* Handle UART data availability */
sim_uartloop();
@@ -209,6 +213,9 @@ static int sim_loop_task(int argc, char **argv)
foc_dummy_update();
#endif
+ sched_unlock();
+ up_irq_restore(flags);
+
/* Sleep minimal time, let the idle run */
usleep(USEC_PER_TICK);
