11 years, 11 months ago.

RTOS Timer

Dear Forum,

I don't know if this problem has a very simple solution but I want to make a RTOS timer globally available. I want to start and stop timers in different threads. When I construct timers outside the main, the mbed gives me a run time error (blue lights of death). My efforts haven't been succesfull so I'm asking for help, any ideas?

1 Answer

10 years, 11 months ago.

//outside the main function

RtosTimer *timer;

//inside main function

timer = new RtosTimer(initialization);

this way you have accesss to the rtos timer

do not forget that to use the timer functions you must call then like this

timer->stop();