you mentioned some correction on the cycle count according to the PPS, how exactly do you do this? I see you mention an IntervalTimer, are you using this timer to increment the 1us counter? Mine also...
Type: Posts; User: mnissov
you mentioned some correction on the cycle count according to the PPS, how exactly do you do this? I see you mention an IntervalTimer, are you using this timer to increment the 1us counter? Mine also...
Update: think I've discovered the problem: interference.
I'm not sure if all instances were cause by this, but I know this can at least be a very potential cause. While gathering some data, I...
UPDATE with oscilloscope. Note connections are suboptimal so additional ringing may be there.
As before, logic analyzer row 1 is 200 hz, row 2 is alarm, and row 3 is row 1 analog measured. I'm...
Update, got a hold of an oscilloscope, been trying to capture this but it's difficult keeping a sufficiently large window but also sufficient resolution. So that's a work in progress.
Otherwise:...
I wrote their support team a mail yesterday so I'll hopefully be in touch with them after the weekend.
That being said I feel relatively confident this isn't aliasing in the measurement, because...
And actually ringing in general isn't a huge problem for my rising edges. I can take another picture on monday but the analog mode captures a bit of overshoot (0.2V perhaps) and that's about it....
my logic analyzer has an analog mode which caps at 50MS/s, I'll give that a try as well, but this drastically reduces the recording time.
One additional point, I feel at some point there may...
Thanks, I really appreciate the help.
The peaks for me if I measure at full speed (500MHz) will come as 5 or 6 peaks with max 8ns width, something in this range. The signal itself is relatively...
It happens not so often, but it's quite repetitively a burst of rising edges between two normally spaces rising edges, as in https://forum.pjrc.com/attachment.php?attachmentid=30414&d=1676654125.
...
Okay I see, thanks for the explanation. I'll try again and see what happens.
Note I attached a sensor to the output and it demonstrated weird behavior in the same region as one of these pulses....
I set pin 1 to LOW with digitalWriteFast(_pin_gnd_, LOW);. Is this not sufficient as a ground source?
Maybe not in the case of signal quality?
Edit: Same thing happens regardless of whether I'm...
Not entirely sure I understand, what do you mean by real ground? Isn't digital out low connected to the USB cable ground?
How different is my physical setup from yours?
30417
I figure this has very limited possibility for interference as I've tried to route cables separately from one another, but at this point I...
I haven't tried grounded the unused inputs, they're just hanging. I'll give that a try though.
Will be disappointing otherwise, I think this one is supposed to be relatively "fancy". Whatever that...
@luni so perhaps it's my logic analyzer? I've tried with 2 separate teensy's so it shouldn't be a busted MCU.
Which logic analyzer are you using?
I set my logic analyzer to 25 MS/s (I couldn't choose 24MS/s) and got this
30414
If I zoom in it's 40ns this time, but still happening
30415
Note this happened after recording for approximately...
Debugging this has been troubling me a great deal now at this point. I've written a very basic script which polls in `loop()` to create a 200Hz square wave with 10us high time.
My logic analyzer...
To be honest, not sure if it's actually fixed, I'm still seeing some occasional rippling on the digital output from the teensy. I'm not 100% convinced it's the logic analyzer, this ripple is...
sending rtc.enablePeriodicUpdateInterrupt(true, false); causes the rtc to make a 1hz interrupt on the INT pin.
Not sure why yours does this, weak signal so suffering from long cables perhaps? I...
My additions to the mentioned sketch were essentially
RV3028 rtc;
bool connectToRTC()
{
// RTC power and ground
pinMode(17, OUTPUT);
pinMode(21, OUTPUT);
digitalWriteFast(17,...
@defragster I just tried your script from #23 and I'm not seeing the same bounce, at least for this short time period:
Waiting for PPS toggle ...
us 2389086 cyc diff 1537 err= 2.56 us...
At least I think that's the case, hard to say whether the logic analyzer is wrong when I base my "correct-ness" on the logic analyzer output :)
I'm not sure before/after would show much, my cable...
Is it expected that there's enough overhead on either side such that 8.5 us becomes >5ms? That seems like a drastic step.
I think this was the misunderstanding, what you quote is some silly python script I found to "estimate" the latency.
The code to demonstrate what I'm trying to troubleshoot is the first code...
I'm not flushing on the PC side, except for immediately after making the connection.
I can try flushing on the teensy side, but from what I read on https://www.pjrc.com/teensy/td_serial.html it...
The python script is a one-time dummy thing I had on me at the moment. The actual PC interface is in C++ and looks more like this code snippet from the original post
while(True){
if...
So I've done everything possible on the teensy side of things. I know it's not a general PC forum but what about on the computer side? Are there settings for usb interfaces which can be tweaked? I...
When you say
do you mean the latency suffered when using an OutputFlush() on a non FTDI device, or that latency in general suffered with non FTDI devices?
Please correct me if I'm wrong, but...
I am working on a sensor triggering project with a teensy and am nearing the end, but have stumbled upon some very haphazard latency in the serial communication to the computer. The code is...
regarding the original thread, after some inspection of both analog and digital channels in my logic analyzer, it seems likely that this was noise in the digital measurements. Very anticlimactic
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...
@luni, okay yes I see. Thanks for walking me through the troubleshooting.
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 &&...
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...
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...
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.
...
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...
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...
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...
What's going on in line 463 of your csv? Formatting of the time[s] becomes a bit interesting. Otherwise mine uses more or less the same format, so the python script should be usable.
...
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...
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...
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...
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...
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...
Here are some figures I made illustrating all sampling times > 1 std deviation from the mean
302623026330264
Note these are all grouped, and many of them happen when all three triggers fire on...
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...
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...
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
...
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...