micro-ROS / micro-ROS/micro_ros_azure_rtos_app

Incorrect definition of TX_TIMER_NANOSECOND_PER_TICK?

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
13
Forks
7
PR merge metrics
No merged PRs in 30d

Description

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: https://github.com/micro-ROS/micro_ros_azure_rtos_app/blob/49cd0df65aa717001f92beb5ac324fa5de629af4/app/microros_time.c#L5

Something like below would make more sense:

```c
#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)

Contributor guide

Open the contributing guide

Research direction

Inspect app/microros_time.c at line 5 and the surrounding timer definitions. Compare the current TX_TIMER_NANOSECOND_PER_TICK calculation with TX_TIMER_TICKS_PER_SECOND and the proposed formula; done means confirming the correct conversion and updating the definition if needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.