Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 3 months ago.
Disabling Ticker
I'm writing a program that requires interrupts to be disabled while some variables are being updated. I'm aware of _disable_irq() and Ticker.detach() and have used them in previous projects. My problem with this one is that I need very tight timing and I feel like disabling the entire interrupt system (which I think _disable_irq()) does or detaching/attaching the function will take too long.
I wrote this program for an LPCXpresso LPC1769 and there was an easy way of turning off the timer, basically stopping the counter register from updating. Is there a similar thing I can do for the LPC1768 MBED? Or will it just be easier to use the functions mentioned above?
1 Answer
11 years, 3 months ago.
Hello Ankit Patel,
if I understood correctly, you want to disable only interrupts from timer ?
Is this a function you are looking for: us_ticker_disable_interrupt() ? It's disables match interrupt (sets MCR to 0). But it's inside HAL and not available for invoking from an application. Write your own routine.
Regards, 0xc0170
That's precisely what I was looking for. How would I write that routine? Is it just accessing the configuration registers?
posted by 08 Aug 2013