10 years, 9 months ago.  This question has been closed. Reason: Question answered all OK

How to disable Ticker but not Timeout?

Hello,

Please is there a way to temporarily disable the Ticker interrupts, whilst still keeping the Timeout running? I'm trying to implement a timeout when attempting to read from a serial port, and I don't want the routines attached to the Tickers to be called whilst this is in progress.

The only way I know how to disable interrupts is using "disable_irq()", but this seems to disable everything. I've had a look a NVIC but at the moment seems way out of my depth!

Thanks in advance, -Iain

2 Answers

10 years, 9 months ago.

Also with NVIC_Disable it won't work, because they are one and the same timer. However what you can do is call ticker.detach();. Then ticker.attach when you want it again.

Accepted Answer
Iain Pearce
poster
10 years, 9 months ago.

Hi Eric, Easy when you know how - many thanks for this! -Iain