Neo hangs on delayMicroseconds

Discussion in 'UDOO NEO' started by Maurice, Apr 22, 2016.

  1. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    Code:
      Serial.println(i);
      digitalWrite(clk, LOW);
      digitalWrite(dio, value & 0x01 ? HIGH : LOW);
      Serial.println("delay");
      delayMicroseconds(3);
      Serial.println("shift");
    
    Never reaches 'shift'.
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Code:
    void setup() {
      Serial.begin(115200);
      delay(100);
      // initialize digital pin 13 as an output.
      pinMode(13, OUTPUT);
    }
    
    // the loop function runs over and over again forever
    void loop() {
      digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
      delay(1000);              // wait for a second
      digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
      Serial.println("A");
      delayMicroseconds(3);              // wait for 3 microseconds
      Serial.println("B");
    {
    This is giving me no issues, but only if I start with delayMicroseconds(3000); and go down to 3. If I then load an empty sketch into the M4 and load the above sketch it fails completely.
     

Share This Page