Skip to content

Incorrect definition of TX_TIMER_NANOSECOND_PER_TICK? #25

Description

@christian-nils

Hi,

I had a lot of troubles with my Micro ROS transportation reusing your microros_time.c file. It is possible that the definition of TX_TIMER_NANOSECOND_PER_TICK is incorrect:

#define TX_TIMER_NANOSECOND_PER_TICK ((ULONG) TX_TIMER_TICKS_PER_SECOND * 100000UL)

Something like below would make more sense:

#define TX_TIMER_NANOSECOND_PER_TICK ((ULONG)(1000000000UL / TX_TIMER_TICKS_PER_SECOND))

(see https://github.com/GigaDeviceSemiconductor/GD32H7-micro_ROS/blob/90497369e953888800226964c52e798635aea2ec/GD32H75E_Eval_FreeRTOS_MicorROS/Project/FreeRTOS_miocroROS/extra_sources/microros_time.c#L9)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions