0

Due to the fake STM32F103C8T6 module in the market, the delayMicroseconds function is working qucker than expected, when I expect a delay of 1000 us , I get a delay of 500 us. Is there a better method, like to create separate module for counting in microseconds using micros timer? Or there are other proper bootloaders than this one . I use Arduino IDE for programming STM32F103C8T6

1
  • Being off by a factor of 2 seems to be way too much. I have no experience with ARM processors, but I've seen such problems with AVR based microcontrollers, when the frequency set by the fuses was different, that what was set in the Arduino IDE. So the microcontroller ran on a different frequency. Are you sure, that you run on the right frequency?
    – chrisl
    Mar 11, 2020 at 19:31

1 Answer 1

-1

Have you considered using a RTC? Something like a DS1307 breakout with I2C communications will provide you with accurate timing. https://www.bobmixon.com/2020/03/real-time-clock-and-arduino/

2
  • 1
    How would you do a 1,000 µs delay with a DS1307? Mar 11, 2020 at 16:08
  • Good point... the OP wrote "µs" and I read "ms". lol
    – Bob
    Mar 12, 2020 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.