Skip to content

Inaccurate wait() on LPC1768 #727

@sstelian

Description

@sstelian

I'm using mbed-cli with arm-none-eabi-g++ version 7.1.0 on Fedora 28. I tested the project setup on a LPC1768 and I noticed the blink code blinks about 10 times slower when compiled with mbed-cli than compiled with the web-based mbed compiler. The correct timing is the one in the online compiler, of course. Here is the code :

#include "mbed.h"

DigitalOut dbgLed(LED4);

int main()
{
  dbgLed = 1;
  while(1)
  {
    wait(0.1);
    dbgLed = !dbgLed;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions