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

asked Mar 10, 2020 at 19:13
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? Commented 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/

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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.