- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Wiced RTOS- ThreadX, how long(ms) is one tick? example: tx_thread_sleep(1).
Solved! Go to Solution.
- Labels:
-
WICED Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1 Timer tick is equivalent to 1msec.
To support my statement:
In platform.c file, the platform_tick_timer is initialized.
platform_tick_timer_init() -> platform_tick_init() -> platform_pmu_cycles_per_tick = CYCLES_PMU_PER_TICK;
CYCLES_PMU_PER_TICK = ( ( ( (platform_reference_clock_get_freq( PLATFORM_REFERENCE_CLOCK_ILP )) + ( (1000) / 2 ) ) / (1000) ) )
and PLATFORM_REFERENCE_CLOCK_ILP = 32000.
(Note: Platform I have referred is: CYW943907AEVAL1F)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1 Timer tick is equivalent to 1msec.
To support my statement:
In platform.c file, the platform_tick_timer is initialized.
platform_tick_timer_init() -> platform_tick_init() -> platform_pmu_cycles_per_tick = CYCLES_PMU_PER_TICK;
CYCLES_PMU_PER_TICK = ( ( ( (platform_reference_clock_get_freq( PLATFORM_REFERENCE_CLOCK_ILP )) + ( (1000) / 2 ) ) / (1000) ) )
and PLATFORM_REFERENCE_CLOCK_ILP = 32000.
(Note: Platform I have referred is: CYW943907AEVAL1F)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
riya wrote:
1 Timer tick is equivalent to 1msec.
Don't assueme 1 tick as 1 ms.
It's true for now as SYSTICK_FREQUENCY happen to be 1000, but there is no guarantee it won't be changed in the future.
Use tx_thread_sleep((ULONG)(num_ms * SYSTICK_FREQUENCY / 1000)) instead.