7 years, 6 months ago.

interrupt @ 6hrs

Hello, For my data logger project , I must store temperature values at every 6 hrs. I observe that ticker maximum time is 30 mins. Is there any way we can make interrupt at long duaration like 6hrs or 10hrs??.

Thank you.

2 Answers

7 years, 6 months ago.

Unfortunately timers in mbed are limited to 72 minutes. You can either re-attach the Timeout after that (easiest), or use the hardware timer on your board using the native functions for your target. For example, STM32 RTC (see page 15-17) can be configured for up to 48 days. That'll be non-portable code though and you'll need to dig through the datasheet for the chipset you're using.

7 years, 6 months ago.

Hello Mohan,
If you are looking for scheduling of events using the built-in RTC and interrupts then have a look at the RTC library. In case you wouldn't mind using a Ticker driven clock then the Clock_Hello demo may give you some idea how to do it.
Zoltan