The (release) code below produces 11usec pulses with a 45usec period. This implies that a simple floating point operation take 11usec. This is incredibly slow for a Cortex F4 with 168MHz clock. Am I expecting too much from the CLR operation?
Thanks,
Amos Szpiro
public static void Main() { double f1, f2; var ledPort = new OutputPort(Pins.ONBOARD_LED, false); var tmPort = new OutputPort(Pins.GPIO_PIN_A0, false); while (true) { f1 = 1.25; tmPort.Write(true); f2 = 1.21 * f1; tmPort.Write(false); ledPort.Write(true); // turn on LED //Thread.Sleep(500); // wait 500 ms ledPort.Write(false); // turn off LED //Thread.Sleep(500); // wait 500 ms } }