8 years, 11 months ago.

minimum resolution of ticker

hello everybody,

i have a question about ticker period. can i use ticker period below 1 us?

thank you

Question relating to:

1 Answer

8 years, 11 months ago.

Hi Edwar,

The mbed API only officially supports microsecond resolution. Certain platforms may have a higher resolution available, but you would have to write to the appropriate registers yourself. Which platform are you using?

Thanks,

Brian

Accepted Answer

hi brian,

thank you for your reply

I am using mbed LPC1768. which platform does has higher resolution? do you have the reference to write the register manually so i could achieve higher resolution ticker?

Regards,

Edwar

posted by Edwar Baihaqi 18 May 2015

You have to change the counter prescalar manually, though note that it will affect wait(), wait_ms() and wait_us(). The implementation of the ticker interrupt is in us_ticker.c. Btw some platforms use worse than 1us resolution, e.g. nRF51822 which uses a 32kHz ticker instead of 1 MHz.

posted by Tim H 28 May 2015