Skip to content

Instable ticker on stm32f0308-DISCO #1701

Closed
@joost-g

Description

@joost-g

Hi,

I ran into an issue using mbed's ticker on the stm32f0308-DISCO platform.
As can be seen from the scope images, the ticker callback is not called for a period, after which it is called multiple times. Issue occurs approximately twice every second.

Minimal working example to reproduce:

#include "mbed.h"

Ticker msTicker;
DigitalOut dev_led4(PC_8);

static void ticker_callback(){
    dev_led4=1;
    volatile int i;
    for(i=0; i<2500;i++);
    dev_led4=0;
}

int main(void){
    dev_led4 = 0;

    msTicker.attach(&ticker_callback, 0.01);
    while(1);
}

Normal/expected behavior
tek0002
Non-uniform ticker callback
tek0003
tek0000

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions