You are reading a single comment by @George and its replies. Click here to read the full conversation.
  • Unfortunately i don't have one...

    I also found stm32's jshDelayMicroseconds function you were talking about earlier

    void jshDelayMicroseconds(int microsec) {
        int iter = (int)(((long long)microsec * (long long)JSH_DELAY_MULTIPLIER) >> 10);
      //  iter -= JSH_DELAY_OVERHEAD;
      if (iter<0) iter=0;
      while (iter--) __NOP();
    }
    

    I see the logic of this function like this:

    iter = microsec * (how_fast_mc_is / how_fast_it_should_be)
    

    But i don't understand how to make this function work with nanoseconds.

About

Avatar for George @George started