get elaped time problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

get elaped time problem

ソリューションへジャンプ
1,256件の閲覧回数
BenG
Contributor III

I'm trying to experiment with _time_get_elapsed_ticks() and _time_get_elapsed().

In the following code the the values in the pointers aren't getting adjusted.

I.e. The value(s) are garbage and are unchanged.

 

I presume I'm doing something wrong or haven't set something correctly in the bsp/psp. But the Reference Manual doesn't state that I need to enable anything specific in the user_config.h file.

 

void nill_task (uint_32 initial_data){  MQX_TICK_STRUCT_PTR tick_time_ptr;  TIME_STRUCT_PTR     ms_time_ptr;    while (1)  {    _time_get_elapsed_ticks(tick_time_ptr);    _time_get_elapsed(ms_time_ptr);    __no_operation();    _time_delay(1023);  }}

 Any suggestions?

0 件の賞賛
返信
1 解決策
830件の閲覧回数
BenG
Contributor III

Worked it out.

 

The code should read.

 

void nill_task (uint_32 initial_data){  MQX_TICK_STRUCT tick_time;  TIME_STRUCT     ms_time;    while (1)  {    _time_get_elapsed_ticks(&tick_time);    _time_get_elapsed(&ms_time);    __no_operation();    _time_delay(1023);  }}

 

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
831件の閲覧回数
BenG
Contributor III

Worked it out.

 

The code should read.

 

void nill_task (uint_32 initial_data){  MQX_TICK_STRUCT tick_time;  TIME_STRUCT     ms_time;    while (1)  {    _time_get_elapsed_ticks(&tick_time);    _time_get_elapsed(&ms_time);    __no_operation();    _time_delay(1023);  }}

 

0 件の賞賛
返信