I have already done many experiments with pysimCoder generated NuttX code on the SaMoCon platform. The small delays using clock_nanosleep were supposed to be fixed by the Tickless configuration, which has proved to be quite bad (rigorous measurements must be made, speaking only from my experience).
I did some experiments using the systemtick hook, which works well, as I am now capable of achieving at least 4 kHz. Despite the good performance, the hook is tied to the systemtick, introducing a lot of potential switching overhead.
What I propose is a different kind of timerhook. as shown in my local NuttX commit. It uses a local timer device which, when it overflows, generates and interrupt with a sem_post call. The overhead is only in the timer interrupt handling. The timer can be started and its timeout can be set via ioctl calls.
With this, I am also planning to introduce new Makefile and a new nuttx main.c file. If this timerhook proves to be good performing in my experiments, I'd like to create a PR.
I have already done many experiments with pysimCoder generated NuttX code on the SaMoCon platform. The small delays using
clock_nanosleepwere supposed to be fixed by the Tickless configuration, which has proved to be quite bad (rigorous measurements must be made, speaking only from my experience).I did some experiments using the systemtick hook, which works well, as I am now capable of achieving at least 4 kHz. Despite the good performance, the hook is tied to the systemtick, introducing a lot of potential switching overhead.
What I propose is a different kind of timerhook. as shown in my local NuttX commit. It uses a local timer device which, when it overflows, generates and interrupt with a
sem_postcall. The overhead is only in the timer interrupt handling. The timer can be started and its timeout can be set viaioctlcalls.With this, I am also planning to introduce new Makefile and a new nuttx main.c file. If this timerhook proves to be good performing in my experiments, I'd like to create a PR.