micros overflows after 71 minutes right? Or am I remembering incorrectly.
I had a couple questions to this, I know there's the systick interrupt which goes at 1 ms. So I figure millis uses this in part for...
Yeah you're right I didn't see it
This shouldn't make a difference here though right? The problem is the first iteration is too long, which means the if statement if (g_is_high && (g_falling_edge_timer >= g_width))...
Cheaper than GPT? Probably no right? Because GPT uses hardware right?
Anyway, the main question was more about understanding than fixing, I couldn't really find a reason for this to be happening so consistently,...
I'm using this teensy for a larger project, but one problem I noticed is that when I use elapsedMicro to create square pulses, the very first one is always longer. Can't really figure out why, this is for simple...
From what I've read the teensy's inbuilt RTC crystal is rated worse (20ppm I think), though I've read of people demonstrating as low as 8ppm performance, think that was a post from you actually.
Ok cool sounds,...
micros_from_second is only accessed in the callback and the ISR, but actually it's not so important because the described behavior happens when I comment it out as well, still working on the up-to-date minimal example...
i think you misunderstand me, it's less for never-ending optimization and more for learning good practices, particularly regarding ARM_DWT_CYCCNT. I feel I've seen this mentioned but without a rationale for when it...
I have a need for timing things in general, sometime particularly short durations. To this extent I have a couple of questions on best practices in this context
Suppose that I have something like the following
...
What's going on in line 463 of your csv? Formatting of the time becomes a bit interesting. Otherwise mine uses more or less the same format, so the python script should be usable.
0.997303625000000,;0;0;0...
Fair enough, I'm lucky enough mine can take measurement over a range, so it calculates all of these metrics for me. I have a python script for the same, but I'm not sure how much use it will be if our data isn't of the...
I thought I posted a response to KurtE but I see it didn't go through.
The response was that I had tried commenting out the Serial.write line and that the error was still happening after approx 100s of capturing....
My reading side is typically a c++ program which, should, read everything as it comes. At least it looks that way. But when i was capturing the data which I used for the plots above and to check the minimal test case...
Sorry for spamming this thread. I've managed to create a test case which fails the same way, first run was successful, second run resulted in 200Hz f_max over 1kHz and the 10Hz signal having a std deviation of >1ms
...
It's one of three periodic callbacks (each associated with an intervaltimer) which has these delays. It happens in larger degree to the low frequency ones, but all three suffer (almost simultaneously) as you can see...
Here are some figures I made illustrating all sampling times > 1 std deviation from the mean
Note these are all grouped, and many of them happen when all three triggers fire on the same timestamp (as observed by...
I'll try and get back to you with a simple example, as I said it's not necessarily extremely regular.
For example, for the 10Hz timer I processed the data in python and the following is the first 10 entries of...
Following
https://forum.pjrc.com/threads/71506-Time-synchronization-and-triggering-sensors
https://forum.pjrc.com/threads/71671-Augmenting-Teensy-millis-timing-with-external-RTC
I am working on a sensor timing...
Great, thanks! And yes of course, I think my current intention would be something along the lines of
set(){
// initialize second_counter to RTC unixtime, i.e. seconds since 1 Jan 1970
// ensures timestamp...
I do use teensy timer tool and the inbuilt IntervalTimers for generating the signals themselves. But for timestamping 20ppm is beyond what we want for accuracy (as I highlight in 16).
Just to be clear, I don't...
As farr as I know the internal RTC only allows interrupts at a single frequency and we need at least 2, so figured interval timers would be more straightforward. Also assumed using interrupts would be "cleaner" than...
I've seen a number of libs on github for this RTC. Not to be mean, but of varying quality. Which one is RV-3028-C7.h referring to? I've seen a couple with this name on github.
With regards to this, I believe you're right. Note I won't have access to a GPS, but the duration that the RTC time needs to remain accurate is likely less than a week, so I believe you're right that 32 bits each of...
As a combination of some of the aforementioned ideas, perhaps I can rely on `micros` locally, and align to the second signal from the RTC. Instead of doing it through I2C I can get a 1Hz interrupt pulse from the INT...
This will still be based on whatever timing mechanism there exists in the teensy 4.1, with no way of utilizing the external RTC. So I'm not sure this really fits the purpose.
I'm using a teensy 4.1 for synchronizing and time-stamping of sensors, as such consistency of the timestamping is important.
I bought an RV3028 RTC (1ppm,...