The official mbed C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Issue: Once detached, tickers can not be attached again

Once you have called ticker.detach() subsequent calls to ticker.attach() will not enable the ticker.

Platform: Nordic nRF51822

-Problem occurs with mbed library revision 89

-Problem does not occur with mbed library revision 88

sample code:

#include "mbed.h"

Serial serial(USBTX, USBRX);
Ticker ticker;

int toggle_flag = 1;

void measure() {

void serial_in() {
    printf("%c\n", serial.getc()); 
    printf("toggle flag= %d\n", toggle_flag); 
    if (toggle_flag == 1) { 
        ticker.attach(&measure, 0.066666);
        toggle_flag = 0;
    } else {
        toggle_flag = 1;

int main() {  
    while (1) {


09 Oct 2014


Is this related to this issue which was reported recently: ?

10 Oct 2014


No printf, malloc, or new in ISR

In ISR you should avoid any call to bulky library functions. In particular, certain library functions (like printf, malloc and new) are non re-entrant and their behaviour could be corrupted when called from an ISR.

13 Oct 2014

Dmitry +1 for pointing it out, I did not check their ISR handler previously :-)

@Skot, if the issue is not related to the one I shared, please can you create a new issue on github mbed SDK repo? Thanks