6 years, 10 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?

Comment on this question

1 Answer

5 years, 10 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();


You need to log in to post a question