diff --git a/boards/sim/sim/sim/configs/foc/defconfig b/boards/sim/sim/sim/configs/foc/defconfig index 781f2dba224..167e2aa974d 100644 --- a/boards/sim/sim/sim/configs/foc/defconfig +++ b/boards/sim/sim/sim/configs/foc/defconfig @@ -82,6 +82,7 @@ CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y CONFIG_SCHED_HPWORK=y CONFIG_SCHED_ONEXIT=y +CONFIG_SCHED_SPORADIC=y CONFIG_SCHED_WAITPID=y CONFIG_SIM_M32=y CONFIG_START_MONTH=6 diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index a8999ed4604..c58cc05ca6f 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -205,8 +205,8 @@ static uint32_t nxsched_cpu_scheduler(int cpu, uint32_t ticks, * committed to updating the scheduler for this TCB. */ - sporadic->sched_time.tv_sec = g_sched_time.tv_sec; - sporadic->sched_time.tv_nsec = g_sched_time.tv_nsec; + sporadic->eventtime = SEC2TICK(g_sched_time.tv_sec) + + NSEC2TICK(g_sched_time.tv_nsec); /* Yes, check if the currently executing task has exceeded its * budget.