_timer_create_component problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

_timer_create_component problem

Jump to solution
617 Views
ezequielwortman
Contributor I

When I try to compile the code of the Timer  example (on another project) for MQX on a KWIKSTIK, i get the message: "undefined: "timer create component"" any clues?? Also the same message with _timer_start_periodic_at_ticks

This is the main code

void Main_task(uint_32 initial_data)

{

  MQX_TICK_STRUCT ticks;

    MQX_TICK_STRUCT dticks;

    _timer_id       on_timer;

 

    uint_8          time = 6; // time in seconds

  

  

 

  _timer_create_component(TIMER_TASK_PRIORITY, TIMER_STACK_SIZE);

  _time_init_ticks(&dticks, 0);

  _time_add_sec_to_ticks(&dticks, 2);

       _time_get_elapsed_ticks(&ticks);

     

       _time_add_sec_to_ticks(&ticks, 1);

     

       on_timer = _timer_start_periodic_at_ticks(PWM_on, 0, TIMER_ELAPSED_TIME_MODE, &ticks, &dticks);

     

       _time_add_sec_to_ticks(&ticks, 1);

     

     

}

0 Kudos
1 Solution
391 Views
guillaumetiffin
Contributor III

Hello,

I think that it's too late for your problem but it should helps other people.

I'm using k60 with MQX.

When I encoutered this problem, it was because timers wasn't activated.

To do this, go to your user_config.h and add the line:

#define MQX_USE_TIMER 1

then clean and build your bsp and psp project.

Do a clean and build on your project and that should works.

Hope this help.

Regards,

Guillaume Tiffineau

View solution in original post

0 Kudos
2 Replies
392 Views
guillaumetiffin
Contributor III

Hello,

I think that it's too late for your problem but it should helps other people.

I'm using k60 with MQX.

When I encoutered this problem, it was because timers wasn't activated.

To do this, go to your user_config.h and add the line:

#define MQX_USE_TIMER 1

then clean and build your bsp and psp project.

Do a clean and build on your project and that should works.

Hope this help.

Regards,

Guillaume Tiffineau

0 Kudos
391 Views
soledad
NXP Employee
NXP Employee

Hi Guillaume,

Thank you for share with us your comments, I hope this helps to Ezequiel.

Regards

Sol

0 Kudos