tests: latency_measure: move timing_init() earlier
Move the call to timing_init() earlier before function call to get frequency. Some arch/SoC/board require initialization before there is a valid frequency value. Or else the printed value would not be useful. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
2164a7d0dc
commit
946c8f0584
1 changed files with 2 additions and 2 deletions
|
@ -32,6 +32,8 @@ void test_thread(void *arg1, void *arg2, void *arg3)
|
||||||
{
|
{
|
||||||
uint32_t freq;
|
uint32_t freq;
|
||||||
|
|
||||||
|
timing_init();
|
||||||
|
|
||||||
bench_test_init();
|
bench_test_init();
|
||||||
|
|
||||||
freq = timing_freq_get_mhz();
|
freq = timing_freq_get_mhz();
|
||||||
|
@ -39,8 +41,6 @@ void test_thread(void *arg1, void *arg2, void *arg3)
|
||||||
TC_START("Time Measurement");
|
TC_START("Time Measurement");
|
||||||
TC_PRINT("Timing results: Clock frequency: %u MHz\n", freq);
|
TC_PRINT("Timing results: Clock frequency: %u MHz\n", freq);
|
||||||
|
|
||||||
timing_init();
|
|
||||||
|
|
||||||
thread_switch_yield();
|
thread_switch_yield();
|
||||||
|
|
||||||
coop_ctx_switch();
|
coop_ctx_switch();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue