1

Is there any way to know the resolution of micros() for the Arduino Portenta H7. I have checked for other boards e.g. Nano which is mentioned as 4 uS. However, I couldn't find one for Portenta H7.

Is there any way to measure or look for that

7
  • Maybe grab the value in a tight loop and compute the shortest difference you find? – PMF Feb 23 at 12:21
  • @PMF: That would only give an upper boundary: the resolution could conceivably be smaller than the time taken by a loop iteration. – Edgar Bonet Feb 23 at 13:50
  • I agree, but it would be a first hint. – PMF Feb 23 at 16:02
  • 1
    A Protenta is completely different from a standard AVR Arduino. It is built with a M7/M4 dual core ARM mcu running on 480/240 MHz. There is also an OS installed on the board (mbed OS). The sketches run on top of this OS. I don't know the actuall status but ~2015 (?) I followed a discussion about using a 'millis()' resolution of 50µs Arduino_mbed core. Unbelievable I know, but the reason was: The OS runs tasks and a timer irq with a call frequency of a MHz would slow down the scheduler and the tasks. – Peter Paul Kiefer Feb 23 at 18:46
  • 1
    So the discussion was seriously about a 50µs resolution that leads to 20kHz Timer IRQs. I'm not sure if this is still the truth. But if they still use a 50µs resolution you could follow the idea of @PMF and see if the difference between two micros() calls is dividable by 50 or 30 or whatever. – Peter Paul Kiefer Feb 23 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.