Forum Discussion
Altera_Forum
Honored Contributor
7 years agoThe variation in the elapsed time seems to indicate that you have another task taking priority over yours. Another explanation could be that the time returned by gettimeofday() is not that accurate. I'm not very familiar with embedded Linux so I can't give you more details there, but which period are you using for the system timer? As it is used by the scheduler, it may be worth to check that it is set to 1ms and not 10ms and you may get a bit more consistent results.
Do you really need Linux on your target? Given your requirement it may be worth it to use a real time operating system instead where you have more control on how the processor will be used on critical tasks. You could also squeeze out more performance from other lighter IP stacks such as LwIP. I think there are some variations of Linux with real time OS optimizations but I don't know if they can be used on the SoC platform.