Electronics > Projects, Designs, and Technical Stuff
Using ESP32 and Neo-7N for precise frequency measurement
<< < (5/11) > >>
ogden:

--- Quote from: edigi on September 13, 2018, 03:25:28 pm ---OK, it can be done, not exactly the way as you've described (as internal XCO is not surprisingly also the measurement limit + I'd like to stick to ready made dev board, without extra discrete components, and also there is no easy access to the internal XCO signal in case of most boards as due to WiFi there is shielding) but I can measure in this way the gating precision and correct based on that, all SW again). A bit of flexibility gained probably but via some more complexity (not much by its own, but I have many other things to do as well). I'll decide when the GPS module arrives if it worth for my case the extra effort. I also would not like to loose the possibility of WiFi as it can have also its own advantages (like wireless logging, control etc).

--- End quote ---

Indeed it can be done. At least on 1$ stm32. What I did tell you - was not question :D Also It can be done exactly the way I tell you. I am tired of challenges and don't want money of kids learning electronics, so you better just trust me.

I am afraid that you do not receive what I am saying. - Most likely because englisch is not my native language.

When I say "faster lock times" I actually mean "faster (DDS) frequency acquisition time to required precision". My suggestion does not require any access to XCO. Only additional circuit what's needed - signal wire that routes GPS module output clock to timer input clock pin.

Disclaimer: I am stm32 guy, know nothing about esp32 timers and do not plan to learn them. Also I don't plan to analyze which of my suggestions can be implemented on esp32 or particular devboard you use. Just if it is possible with generic stm32  - I suppose it can be done and I shoot it out.

edigi:

--- Quote from: ogden on September 13, 2018, 05:06:50 pm ---Indeed it can be done. At least on 1$ stm32. What I did tell you - was not question :D Also It can be done exactly the way I tell you. I am tired of challenges and don't want money of kids learning electronics, so you better just trust me.

--- End quote ---

It seems that you're obsessed with the idea that the only good way how it can be done is how you do it (both HW and SW) where in reality many solution variants exists that are roughly similar and can produce exactly the same result.

Let me reflect one thing that I did not want to reflect originally (and use it as an example). I use in my current solution zero number of timing interrupts because it's not needed, yet it can count with arbitrary precision (so precision is determined how long one is willing to wait for the counting. I'm willing to wait currently max 8 digits/magnitude of a second but if I wanted counting could be 15 digits precision also).

The HW does the counting by itself including the HW gating control. If gating signal allows it starts/continues if does not allow it stops/suspends by its own. The gating signal is also HW generated. The SW determines how many interface cycles (ABP clock) the gating should be allowed and the HW plays that. Of course the gating cannot be more precise than the clock source of the controller since it's a divided down version of the controllers clock and that naturally drifts. This was the issue that I was seeking a solution not counting precision (as most people seem to believe).

I'd not even trust any kind of timing interrupt precision here. Back early in my engineering carrier (decades ago) it was common practice to write codes for micro controllers in assembly (or check it in assembly) and count how many clocks cycles instructions use and if it can meet timing requirements.
You had total control both the HW and the SW.

Things have changed a lot since then and like it or not (it's still better to prepare for it) today even micro controller like thingies are multiple core (ESP32 is in fact dual core and this is what is/will be the trend) and have become so fast that caching is unavoidable.

So maybe it's possible to get down interrupt precision to the level of few microseconds but definitely not to nanoseconds because of multi-core and cache misses etc. and gating precision has to be interface clock precision or more that is in case of a 80 MHz interface is in the ballpark of 10 nanoseconds or less (it never hurst to have more precision and 10ns for 8 digits in 1sec measurement sounds a good target to me).

It does not mean that one never needs interrupts related to gating. E.g. if the time difference between measurements is so low (sub millisecond; I'd be too lazy to do it for a generous 100ms) then one needs to assign an interrupt for the gating signals edge that ends the measurement to notify the SW to start as quickly as possible collecting the result and reset counters before the next measurement starts. Here again can be multiple good solutions how the SW part that does the real job is notified (since in ISR one cannot spend too much time).

So all in all, please stop pushing your ideas. Although probably I did not get it totally (like it's visible I still don't see the need for gating timer interrupts) but I've seen enough of it that I can judge that I don't need it. Also I haven't faced any limitation that would force me to switch platform (in the middle of my hobby project for couple of bucks that I don't even need to spend since I have couple of spare controllers lying around , fracture of my budget for this hobby project). If I meet such limitation, I'll switch and I'm quite confident that as I could learn by myself ESP32, quite many various PLL/VCOs or DDS I'll be able to learn enough of any controller that I can use it for my needs.


ogden:

--- Quote from: edigi on September 14, 2018, 09:11:13 am ---
--- Quote from: ogden on September 13, 2018, 05:06:50 pm ---Indeed it can be done. At least on 1$ stm32. What I did tell you - was not question :D Also It can be done exactly the way I tell you. I am tired of challenges and don't want money of kids learning electronics, so you better just trust me.

--- End quote ---

It seems that you're obsessed with the idea that the only good way how it can be done is how you do it (both HW and SW) where in reality many solution variants exists that are roughly similar and can produce exactly the same result.


--- End quote ---

Really? Seems, your problems are far worse than you think mine are. You better stop your attitude and before you even consider to draw discussion into personal insults  - read this book, from cover to cover:

http://leapsecond.com/hpan/an200.pdf

You said "it can be done, not exactly the way as you've described. I corrected you "It can be done exactly the way I tell you". Please show me where I say "this is only good way how it can be done"?

Indeed you can measure frequency and time many ways. And many are "good ways". Read the book and you will see.  :rant:
ogden:

--- Quote from: edigi on September 14, 2018, 09:11:13 am ---So all in all, please stop pushing your ideas.

--- End quote ---

Brilliant. So you think you own this thread and if my input is not important to you - I shall stop writing here?  :-DD

[edit] Actually good idea. I will not waste my time for such an arrogant person. Bye. Have a nice design.
mino-fm:

--- Quote from: edigi on September 14, 2018, 09:11:13 am ---Let me reflect one thing that I did not want to reflect originally (and use it as an example). I use in my current solution zero number of timing interrupts because it's not needed, yet it can count with arbitrary precision (so precision is determined how long one is willing to wait for the counting. I'm willing to wait currently max 8 digits/magnitude of a second but if I wanted counting could be 15 digits precision also).

--- End quote ---

Don't be silly!
To get 8 digits/s your gated counter needs input frequencies >= 100 MHz. Any prescaler will reduce resolution obviously.
A reciprocal counter will give you 8 digits/s @ >= 1 kHz even if you are using your GHz 1000:1 prescaler. A reciprocal counter needs some SW calculation (especially 1/x) but counting and synchronising is done by hardware. Interrupts are NO problem!
I guess you are afraid of interrupts.

Your 15 digits precision looks very nice. Take your >= 100 Mhz signal and wait for 116 days for each result.
Do what you like to do but don't be silly.

Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod