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.
6 years, 11 months ago.
How to improve the performance of a Ticker which is implemented using 16-bit timer?
When running the code below on a NUCLEO-F103RB board I observed occasional pauses in ticks. In addition, the Ticker stopped generating ticks after setting the interval to 100us or less
main.cpp
#include "mbed.h" DigitalOut digitalOut(PA_9); Ticker ticker; void flip(void) { digitalOut = !digitalOut; } int main(void) { ticker.attach_us(callback(&flip), 150); while(1){} }
Solved in mbed rev. 145.
1 Answer
6 years, 11 months ago.
Hi,
Thanks for your code.
Please see this PR on github: https://github.com/ARMmbed/mbed-os/pull/4424