sim/looper: close interrupt when looper run
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
5744c62443
commit
ec191d05b6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user