Mbed : How to improve program execution(CPU) speed.

26 Apr 2018

Hi

I am working on nRF51-DK platform with online Mbed compiler & executing following code snippet. Crystal : 16 MHz external.

I obtained high duration of 800 ns. Can we make lesser than that if yes then what should I do on Mbed compiler settings or in the code ??

#include "mbed.h"

DigitalOut led1(LED1);        

int main(void) {

  while(1)  {
         led1=1;
        led1=0;
   }
}