SparkFun Electronics will be closed in observance of memorial day on Monday, May 29th. We will resume normal business hours on Tuesday, May 30th. Any orders placed after 2pm Mountain Time on Friday, May 26th will process and ship out on Tuesday, May 30th.

Member #332087

Member Since: June 17, 2012

Country: United States

  • I’m using this board just to log accelerometer and gyro data to the serial port, so the test firmware is almost perfect. I’m building and deploying it in the Arduino IDE. All I want to add is a simple timestamp, i.e. to call Arduino’s “millis()” function.

    Sadly, millis() seems to return zero if I stick it in this firmware, which is consistent with interrupts being off. Also, down at the bottom of “main.c”, there’s a nice big comment saying “Interrupts are globally disabled!”. But there’s no call to cli() anywhere that I can find, and calling sei() doesn’t seem to fix it… is there some other way that interrupts get disabled?

    Maybe someone here has mucked with this firmware and knows something I don’t? Maybe there’s something in the hardware going on that I don’t understand that would cause this behavior?

    My metric for determining that millis() is returning zero is printing it out with the other data as a %ul; doing the same for a counter that just increments on each loop prints out just fine.


No public wish lists :(