Skip to content

Experiments with a different timerhook #97

@zdebanos

Description

@zdebanos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions