• any raspberry pi people here?

    From John Larkin@21:1/5 to All on Mon Jul 18 12:13:05 2022
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dimiter_Popoff@21:1/5 to John Larkin on Mon Jul 18 22:23:21 2022
    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?
    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to John Larkin on Mon Jul 18 13:24:32 2022
    On 7/18/22 1:13 PM, John Larkin wrote:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do.

    My understanding is that the /Raspberry/ Pi(s) don't have hardware for
    keeping time when the CPU isn't running.

    Some of the other Pi(s) and the likes do have timer hardware.

    The Raspberry Pi is like Ethernet, in that it's the most inexpensive
    thing that gets done what 80% of the users need. If you're in the other
    20%, you want something else, be it a hat or different board.



    --
    Grant. . . .
    unix || die

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Mon Jul 18 12:36:41 2022
    mandag den 18. juli 2022 kl. 21.13.15 UTC+2 skrev John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you could do 1us timing in linux

    maybe look at this: https://beagleboard.org/black
    it uses an SoC that has two extra risc cpus with access to everything on the chip
    for realtime tasks

    chapter 4
    https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf


    Do pi's have crystal oscillators? I guess we could add one too.

    a PI has everything it needs, just add power (and an SC card*)

    *or get a CM4 compute module with eMMC

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Larkin@21:1/5 to All on Mon Jul 18 13:55:37 2022
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Some torque sensors make tricky timing waveforms.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don@21:1/5 to Lasse Langwadt Christensen on Mon Jul 18 20:18:19 2022
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you could do 1us timing in linux

    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns resolution for my iic interface.

    Danke,

    --
    Don, KB7RPU, https://www.qsl.net/kb7rpu
    There was a young lady named Bright Whose speed was far faster than light;
    She set out one day In a relative way And returned on the previous night.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Mon Jul 18 13:29:58 2022
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns resolution for my iic interface.

    sure as long as your code is running and not interrupted you can busy wait with nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Larkin@21:1/5 to langwadt@fonz.dk on Mon Jul 18 13:45:57 2022
    On Mon, 18 Jul 2022 12:36:41 -0700 (PDT), Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:

    mandag den 18. juli 2022 kl. 21.13.15 UTC+2 skrev John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    May as well go with 4B.


    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you >could do 1us timing in linux


    Of course I need hardware to do microsecond timings. The c programs
    would pick up the numbers from the hardware.


    maybe look at this: https://beagleboard.org/black
    it uses an SoC that has two extra risc cpus with access to everything on the chip
    for realtime tasks

    chapter 4
    https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf


    Do pi's have crystal oscillators? I guess we could add one too.

    a PI has everything it needs, just add power (and an SC card*)

    4B seems to have a 19.2 MHz crystal, but it doesn't look like it
    accessable to an external gadget, like an FPGA. I can add a VCXO.



    *or get a CM4 compute module with eMMC

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dimiter_Popoff@21:1/5 to John Larkin on Tue Jul 19 00:04:14 2022
    On 7/18/2022 23:55, John Larkin wrote:
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi >
    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.

    Oh I know it is fairly complex and it is widely used in consumer
    stuff, people watch videos on it etc.
    I just don't see that sort of thing in the kind of products you
    seem to be doing. But then if it is the easiest way to do things
    and you find it stable enough why not.



    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Some torque sensors make tricky timing waveforms.


    I was talking of something like the PPC timebase register, it is
    a free running 64 bit counter. If they have something like that
    you could timestamp events using some IRQ, the jitter you would
    get would depend mostly on the IRQ latency then.
    But I am really no ARM person.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Walliker@21:1/5 to lang...@fonz.dk on Mon Jul 18 14:05:27 2022
    On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns resolution for my iic interface.
    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....

    The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one
    at the moment. The CM4 has a PCI-e interface which gives lots of possibilities.
    The Beaglebone Black is also good, but it has less RAM than
    the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s.
    The extra processors do allow time critical software to be written though.

    There are add-on modules with real time clock chips for the Pi and the BBB.

    Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it
    uses. Both of these have the big advantage that they can be bought in large quantities
    at the moment. The RP2040 has multiple programmable state machines which allow very complex i/o operations with precise timing. There are also multiple counter-timer modules. It is a two-core ARM M0+.
    Finally, don't forget the XMOS devices, many of which support USB and/or ethernet
    together with deterministic timing and multiple cores.
    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don@21:1/5 to Lasse Langwadt Christensen on Mon Jul 18 20:58:35 2022
    Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns
    resolution for my iic interface.

    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....

    BSD nanosleep() suspends execution of the calling thread.

    Danke,

    --
    Don, KB7RPU, https://www.qsl.net/kb7rpu
    There was a young lady named Bright Whose speed was far faster than light;
    She set out one day In a relative way And returned on the previous night.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Mon Jul 18 14:18:07 2022
    mandag den 18. juli 2022 kl. 22.58.41 UTC+2 skrev Don:
    Lasse Langwadt Christensen <lang...@fonz.dk> wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us >> >> sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns >> resolution for my iic interface.

    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....
    BSD nanosleep() suspends execution of the calling thread.

    for _atleast_ the time you requested, have you tried looking at the actual signals you get?

    anyway, that doesn't help for reacting and timing external signals

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Larkin@21:1/5 to All on Mon Jul 18 14:37:47 2022
    On Tue, 19 Jul 2022 00:04:14 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 23:55, John Larkin wrote:
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi >
    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.

    Oh I know it is fairly complex and it is widely used in consumer
    stuff, people watch videos on it etc.
    I just don't see that sort of thing in the kind of products you
    seem to be doing. But then if it is the easiest way to do things
    and you find it stable enough why not.

    It seems to be pretty serious, from Broadcom, and it's hard to get
    ARMs and ZYNQs these days. It's even hard to get opamps.




    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Some torque sensors make tricky timing waveforms.


    I was talking of something like the PPC timebase register, it is
    a free running 64 bit counter. If they have something like that
    you could timestamp events using some IRQ, the jitter you would
    get would depend mostly on the IRQ latency then.
    But I am really no ARM person.

    We could have a free-running 32-bit counter at some MHz. Every rise or
    fall on any of the three inputs, we'd latch the counter and poke it
    into the FIFO with an ID tag. Then let the c code figure it all out.

    Imagine a shaft with a bunch of gear teeth on each end, each with a
    magnetic pickup. Spin it and both pickups make about the same pulse
    train. But torque twists the shaft and the pickup phases change. We
    can get RPM and torque from the two signals. The F35 fan is driven
    with a shaft at something crazy like 30K horsepower, and it twists a
    lot.

    Sometimes there is one missing tooth, as a rotation index. Or more
    complex stuff. The signal conditioning gets interesting.

    True sadism would be to just digitize the sensor waveforms.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Mon Jul 18 14:39:50 2022
    mandag den 18. juli 2022 kl. 23.04.21 UTC+2 skrev Dimiter Popoff:
    On 7/18/2022 23:55, John Larkin wrote:
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <d...@tgi-sci.com> wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi >
    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.
    Oh I know it is fairly complex and it is widely used in consumer
    stuff, people watch videos on it etc.
    I just don't see that sort of thing in the kind of products you
    seem to be doing. But then if it is the easiest way to do things
    and you find it stable enough why not.

    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Some torque sensors make tricky timing waveforms.

    I was talking of something like the PPC timebase register, it is
    a free running 64 bit counter. If they have something like that
    you could timestamp events using some IRQ, the jitter you would
    get would depend mostly on the IRQ latency then.
    But I am really no ARM person.

    afaik it has a 64 bit system timer that always runs at 1MHz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don@21:1/5 to Lasse Langwadt Christensen on Mon Jul 18 21:30:40 2022
    Lasse Langwadt Christensen wrote:
    skrev Don:
    Lasse Langwadt Christensen wrote:
    skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like >> >> >> ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us >> >> >> sort of domain, several channels. I guess we could hang a small FPGA >> >> >> off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns >> >> resolution for my iic interface.

    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....
    BSD nanosleep() suspends execution of the calling thread.

    for _atleast_ the time you requested, have you tried looking at the actual signals you get?

    anyway, that doesn't help for reacting and timing external signals

    Did you overlooked the iic part of my original followup up there? ^^^
    My RPi Apps use nanosleep to react to and time external Inter-Integrated Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    Danke,

    --
    Don, KB7RPU, https://www.qsl.net/kb7rpu
    There was a young lady named Bright Whose speed was far faster than light;
    She set out one day In a relative way And returned on the previous night.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Mon Jul 18 14:47:52 2022
    mandag den 18. juli 2022 kl. 23.30.47 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    skrev Don:
    Lasse Langwadt Christensen wrote:
    skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like >> >> >> ARMs usually do. I've seen vague references to using the GPU to do >> >> >> timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA >> >> >> off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns
    resolution for my iic interface.

    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it .... >> BSD nanosleep() suspends execution of the calling thread.

    for _atleast_ the time you requested, have you tried looking at the actual signals you get?

    anyway, that doesn't help for reacting and timing external signals
    Did you overlooked the iic part of my original followup up there? ^^^
    My RPi Apps use nanosleep to react to and time external Inter-Integrated Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    you are generating signals, not reacting and measuring. That easy you just burn cycles while waiting
    and iic will work just fine with milli second timing ...

    How is nanosleep going to help if you want to time when and for how long and external signal it asserted?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Mon Jul 18 15:13:38 2022
    mandag den 18. juli 2022 kl. 23.37.57 UTC+2 skrev John Larkin:
    On Tue, 19 Jul 2022 00:04:14 +0300, Dimiter_Popoff <d...@tgi-sci.com>
    wrote:

    On 7/18/2022 23:55, John Larkin wrote:
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <d...@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like >>>> ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>> sort of domain, several channels. I guess we could hang a small FPGA >>>> off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi >
    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.

    Oh I know it is fairly complex and it is widely used in consumer
    stuff, people watch videos on it etc.
    I just don't see that sort of thing in the kind of products you
    seem to be doing. But then if it is the easiest way to do things
    and you find it stable enough why not.
    It seems to be pretty serious, from Broadcom, and it's hard to get
    ARMs and ZYNQs these days. It's even hard to get opamps.



    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Some torque sensors make tricky timing waveforms.


    I was talking of something like the PPC timebase register, it is
    a free running 64 bit counter. If they have something like that
    you could timestamp events using some IRQ, the jitter you would
    get would depend mostly on the IRQ latency then.
    But I am really no ARM person.
    We could have a free-running 32-bit counter at some MHz. Every rise or
    fall on any of the three inputs, we'd latch the counter and poke it
    into the FIFO with an ID tag. Then let the c code figure it all out.

    Imagine a shaft with a bunch of gear teeth on each end, each with a
    magnetic pickup. Spin it and both pickups make about the same pulse
    train. But torque twists the shaft and the pickup phases change. We
    can get RPM and torque from the two signals. The F35 fan is driven
    with a shaft at something crazy like 30K horsepower, and it twists a
    lot.

    you'll need an FPGA or at least an mcu with a capture timer

    how about an RP2040 ? with two 133MHz M0+ and fancy HW statemachines
    it has plenty of horsepower to do it spit out result on spi/uart or what ever

    Sometimes there is one missing tooth, as a rotation index. Or more
    complex stuff. The signal conditioning gets interesting.

    in all cars that how the ECU figure out the engine position

    one everything Bosch like your Audi it is 60 minus 2 teeth

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phil Hobbs@21:1/5 to Don on Mon Jul 18 18:54:04 2022
    Don wrote:
    Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like >>>>> ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>> sort of domain, several channels. I guess we could hang a small FPGA >>>>> off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns >>> resolution for my iic interface.

    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....

    BSD nanosleep() suspends execution of the calling thread.

    Danke,


    At the resolution of the thread scheduler.

    Cheers

    Phil Hobbs

    --
    Dr Philip C D Hobbs
    Principal Consultant
    ElectroOptical Innovations LLC / Hobbs ElectroOptics
    Optics, Electro-optics, Photonics, Analog Electronics
    Briarcliff Manor NY 10510

    http://electrooptical.net
    http://hobbs-eo.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dimiter_Popoff@21:1/5 to John Larkin on Tue Jul 19 02:26:33 2022
    On 7/19/2022 0:37, John Larkin wrote:
    On Tue, 19 Jul 2022 00:04:14 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 23:55, John Larkin wrote:
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like >>>>> ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>> sort of domain, several channels. I guess we could hang a small FPGA >>>>> off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi >
    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.

    Oh I know it is fairly complex and it is widely used in consumer
    stuff, people watch videos on it etc.
    I just don't see that sort of thing in the kind of products you
    seem to be doing. But then if it is the easiest way to do things
    and you find it stable enough why not.

    It seems to be pretty serious, from Broadcom, and it's hard to get
    ARMs and ZYNQs these days. It's even hard to get opamps.




    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Some torque sensors make tricky timing waveforms.


    I was talking of something like the PPC timebase register, it is
    a free running 64 bit counter. If they have something like that
    you could timestamp events using some IRQ, the jitter you would
    get would depend mostly on the IRQ latency then.
    But I am really no ARM person.

    We could have a free-running 32-bit counter at some MHz. Every rise or
    fall on any of the three inputs, we'd latch the counter and poke it
    into the FIFO with an ID tag. Then let the c code figure it all out.

    Imagine a shaft with a bunch of gear teeth on each end, each with a
    magnetic pickup. Spin it and both pickups make about the same pulse
    train. But torque twists the shaft and the pickup phases change. We
    can get RPM and torque from the two signals. The F35 fan is driven
    with a shaft at something crazy like 30K horsepower, and it twists a
    lot.

    Sometimes there is one missing tooth, as a rotation index. Or more
    complex stuff. The signal conditioning gets interesting.

    True sadism would be to just digitize the sensor waveforms.



    Sounds like you are making some testing setup for someone
    (surely you won't put a Rpi on a real F35?!), so if it works for you
    why not. Just make sure the counter you put is wide enough, that's
    easy to underestimate... [Side story: on a 64 bit power architecture
    processor there is that standard 64 bit free running timebase,
    same like on 32 bit cores, where in order to read it you read the
    upper longword, then the lower, then the upper again and compare
    the two uppers you got; if not matching, do it again. Now on
    a 64 bit machine you would expect a simple read into a 64 bit
    general purpose register to be the normal way - which was the
    idea, only the errata sheet says "don't do it, do it the old
    way" :-) ].

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don Y@21:1/5 to All on Mon Jul 18 16:47:48 2022
    On 7/18/2022 4:26 PM, Dimiter_Popoff wrote:
    [Side story: on a 64 bit power architecture
    processor there is that standard 64 bit free running timebase,
    same like on 32 bit cores, where in order to read it you read the
    upper longword, then the lower, then the upper again and compare
    the two uppers you got; if not matching, do it again. Now on
    a 64 bit machine you would expect a simple read into a 64 bit
    general purpose register to be the normal way - which was the
    idea, only the errata sheet says "don't do it, do it the old
    way" :-) ].

    If you are doing this under the protections of a critical region,
    you can read high, read low, read high. If high1 agrees with
    high2, then the result is (high,low).

    If, OTOH, high1 and high2 differ, the difference will be limited to
    a single "increment" (assuming CPU clock is comparable to timer
    clock). You can then choose to represent the reported time as
    "high1 with low just before increment" or "high2, low just after
    increment". No need to go back and try again...

    [you can't reliably do low,high,low in a single pass]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Mon Jul 18 18:08:38 2022
    tirsdag den 19. juli 2022 kl. 03.01.14 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    skrev Don:
    <snip>
    Did you overlooked the iic part of my original followup up there? ^^^
    My RPi Apps use nanosleep to react to and time external Inter-Integrated >> Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    you are generating signals, not reacting and measuring. That easy you just burn cycles while waiting
    and iic will work just fine with milli second timing ...

    How is nanosleep going to help if you want to time when and for how long and
    You need to generate and interpret signals with nano second timing to
    use i2c. Here's a power-on code snippet from my App:

    /* Initialize when power supply conditions are not met: */
    nSleep (15000000L); /* Wait 15 ms, 15000000 ns */
    iicWrite(0x00); /* RS=Instruction; RW=Write; */
    nSleep (40L); /* Wait 40 ns */
    iicWrite(0x34); /* E; DB5=Function Set; DB4=8-bit */
    nSleep (230L); /* Wait 230 ns */

    it doesn't time the input from an external event...

    and if you changed 40ns to 10ms I suspect it wouldn't change a thing

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don Y@21:1/5 to Don on Mon Jul 18 18:11:40 2022
    On 7/18/2022 6:01 PM, Don wrote:
    Lasse Langwadt Christensen wrote:
    skrev Don:

    <snip>

    Did you overlooked the iic part of my original followup up there? ^^^
    My RPi Apps use nanosleep to react to and time external Inter-Integrated >>> Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    you are generating signals, not reacting and measuring. That easy you just burn cycles while waiting
    and iic will work just fine with milli second timing ...

    How is nanosleep going to help if you want to time when and for how long and

    You need to generate and interpret signals with nano second timing to
    use i2c. Here's a power-on code snippet from my App:

    /* Initialize when power supply conditions are not met: */
    nSleep (15000000L); /* Wait 15 ms, 15000000 ns */
    iicWrite(0x00); /* RS=Instruction; RW=Write; */
    nSleep (40L); /* Wait 40 ns */
    iicWrite(0x34); /* E; DB5=Function Set; DB4=8-bit */
    nSleep (230L); /* Wait 230 ns */

    I'm not sure you can rely on that giving you "nanosecond resolution".
    I can specify delays in nanoseconds, but the "clock" that is *bound*
    to the timer of my choosing determines the ACTUAL resolution;
    nanosecond() just ensures AT LEAST the specified amount of time
    (expressed in units of nanoseconds) has elapsed before the ftn
    returns.

    (I.e., if the underlying clock runs at 10Hz, then you'll just have a delay
    that is a multiple of 100ms)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don@21:1/5 to Lasse Langwadt Christensen on Tue Jul 19 01:01:08 2022
    Lasse Langwadt Christensen wrote:
    skrev Don:

    <snip>

    Did you overlooked the iic part of my original followup up there? ^^^
    My RPi Apps use nanosleep to react to and time external Inter-Integrated
    Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    you are generating signals, not reacting and measuring. That easy you just burn cycles while waiting
    and iic will work just fine with milli second timing ...

    How is nanosleep going to help if you want to time when and for how long and

    You need to generate and interpret signals with nano second timing to
    use i2c. Here's a power-on code snippet from my App:

    /* Initialize when power supply conditions are not met: */
    nSleep (15000000L); /* Wait 15 ms, 15000000 ns */
    iicWrite(0x00); /* RS=Instruction; RW=Write; */
    nSleep (40L); /* Wait 40 ns */
    iicWrite(0x34); /* E; DB5=Function Set; DB4=8-bit */
    nSleep (230L); /* Wait 230 ns */

    Danke,

    --
    Don, KB7RPU, https://www.qsl.net/kb7rpu
    There was a young lady named Bright Whose speed was far faster than light;
    She set out one day In a relative way And returned on the previous night.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don@21:1/5 to Lasse Langwadt Christensen on Tue Jul 19 01:24:18 2022
    Lasse Langwadt Christensen wrote:
    skrev Don:
    Lasse Langwadt Christensen wrote:
    skrev Don:

    <snip>

    Did you overlooked the iic part of my original followup up there? ^^^
    My RPi Apps use nanosleep to react to and time external Inter-Integrated >> >> Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    you are generating signals, not reacting and measuring. That easy you just burn cycles while waiting
    and iic will work just fine with milli second timing ...

    How is nanosleep going to help if you want to time when and for how long and
    You need to generate and interpret signals with nano second timing to
    use i2c. Here's a power-on code snippet from my App:

    /* Initialize when power supply conditions are not met: */
    nSleep (15000000L); /* Wait 15 ms, 15000000 ns */
    iicWrite(0x00); /* RS=Instruction; RW=Write; */
    nSleep (40L); /* Wait 40 ns */
    iicWrite(0x34); /* E; DB5=Function Set; DB4=8-bit */
    nSleep (230L); /* Wait 230 ns */

    it doesn't time the input from an external event...

    and if you changed 40ns to 10ms I suspect it wouldn't change a thing

    The timing diagram says something different...

    Danke,

    --
    Don, KB7RPU, https://www.qsl.net/kb7rpu
    There was a young lady named Bright Whose speed was far faster than light;
    She set out one day In a relative way And returned on the previous night.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bitrex@21:1/5 to John Larkin on Mon Jul 18 21:37:32 2022
    On 7/18/2022 4:45 PM, John Larkin wrote:
    On Mon, 18 Jul 2022 12:36:41 -0700 (PDT), Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:

    mandag den 18. juli 2022 kl. 21.13.15 UTC+2 skrev John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    May as well go with 4B.


    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you >> could do 1us timing in linux


    Of course I need hardware to do microsecond timings. The c programs
    would pick up the numbers from the hardware.


    maybe look at this: https://beagleboard.org/black
    it uses an SoC that has two extra risc cpus with access to everything on the chip
    for realtime tasks

    chapter 4
    https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf


    Do pi's have crystal oscillators? I guess we could add one too.

    a PI has everything it needs, just add power (and an SC card*)

    4B seems to have a 19.2 MHz crystal, but it doesn't look like it
    accessable to an external gadget, like an FPGA. I can add a VCXO.

    The ARM chip almost surely has a high-resolution timer onboard, the
    stock Linux kernel in e.g. mainstream distros like Ubuntu isn't
    configured for hard realtime operation but Linux can be:

    <https://bristot.me/demystifying-the-real-time-linux-latency/>

    <https://rt.wiki.kernel.org/index.php/Frequently_Asked_Questions#What_is_real-time.3F>

    "Average latencies of a few uS are possible on single-CPU systems"

    If you need to measure sub uS accurately Linux is probably the wrong tool.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bitrex@21:1/5 to bitrex on Mon Jul 18 21:39:31 2022
    On 7/18/2022 9:37 PM, bitrex wrote:
    On 7/18/2022 4:45 PM, John Larkin wrote:
    On Mon, 18 Jul 2022 12:36:41 -0700 (PDT), Lasse Langwadt Christensen
    <langwadt@fonz.dk> wrote:

    mandag den 18. juli 2022 kl. 21.13.15 UTC+2 skrev John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    May as well go with 4B.


    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see
    how you
    could do 1us timing in linux


    Of course I need hardware to do microsecond timings. The c programs
    would pick up the numbers from the hardware.


    maybe look at this: https://beagleboard.org/black
    it uses an SoC that has two extra risc cpus with access to everything
    on the chip
    for realtime tasks

    chapter 4
    https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf


    Do pi's have crystal oscillators? I guess we could add one too.

    a PI has everything it needs, just add power (and an SC card*)

    4B seems to have a 19.2 MHz crystal, but it doesn't look like it
    accessable to an external gadget, like an FPGA. I can add a VCXO.

    The ARM chip almost surely has a high-resolution timer onboard, the
    stock Linux kernel in e.g. mainstream distros like Ubuntu isn't
    configured for hard realtime operation but Linux can be:

    <https://bristot.me/demystifying-the-real-time-linux-latency/>

    <https://rt.wiki.kernel.org/index.php/Frequently_Asked_Questions#What_is_real-time.3F>


    "Average latencies of a few uS are possible on single-CPU systems"

    If you need to measure sub uS accurately Linux is probably the wrong tool.




    Sub 10s-of-uS, rather

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bitrex@21:1/5 to John Larkin on Mon Jul 18 21:54:59 2022
    On 7/18/2022 5:37 PM, John Larkin wrote:
    On Tue, 19 Jul 2022 00:04:14 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 23:55, John Larkin wrote:
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like >>>>> ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>> sort of domain, several channels. I guess we could hang a small FPGA >>>>> off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi >
    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.

    Oh I know it is fairly complex and it is widely used in consumer
    stuff, people watch videos on it etc.
    I just don't see that sort of thing in the kind of products you
    seem to be doing. But then if it is the easiest way to do things
    and you find it stable enough why not.

    It seems to be pretty serious, from Broadcom, and it's hard to get
    ARMs and ZYNQs these days. It's even hard to get opamps.




    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Some torque sensors make tricky timing waveforms.


    I was talking of something like the PPC timebase register, it is
    a free running 64 bit counter. If they have something like that
    you could timestamp events using some IRQ, the jitter you would
    get would depend mostly on the IRQ latency then.
    But I am really no ARM person.

    We could have a free-running 32-bit counter at some MHz. Every rise or
    fall on any of the three inputs, we'd latch the counter and poke it
    into the FIFO with an ID tag. Then let the c code figure it all out.

    The SoC has multiple CPU cores, there have been some experiments running
    Linux on some of the cores,
    and doing realtime stuff on another "bare metal":

    <https://forums.raspberrypi.com/viewtopic.php?t=245561>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jlarkin@highlandsniptechnology.com@21:1/5 to All on Mon Jul 18 19:05:25 2022
    On Tue, 19 Jul 2022 02:26:33 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/19/2022 0:37, John Larkin wrote:
    On Tue, 19 Jul 2022 00:04:14 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 23:55, John Larkin wrote:
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like >>>>>> ARMs usually do. I've seen vague references to using the GPU to do >>>>>> timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>>> sort of domain, several channels. I guess we could hang a small FPGA >>>>>> off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi >
    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.

    Oh I know it is fairly complex and it is widely used in consumer
    stuff, people watch videos on it etc.
    I just don't see that sort of thing in the kind of products you
    seem to be doing. But then if it is the easiest way to do things
    and you find it stable enough why not.

    It seems to be pretty serious, from Broadcom, and it's hard to get
    ARMs and ZYNQs these days. It's even hard to get opamps.




    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff, >>>> so we'd have to do that externally, in a small FPGA probably. We might >>>> have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Some torque sensors make tricky timing waveforms.


    I was talking of something like the PPC timebase register, it is
    a free running 64 bit counter. If they have something like that
    you could timestamp events using some IRQ, the jitter you would
    get would depend mostly on the IRQ latency then.
    But I am really no ARM person.

    We could have a free-running 32-bit counter at some MHz. Every rise or
    fall on any of the three inputs, we'd latch the counter and poke it
    into the FIFO with an ID tag. Then let the c code figure it all out.

    Imagine a shaft with a bunch of gear teeth on each end, each with a
    magnetic pickup. Spin it and both pickups make about the same pulse
    train. But torque twists the shaft and the pickup phases change. We
    can get RPM and torque from the two signals. The F35 fan is driven
    with a shaft at something crazy like 30K horsepower, and it twists a
    lot.

    Sometimes there is one missing tooth, as a rotation index. Or more
    complex stuff. The signal conditioning gets interesting.

    True sadism would be to just digitize the sensor waveforms.



    Sounds like you are making some testing setup for someone
    (surely you won't put a Rpi on a real F35?!)

    No, I don't want to make anything that flies. The paperwork multiplies
    the engineering time by 5x at least. But our stuff is used to test
    things on the ground.




    , so if it works for you
    why not. Just make sure the counter you put is wide enough, that's
    easy to underestimate... [Side story: on a 64 bit power architecture >processor there is that standard 64 bit free running timebase,
    same like on 32 bit cores, where in order to read it you read the
    upper longword, then the lower, then the upper again and compare
    the two uppers you got; if not matching, do it again. Now on
    a 64 bit machine you would expect a simple read into a 64 bit
    general purpose register to be the normal way - which was the
    idea, only the errata sheet says "don't do it, do it the old
    way" :-) ].



    We'd be OK timestamping a 32-bit, 1 MHz or so counter. An FPGA could
    snapshot times coherently.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jlarkin@highlandsniptechnology.com@21:1/5 to jrwalliker@gmail.com on Mon Jul 18 19:12:52 2022
    On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker
    <jrwalliker@gmail.com> wrote:

    On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us >> > >> sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns >> > resolution for my iic interface.
    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....

    The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one
    at the moment. The CM4 has a PCI-e interface which gives lots of possibilities.
    The Beaglebone Black is also good, but it has less RAM than
    the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s.
    The extra processors do allow time critical software to be written though.

    There are add-on modules with real time clock chips for the Pi and the BBB.

    Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it
    uses. Both of these have the big advantage that they can be bought in large quantities
    at the moment. The RP2040 has multiple programmable state machines which >allow very complex i/o operations with precise timing. There are also multiple
    counter-timer modules. It is a two-core ARM M0+.
    Finally, don't forget the XMOS devices, many of which support USB and/or ethernet
    together with deterministic timing and multiple cores.
    John

    We use a Zynq for serious projects, dual ARM and a heap of FPGA, but
    they are hard to get so I'm conserving them for big stuff. This little
    tach thing will be dinky.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don Y@21:1/5 to bitrex on Mon Jul 18 20:53:56 2022
    On 7/18/2022 6:37 PM, bitrex wrote:
    "Average latencies of a few uS are possible on single-CPU systems"

    If you need to measure sub uS accurately Linux is probably the wrong tool.

    The trick to (inexpensive) measuring times/intervals is to use
    the hardware event to trigger (or capture) something that the
    software can *later* get around to reading.

    E.g., let it start a (hardware) timer and let the software (IRQ)
    read the "current time" as well as the time on the triggered timer
    and use the two to determine the system time at which the trigger
    event occurred.

    (Of course, the two timers must be accessed in a single critical
    region but you can additionally fudge the math based on the work
    required to compute the difference)

    There was an era when counter/timers were truly appreciated
    (e.g., the 9513) as nearly universal peripherals (timing,
    analog-digital-analog conversion, etc.).

    Nowadays, timers are becoming less clever (less real estate).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jan Panteltje@21:1/5 to jlarkin@highland_atwork_technology. on Tue Jul 19 10:51:13 2022
    On a sunny day (Mon, 18 Jul 2022 12:13:05 -0700) it happened John Larkin <jlarkin@highland_atwork_technology.com> wrote in <gobbdhpb39nfocgdnqd87vn8kkoc1vgtl6@4ax.com>:



    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators?

    dunno, did not see any crystal..

    I guess we could add one too.

    In this project I use an old raspberry as signal generator.
    http://panteltje.com/panteltje/newsflex/download.html#freq_pi

    Look at freq_pi.c
    it contains part of
    BCM2835-ARM-Peripherals.pdf
    page 105
    6.3 General Purpose GPIO Clocks

    That is for an old Pi, have not looked up the Pi4 yet (have 2, one with 4 GB and one with 8 GB RAM)
    Somebody did an FM radio modulator with the old PI.

    Raspberry Pies are also difficult to get these days.
    I use the 8 GB for web browsing,

    Just been biking in the heatwave here, code orange well only 31 C,
    wintercoat and hat on.. its cooler on the bike (airflow) than standing still in the sun!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jlarkin@highlandsniptechnology.com@21:1/5 to pNaonStpealmtje@yahoo.com on Tue Jul 19 04:48:52 2022
    On Tue, 19 Jul 2022 10:51:13 GMT, Jan Panteltje
    <pNaonStpealmtje@yahoo.com> wrote:

    On a sunny day (Mon, 18 Jul 2022 12:13:05 -0700) it happened John Larkin ><jlarkin@highland_atwork_technology.com> wrote in ><gobbdhpb39nfocgdnqd87vn8kkoc1vgtl6@4ax.com>:



    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators?

    dunno, did not see any crystal..

    I guess we could add one too.

    In this project I use an old raspberry as signal generator.
    http://panteltje.com/panteltje/newsflex/download.html#freq_pi

    Look at freq_pi.c
    it contains part of
    BCM2835-ARM-Peripherals.pdf
    page 105
    6.3 General Purpose GPIO Clocks

    That is for an old Pi, have not looked up the Pi4 yet (have 2, one with 4 GB and one with 8 GB RAM)
    Somebody did an FM radio modulator with the old PI.

    Raspberry Pies are also difficult to get these days.
    I use the 8 GB for web browsing,

    Just been biking in the heatwave here, code orange well only 31 C,
    wintercoat and hat on.. its cooler on the bike (airflow) than standing still in the sun!


    It's been cold and foggy here. Mo looks cute in a parka.

    It's 52F here right now. The heater is running.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phil Hobbs@21:1/5 to jlarkin@highlandsniptechnology.com on Tue Jul 19 09:10:41 2022
    jlarkin@highlandsniptechnology.com wrote:
    On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker <jrwalliker@gmail.com> wrote:

    On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like >>>>>> ARMs usually do. I've seen vague references to using the GPU to do >>>>>> timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>>> sort of domain, several channels. I guess we could hang a small FPGA >>>>>> off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns >>>> resolution for my iic interface.
    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....

    The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one
    at the moment. The CM4 has a PCI-e interface which gives lots of possibilities.
    The Beaglebone Black is also good, but it has less RAM than
    the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s.
    The extra processors do allow time critical software to be written though. >>
    There are add-on modules with real time clock chips for the Pi and the BBB. >>
    Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it
    uses. Both of these have the big advantage that they can be bought in large quantities
    at the moment. The RP2040 has multiple programmable state machines which >> allow very complex i/o operations with precise timing. There are also multiple
    counter-timer modules. It is a two-core ARM M0+.
    Finally, don't forget the XMOS devices, many of which support USB and/or ethernet
    together with deterministic timing and multiple cores.
    John

    We use a Zynq for serious projects, dual ARM and a heap of FPGA, but
    they are hard to get so I'm conserving them for big stuff. This little
    tach thing will be dinky.


    Well, you probably have a lot of MC68332s still in stock. They're
    pretty nice for timing stuff, if you don't mind using external memory. ;)

    Cheers

    Phil Hobbs

    (Whose first embedded design used a 68332, but never got built)

    --
    Dr Philip C D Hobbs
    Principal Consultant
    ElectroOptical Innovations LLC / Hobbs ElectroOptics
    Optics, Electro-optics, Photonics, Analog Electronics
    Briarcliff Manor NY 10510

    http://electrooptical.net
    http://hobbs-eo.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jlarkin@highlandsniptechnology.com@21:1/5 to pcdhSpamMeSenseless@electrooptical. on Tue Jul 19 08:04:00 2022
    On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote:

    jlarkin@highlandsniptechnology.com wrote:
    On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker
    <jrwalliker@gmail.com> wrote:

    On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like >>>>>>> ARMs usually do. I've seen vague references to using the GPU to do >>>>>>> timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>>>> sort of domain, several channels. I guess we could hang a small FPGA >>>>>>> off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns >>>>> resolution for my iic interface.
    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it .... >>>
    The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one
    at the moment. The CM4 has a PCI-e interface which gives lots of possibilities.
    The Beaglebone Black is also good, but it has less RAM than
    the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s.
    The extra processors do allow time critical software to be written though. >>>
    There are add-on modules with real time clock chips for the Pi and the BBB. >>>
    Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it
    uses. Both of these have the big advantage that they can be bought in large quantities
    at the moment. The RP2040 has multiple programmable state machines which >>> allow very complex i/o operations with precise timing. There are also multiple
    counter-timer modules. It is a two-core ARM M0+.
    Finally, don't forget the XMOS devices, many of which support USB and/or ethernet
    together with deterministic timing and multiple cores.
    John

    We use a Zynq for serious projects, dual ARM and a heap of FPGA, but
    they are hard to get so I'm conserving them for big stuff. This little
    tach thing will be dinky.


    Well, you probably have a lot of MC68332s still in stock. They're
    pretty nice for timing stuff, if you don't mind using external memory. ;)

    Cheers

    Phil Hobbs

    (Whose first embedded design used a 68332, but never got built)

    68332 has been around for decades and is still available. It's a
    wonderful chip. It has 16 TPU timer channels that could do what I
    want. But it's big and expensive, and doesn't have USB or ethernet.

    The architecture and instruction set are beautiful. It was a joy to
    program. We've used about 16,000 of them so far.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jlarkin@highlandsniptechnology.com@21:1/5 to pNaonStpealmtje@yahoo.com on Tue Jul 19 09:03:09 2022
    On Tue, 19 Jul 2022 15:07:32 GMT, Jan Panteltje
    <pNaonStpealmtje@yahoo.com> wrote:

    On a sunny day (Tue, 19 Jul 2022 04:48:52 -0700) it happened >jlarkin@highlandsniptechnology.com wrote in ><066ddh5rrsupne4iqvks5gjj8ge1qhefe6@4ax.com>:

    On Tue, 19 Jul 2022 10:51:13 GMT, Jan Panteltje
    <pNaonStpealmtje@yahoo.com> wrote:

    On a sunny day (Mon, 18 Jul 2022 12:13:05 -0700) it happened John Larkin >>><jlarkin@highland_atwork_technology.com> wrote in >>><gobbdhpb39nfocgdnqd87vn8kkoc1vgtl6@4ax.com>:



    The pi doesn't seem to have any general counter/timer hardware, like >>>>ARMs usually do. I've seen vague references to using the GPU to do >>>>timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>sort of domain, several channels. I guess we could hang a small FPGA >>>>off to the side if pi can't do it.

    Do pi's have crystal oscillators?

    dunno, did not see any crystal..

    I guess we could add one too.

    In this project I use an old raspberry as signal generator.
    http://panteltje.com/panteltje/newsflex/download.html#freq_pi

    Look at freq_pi.c
    it contains part of
    BCM2835-ARM-Peripherals.pdf
    page 105
    6.3 General Purpose GPIO Clocks

    That is for an old Pi, have not looked up the Pi4 yet (have 2, one with 4 GB and one with 8 GB RAM)
    Somebody did an FM radio modulator with the old PI.

    Raspberry Pies are also difficult to get these days.
    I use the 8 GB for web browsing,

    Just been biking in the heatwave here, code orange well only 31 C, >>>wintercoat and hat on.. its cooler on the bike (airflow) than standing still in the sun!


    It's been cold and foggy here. Mo looks cute in a parka.

    It's 52F here right now. The heater is running.

    Now its 36 on my outside garden thermometer in the shadow,
    but sure some heat comes from the fence it is hanging from.
    Inside way above 30 this afternoon, no aircos here.

    UK seems to be in alarm mode because highest temperature ever measured in London?
    Somebody here pointed me to that Arabian clothing like what those sheiks have :-)
    Not a bad idea perhaps if it stays this way.



    It's been raining anchovies here.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jan Panteltje@21:1/5 to jlarkin@highlandsniptechnology.com on Tue Jul 19 15:07:32 2022
    On a sunny day (Tue, 19 Jul 2022 04:48:52 -0700) it happened jlarkin@highlandsniptechnology.com wrote in <066ddh5rrsupne4iqvks5gjj8ge1qhefe6@4ax.com>:

    On Tue, 19 Jul 2022 10:51:13 GMT, Jan Panteltje
    <pNaonStpealmtje@yahoo.com> wrote:

    On a sunny day (Mon, 18 Jul 2022 12:13:05 -0700) it happened John Larkin >><jlarkin@highland_atwork_technology.com> wrote in >><gobbdhpb39nfocgdnqd87vn8kkoc1vgtl6@4ax.com>:



    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do >>>timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators?

    dunno, did not see any crystal..

    I guess we could add one too.

    In this project I use an old raspberry as signal generator.
    http://panteltje.com/panteltje/newsflex/download.html#freq_pi

    Look at freq_pi.c
    it contains part of
    BCM2835-ARM-Peripherals.pdf
    page 105
    6.3 General Purpose GPIO Clocks

    That is for an old Pi, have not looked up the Pi4 yet (have 2, one with 4 GB and one with 8 GB RAM)
    Somebody did an FM radio modulator with the old PI.

    Raspberry Pies are also difficult to get these days.
    I use the 8 GB for web browsing,

    Just been biking in the heatwave here, code orange well only 31 C, >>wintercoat and hat on.. its cooler on the bike (airflow) than standing still in the sun!


    It's been cold and foggy here. Mo looks cute in a parka.

    It's 52F here right now. The heater is running.

    Now its 36 on my outside garden thermometer in the shadow,
    but sure some heat comes from the fence it is hanging from.
    Inside way above 30 this afternoon, no aircos here.

    UK seems to be in alarm mode because highest temperature ever measured in London?
    Somebody here pointed me to that Arabian clothing like what those sheiks have :-)
    Not a bad idea perhaps if it stays this way.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Tue Jul 19 09:08:50 2022
    tirsdag den 19. juli 2022 kl. 17.04.13 UTC+2 skrev jla...@highlandsniptechnology.com:
    On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs <pcdhSpamM...@electrooptical.net> wrote:

    jla...@highlandsniptechnology.com wrote:
    On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker
    <jrwal...@gmail.com> wrote:

    On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like >>>>>>> ARMs usually do. I've seen vague references to using the GPU to do >>>>>>> timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>>>> sort of domain, several channels. I guess we could hang a small FPGA >>>>>>> off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns
    resolution for my iic interface.
    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it .... >>>
    The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one
    at the moment. The CM4 has a PCI-e interface which gives lots of possibilities.
    The Beaglebone Black is also good, but it has less RAM than
    the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s.
    The extra processors do allow time critical software to be written though.

    There are add-on modules with real time clock chips for the Pi and the BBB.

    Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it
    uses. Both of these have the big advantage that they can be bought in large quantities
    at the moment. The RP2040 has multiple programmable state machines which >>> allow very complex i/o operations with precise timing. There are also multiple
    counter-timer modules. It is a two-core ARM M0+.
    Finally, don't forget the XMOS devices, many of which support USB and/or ethernet
    together with deterministic timing and multiple cores.
    John

    We use a Zynq for serious projects, dual ARM and a heap of FPGA, but
    they are hard to get so I'm conserving them for big stuff. This little
    tach thing will be dinky.


    Well, you probably have a lot of MC68332s still in stock. They're
    pretty nice for timing stuff, if you don't mind using external memory. ;)

    Cheers

    Phil Hobbs

    (Whose first embedded design used a 68332, but never got built)
    68332 has been around for decades and is still available. It's a
    wonderful chip. It has 16 TPU timer channels that could do what I
    want. But it's big and expensive, and doesn't have USB or ethernet.

    if USB will do almost any MCU with USB will do

    https://www.digikey.dk/da/products/detail/raspberry-pi/SC0914-13/14306010 https://www.digikey.dk/da/products/detail/winbond-electronics/W25Q16JVSNIQ/6193768

    plenty in stock

    or if feeling lazy, https://www.waveshare.com/product/raspberry-pi-pico.htm?sku=19310

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Walliker@21:1/5 to lang...@fonz.dk on Tue Jul 19 10:50:49 2022
    On Tuesday, 19 July 2022 at 17:08:53 UTC+1, lang...@fonz.dk wrote:
    tirsdag den 19. juli 2022 kl. 17.04.13 UTC+2 skrev jla...@highlandsniptechnology.com:
    On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs <pcdhSpamM...@electrooptical.net> wrote:

    jla...@highlandsniptechnology.com wrote:
    On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker
    <jrwal...@gmail.com> wrote:

    On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do >>>>>>> timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns
    resolution for my iic interface.
    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....

    The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one
    at the moment. The CM4 has a PCI-e interface which gives lots of possibilities.
    The Beaglebone Black is also good, but it has less RAM than
    the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s.
    The extra processors do allow time critical software to be written though.

    There are add-on modules with real time clock chips for the Pi and the BBB.

    Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it
    uses. Both of these have the big advantage that they can be bought in large quantities
    at the moment. The RP2040 has multiple programmable state machines which
    allow very complex i/o operations with precise timing. There are also multiple
    counter-timer modules. It is a two-core ARM M0+.
    Finally, don't forget the XMOS devices, many of which support USB and/or ethernet
    together with deterministic timing and multiple cores.
    John

    We use a Zynq for serious projects, dual ARM and a heap of FPGA, but
    they are hard to get so I'm conserving them for big stuff. This little >> tach thing will be dinky.


    Well, you probably have a lot of MC68332s still in stock. They're
    pretty nice for timing stuff, if you don't mind using external memory. ;)

    Cheers

    Phil Hobbs

    (Whose first embedded design used a 68332, but never got built)
    68332 has been around for decades and is still available. It's a
    wonderful chip. It has 16 TPU timer channels that could do what I
    want. But it's big and expensive, and doesn't have USB or ethernet.
    if USB will do almost any MCU with USB will do

    https://www.digikey.dk/da/products/detail/raspberry-pi/SC0914-13/14306010 https://www.digikey.dk/da/products/detail/winbond-electronics/W25Q16JVSNIQ/6193768

    plenty in stock

    or if feeling lazy, https://www.waveshare.com/product/raspberry-pi-pico.htm?sku=19310

    Yes, it really is worth looking closely at the RP2040 or the pico board. It is probably
    massive overkill for what you want to do, but at a cost of 1USD for the chip and 4USD
    for the assembled pico board it hardly matters.
    Digikey and Mouser between them have over 166000 chips in stock and around 33000 pico boards. In the UK Farnell and RS between them have about another 517000 RP2040 chips in stock.
    There is also a version of the pico with WiFi, but you probably don't need that.
    I am planning to use an RP2040 for a multi-phase switched mode isolated power supply.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Walliker@21:1/5 to John Larkin on Tue Jul 19 13:42:25 2022
    On Tuesday, 19 July 2022 at 21:29:11 UTC+1, John Larkin wrote:
    On Tue, 19 Jul 2022 10:50:49 -0700 (PDT), John Walliker
    <jrwal...@gmail.com> wrote:

    On Tuesday, 19 July 2022 at 17:08:53 UTC+1, lang...@fonz.dk wrote:
    tirsdag den 19. juli 2022 kl. 17.04.13 UTC+2 skrev jla...@highlandsniptechnology.com:
    On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs
    <pcdhSpamM...@electrooptical.net> wrote:

    jla...@highlandsniptechnology.com wrote:
    On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker
    <jrwal...@gmail.com> wrote:

    On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns
    resolution for my iic interface.
    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....

    The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one
    at the moment. The CM4 has a PCI-e interface which gives lots of possibilities.
    The Beaglebone Black is also good, but it has less RAM than
    the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s.
    The extra processors do allow time critical software to be written though.

    There are add-on modules with real time clock chips for the Pi and the BBB.

    Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it
    uses. Both of these have the big advantage that they can be bought in large quantities
    at the moment. The RP2040 has multiple programmable state machines which
    allow very complex i/o operations with precise timing. There are also multiple
    counter-timer modules. It is a two-core ARM M0+.
    Finally, don't forget the XMOS devices, many of which support USB and/or ethernet
    together with deterministic timing and multiple cores.
    John

    We use a Zynq for serious projects, dual ARM and a heap of FPGA, but >> > >> they are hard to get so I'm conserving them for big stuff. This little
    tach thing will be dinky.


    Well, you probably have a lot of MC68332s still in stock. They're
    pretty nice for timing stuff, if you don't mind using external memory. ;)

    Cheers

    Phil Hobbs

    (Whose first embedded design used a 68332, but never got built)
    68332 has been around for decades and is still available. It's a
    wonderful chip. It has 16 TPU timer channels that could do what I
    want. But it's big and expensive, and doesn't have USB or ethernet.
    if USB will do almost any MCU with USB will do

    https://www.digikey.dk/da/products/detail/raspberry-pi/SC0914-13/14306010 >> https://www.digikey.dk/da/products/detail/winbond-electronics/W25Q16JVSNIQ/6193768

    plenty in stock

    or if feeling lazy, https://www.waveshare.com/product/raspberry-pi-pico.htm?sku=19310

    Yes, it really is worth looking closely at the RP2040 or the pico board. It is probably
    massive overkill for what you want to do, but at a cost of 1USD for the chip and 4USD
    for the assembled pico board it hardly matters.
    Digikey and Mouser between them have over 166000 chips in stock and around >33000 pico boards. In the UK Farnell and RS between them have about another >517000 RP2040 chips in stock.
    There is also a version of the pico with WiFi, but you probably don't need that.
    I am planning to use an RP2040 for a multi-phase switched mode isolated power
    supply.

    John
    Pico doesn't have ethernet. I'd like that.

    You can add ethernet by using a LAN8720 chip, or using a cheap ready-made LAN8720
    module. There is software support for this already available, although at the moment it
    only works properly at 10Mbit/s. https://www.raspberrypi.com/news/how-to-add-ethernet-to-raspberry-pi-pico/

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Larkin@21:1/5 to jrwalliker@gmail.com on Tue Jul 19 13:29:00 2022
    On Tue, 19 Jul 2022 10:50:49 -0700 (PDT), John Walliker
    <jrwalliker@gmail.com> wrote:

    On Tuesday, 19 July 2022 at 17:08:53 UTC+1, lang...@fonz.dk wrote:
    tirsdag den 19. juli 2022 kl. 17.04.13 UTC+2 skrev jla...@highlandsniptechnology.com:
    On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs
    <pcdhSpamM...@electrooptical.net> wrote:

    jla...@highlandsniptechnology.com wrote:
    On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker
    <jrwal...@gmail.com> wrote:

    On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do >> > >>>>>>> timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns
    resolution for my iic interface.
    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....

    The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one
    at the moment. The CM4 has a PCI-e interface which gives lots of possibilities.
    The Beaglebone Black is also good, but it has less RAM than
    the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s.
    The extra processors do allow time critical software to be written though.

    There are add-on modules with real time clock chips for the Pi and the BBB.

    Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it
    uses. Both of these have the big advantage that they can be bought in large quantities
    at the moment. The RP2040 has multiple programmable state machines which
    allow very complex i/o operations with precise timing. There are also multiple
    counter-timer modules. It is a two-core ARM M0+.
    Finally, don't forget the XMOS devices, many of which support USB and/or ethernet
    together with deterministic timing and multiple cores.
    John

    We use a Zynq for serious projects, dual ARM and a heap of FPGA, but
    they are hard to get so I'm conserving them for big stuff. This little >> > >> tach thing will be dinky.


    Well, you probably have a lot of MC68332s still in stock. They're
    pretty nice for timing stuff, if you don't mind using external memory. ;) >> > >
    Cheers

    Phil Hobbs

    (Whose first embedded design used a 68332, but never got built)
    68332 has been around for decades and is still available. It's a
    wonderful chip. It has 16 TPU timer channels that could do what I
    want. But it's big and expensive, and doesn't have USB or ethernet.
    if USB will do almost any MCU with USB will do

    https://www.digikey.dk/da/products/detail/raspberry-pi/SC0914-13/14306010
    https://www.digikey.dk/da/products/detail/winbond-electronics/W25Q16JVSNIQ/6193768

    plenty in stock

    or if feeling lazy, https://www.waveshare.com/product/raspberry-pi-pico.htm?sku=19310

    Yes, it really is worth looking closely at the RP2040 or the pico board. It is probably
    massive overkill for what you want to do, but at a cost of 1USD for the chip and 4USD
    for the assembled pico board it hardly matters.
    Digikey and Mouser between them have over 166000 chips in stock and around >33000 pico boards. In the UK Farnell and RS between them have about another >517000 RP2040 chips in stock.
    There is also a version of the pico with WiFi, but you probably don't need that.
    I am planning to use an RP2040 for a multi-phase switched mode isolated power >supply.

    John

    Pico doesn't have ethernet. I'd like that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe Gwinn@21:1/5 to jlarkin@highland_atwork_technology. on Tue Jul 19 17:22:18 2022
    On Mon, 18 Jul 2022 13:55:37 -0700, John Larkin <jlarkin@highland_atwork_technology.com> wrote:

    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.


    Well, we seem to have only two options, a RaspberryPi or an ARM, one
    being too small and the other being too large.

    But there is actually a third option that falls between these two
    options in size, a Microchip AVR microcontroller. Programmed in a
    dialect of Ansi C, with code in a flash memory and loaded on startup.

    .<https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/8-bit-mcus/avr-mcus>

    Joe Gwinn

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Tue Jul 19 14:24:27 2022
    tirsdag den 19. juli 2022 kl. 22.29.11 UTC+2 skrev John Larkin:
    On Tue, 19 Jul 2022 10:50:49 -0700 (PDT), John Walliker
    <jrwal...@gmail.com> wrote:

    On Tuesday, 19 July 2022 at 17:08:53 UTC+1, lang...@fonz.dk wrote:
    tirsdag den 19. juli 2022 kl. 17.04.13 UTC+2 skrev jla...@highlandsniptechnology.com:
    On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs
    <pcdhSpamM...@electrooptical.net> wrote:

    jla...@highlandsniptechnology.com wrote:
    On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker
    <jrwal...@gmail.com> wrote:

    On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote:
    mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don:
    Lasse Langwadt Christensen wrote:
    John Larkin:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.


    which version of pi?

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    using a pi I assume you'll be running some kind of linux I don't see how you
    could do 1us timing in linux
    My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns
    resolution for my iic interface.
    sure as long as your code is running and not interrupted you can busy wait with
    nanosec resolution up to few ms

    try reacting on a signal to measure it's frequency or timestamp it ....

    The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one
    at the moment. The CM4 has a PCI-e interface which gives lots of possibilities.
    The Beaglebone Black is also good, but it has less RAM than
    the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s.
    The extra processors do allow time critical software to be written though.

    There are add-on modules with real time clock chips for the Pi and the BBB.

    Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it
    uses. Both of these have the big advantage that they can be bought in large quantities
    at the moment. The RP2040 has multiple programmable state machines which
    allow very complex i/o operations with precise timing. There are also multiple
    counter-timer modules. It is a two-core ARM M0+.
    Finally, don't forget the XMOS devices, many of which support USB and/or ethernet
    together with deterministic timing and multiple cores.
    John

    We use a Zynq for serious projects, dual ARM and a heap of FPGA, but >> > >> they are hard to get so I'm conserving them for big stuff. This little
    tach thing will be dinky.


    Well, you probably have a lot of MC68332s still in stock. They're
    pretty nice for timing stuff, if you don't mind using external memory. ;)

    Cheers

    Phil Hobbs

    (Whose first embedded design used a 68332, but never got built)
    68332 has been around for decades and is still available. It's a
    wonderful chip. It has 16 TPU timer channels that could do what I
    want. But it's big and expensive, and doesn't have USB or ethernet.
    if USB will do almost any MCU with USB will do

    https://www.digikey.dk/da/products/detail/raspberry-pi/SC0914-13/14306010 >> https://www.digikey.dk/da/products/detail/winbond-electronics/W25Q16JVSNIQ/6193768

    plenty in stock

    or if feeling lazy, https://www.waveshare.com/product/raspberry-pi-pico.htm?sku=19310

    Yes, it really is worth looking closely at the RP2040 or the pico board. It is probably
    massive overkill for what you want to do, but at a cost of 1USD for the chip and 4USD
    for the assembled pico board it hardly matters.
    Digikey and Mouser between them have over 166000 chips in stock and around >33000 pico boards. In the UK Farnell and RS between them have about another >517000 RP2040 chips in stock.
    There is also a version of the pico with WiFi, but you probably don't need that.
    I am planning to use an RP2040 for a multi-phase switched mode isolated power
    supply.

    John
    Pico doesn't have ethernet. I'd like that.

    https://www.digikey.dk/da/products/detail/wiznet/W5100S-EVB-PICO/15516855

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Tue Jul 19 14:29:58 2022
    tirsdag den 19. juli 2022 kl. 23.22.28 UTC+2 skrev Joe Gwinn:
    On Mon, 18 Jul 2022 13:55:37 -0700, John Larkin <jlarkin@highland_atwork_technology.com> wrote:

    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <d...@tgi-sci.com> >wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Well, we seem to have only two options, a RaspberryPi or an ARM, one
    being too small and the other being too large.

    But there is actually a third option that falls between these two
    options in size, a Microchip AVR microcontroller. Programmed in a
    dialect of Ansi C, with code in a flash memory and loaded on startup.

    .<https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/8-bit-mcus/avr-mcus>

    in what world does an ancient 8 bit AVR fall between RaspberryPi and ARM* ?

    *raspberry pi is also ARM, it is just a Cortex-A CPU, the smaller MCUs are Cortex-M

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe Gwinn@21:1/5 to langwadt@fonz.dk on Tue Jul 19 18:18:43 2022
    On Tue, 19 Jul 2022 14:29:58 -0700 (PDT), Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:

    tirsdag den 19. juli 2022 kl. 23.22.28 UTC+2 skrev Joe Gwinn:
    On Mon, 18 Jul 2022 13:55:37 -0700, John Larkin
    <jlarkin@highland_atwork_technology.com> wrote:

    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <d...@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Well, we seem to have only two options, a RaspberryPi or an ARM, one
    being too small and the other being too large.

    But there is actually a third option that falls between these two
    options in size, a Microchip AVR microcontroller. Programmed in a
    dialect of Ansi C, with code in a flash memory and loaded on startup.

    .<https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/8-bit-mcus/avr-mcus>

    in what world does an ancient 8 bit AVR fall between RaspberryPi and ARM* ?

    *raspberry pi is also ARM, it is just a Cortex-A CPU, the smaller MCUs are Cortex-M

    Far more I/O stuff, and timers et al.


    Joe Gwinn

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Clifford Heath@21:1/5 to John Larkin on Wed Jul 20 09:35:24 2022
    On 19/7/22 07:37, John Larkin wrote:
    It seems to be pretty serious, from Broadcom, and it's hard to get
    ARMs and ZYNQs these days. It's even hard to get opamps.

    If you aren't a determined patriot, there are some impressively
    inexpensive ARMs readily available from Chinese vendors like GigaDevice
    and WCH now:

    <https://www.gigadevice.com/products/microcontrollers/gd32/> <http://www.wch-ic.com/products/categories/66.html?pid=5>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don Y@21:1/5 to Joe Gwinn on Tue Jul 19 17:03:24 2022
    On 7/19/2022 3:18 PM, Joe Gwinn wrote:
    On Tue, 19 Jul 2022 14:29:58 -0700 (PDT), Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:

    tirsdag den 19. juli 2022 kl. 23.22.28 UTC+2 skrev Joe Gwinn:
    On Mon, 18 Jul 2022 13:55:37 -0700, John Larkin
    <jlarkin@highland_atwork_technology.com> wrote:

    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <d...@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like >>>>>> ARMs usually do. I've seen vague references to using the GPU to do >>>>>> timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>>> sort of domain, several channels. I guess we could hang a small FPGA >>>>>> off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff, >>>> so we'd have to do that externally, in a small FPGA probably. We might >>>> have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Well, we seem to have only two options, a RaspberryPi or an ARM, one
    being too small and the other being too large.

    But there is actually a third option that falls between these two
    options in size, a Microchip AVR microcontroller. Programmed in a
    dialect of Ansi C, with code in a flash memory and loaded on startup.

    .<https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/8-bit-mcus/avr-mcus>

    in what world does an ancient 8 bit AVR fall between RaspberryPi and ARM* ? >>
    *raspberry pi is also ARM, it is just a Cortex-A CPU, the smaller MCUs are Cortex-M

    Far more I/O stuff, and timers et al.

    The ARM A-family (A=Application) are intended to host more sophisticated environments; primarily made possible by support for VMM.

    The M-family (and R-family) -- along with the AVRs, et al. -- are intended
    more for control/mechanisms applications without support for more advanced *operating* system features.

    Of course, (ARM) licensees can choose to package whatever I/Os they deem appropriate with any family offering. So, once *could* have an I/O-rich A-series processor but you can't (?) have VMM bolted onto an M/R series
    device (nor the AVRs).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Eather@21:1/5 to All on Wed Jul 20 11:05:19 2022

    Just been biking in the heatwave here, code orange well only 31 C,
    wintercoat and hat on.. its cooler on the bike (airflow) than standing still in the sun!


    31 degrees? We call that "summer" :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Wed Jul 20 00:32:25 2022
    onsdag den 20. juli 2022 kl. 00.18.53 UTC+2 skrev Joe Gwinn:
    On Tue, 19 Jul 2022 14:29:58 -0700 (PDT), Lasse Langwadt Christensen <lang...@fonz.dk> wrote:

    tirsdag den 19. juli 2022 kl. 23.22.28 UTC+2 skrev Joe Gwinn:
    On Mon, 18 Jul 2022 13:55:37 -0700, John Larkin
    <jlarkin@highland_atwork_technology.com> wrote:

    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <d...@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like >> >>> ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us >> >>> sort of domain, several channels. I guess we could hang a small FPGA >> >>> off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Well, we seem to have only two options, a RaspberryPi or an ARM, one
    being too small and the other being too large.

    But there is actually a third option that falls between these two
    options in size, a Microchip AVR microcontroller. Programmed in a
    dialect of Ansi C, with code in a flash memory and loaded on startup.

    .<https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/8-bit-mcus/avr-mcus>

    in what world does an ancient 8 bit AVR fall between RaspberryPi and ARM* ?

    *raspberry pi is also ARM, it is just a Cortex-A CPU, the smaller MCUs are Cortex-M
    Far more I/O stuff, and timers et al.


    most if not all cortex-m have far more horsepower,memory,timers, and IO than an AVR

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Walliker@21:1/5 to Joe Gwinn on Wed Jul 20 01:19:27 2022
    On Tuesday, 19 July 2022 at 23:18:53 UTC+1, Joe Gwinn wrote:
    On Tue, 19 Jul 2022 14:29:58 -0700 (PDT), Lasse Langwadt Christensen <lang...@fonz.dk> wrote:

    tirsdag den 19. juli 2022 kl. 23.22.28 UTC+2 skrev Joe Gwinn:
    On Mon, 18 Jul 2022 13:55:37 -0700, John Larkin
    <jlarkin@highland_atwork_technology.com> wrote:

    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <d...@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like >> >>> ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us >> >>> sort of domain, several channels. I guess we could hang a small FPGA >> >>> off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Well, we seem to have only two options, a RaspberryPi or an ARM, one
    being too small and the other being too large.

    But there is actually a third option that falls between these two
    options in size, a Microchip AVR microcontroller. Programmed in a
    dialect of Ansi C, with code in a flash memory and loaded on startup.

    .<https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/8-bit-mcus/avr-mcus>

    in what world does an ancient 8 bit AVR fall between RaspberryPi and ARM* ?

    *raspberry pi is also ARM, it is just a Cortex-A CPU, the smaller MCUs are Cortex-M
    Far more I/O stuff, and timers et al.


    Joe Gwinn

    One interesting thing I noticed about the new AVR series (AVR-DA, AVR-DB, AVR-DD)
    is that the maximum clock speed dependency on power supply voltage has gone. They have an on-chip power supply regulator and work from 1.8 to 5.5V
    at a maximum of 24MHz at all voltages in that range.
    They are being promoted for safety critical applications and have some
    hardware features to support that together with a certified toolchain.
    A very simple architecture can have advantages in such domains. It does look as if Microchip have taken the AVR range and enhanced it in some very useful ways that could make these devices a good choice for a new design.
    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe Gwinn@21:1/5 to langwadt@fonz.dk on Wed Jul 20 11:09:43 2022
    On Wed, 20 Jul 2022 00:32:25 -0700 (PDT), Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:

    onsdag den 20. juli 2022 kl. 00.18.53 UTC+2 skrev Joe Gwinn:
    On Tue, 19 Jul 2022 14:29:58 -0700 (PDT), Lasse Langwadt Christensen
    <lang...@fonz.dk> wrote:

    tirsdag den 19. juli 2022 kl. 23.22.28 UTC+2 skrev Joe Gwinn:
    On Mon, 18 Jul 2022 13:55:37 -0700, John Larkin
    <jlarkin@highland_atwork_technology.com> wrote:

    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <d...@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like >> >> >>> ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us >> >> >>> sort of domain, several channels. I guess we could hang a small FPGA >> >> >>> off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff, >> >> >so we'd have to do that externally, in a small FPGA probably. We might >> >> >have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    Well, we seem to have only two options, a RaspberryPi or an ARM, one
    being too small and the other being too large.

    But there is actually a third option that falls between these two
    options in size, a Microchip AVR microcontroller. Programmed in a
    dialect of Ansi C, with code in a flash memory and loaded on startup.

    .<https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/8-bit-mcus/avr-mcus>

    in what world does an ancient 8 bit AVR fall between RaspberryPi and ARM* ? >> >
    *raspberry pi is also ARM, it is just a Cortex-A CPU, the smaller MCUs are Cortex-M
    Far more I/O stuff, and timers et al.


    most if not all cortex-m have far more horsepower,memory,timers, and IO than an AVR

    Yes, most likely. My point being that we were bouncing between the
    guard-rails (too big, too small), and needed to widen our ken.

    If I recall, the AVR does not need any VHDL or external FPGAs.

    Joe Gwinn

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Three Jeeps@21:1/5 to John Larkin on Wed Jul 20 21:10:23 2022
    On Monday, July 18, 2022 at 3:13:15 PM UTC-4, John Larkin wrote:
    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.
    Not sure why you targeted a RPi. You may want to consider an arduino, it does have a 16bit timer/counter. You may also want to look at the arduin MKR Vidor 4000.
    It uses the Cortex-M0 32-bit SAMD21 processor that has 5 - 16 bit TC and one 32bit RTC
    https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwizsqGZjIn5AhViEmIAHaFNCSYQFnoECAwQAw&url=http%3A%2F%2Fww1.microchip.com%2Fdownloads%2Fen%2Fdevicedoc%2F40001884a.pdf&usg=AOvVaw2NAKz5dp_sNt6jgwimyt2S
    You will probably want to strip away the arduino operating interface to what will work for you.
    It has onboard a Intel Cyclone® 10CL016. It is 'sort of' integrated with the DAMD21 processor and programming the FPGA is a little awkward, IMHO.
    I think it is a sweet little board - used it in a couple of projects.
    Good luck
    J

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jasen Betts@21:1/5 to John Larkin on Sun Jul 24 22:16:08 2022
    On 2022-07-18, John Larkin <jlarkin@highland_atwork_technology.com> wrote:


    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Raspberry PI is a media player SOC, current models seem to be
    available only from scalpers.

    Do pi's have crystal oscillators? I guess we could add one too.

    There seems to be a "125", "25" and "54" the 54 seems closest to the
    SOC, the other two seem closest to the ethernet chip and PCIe to USB3 bridge.

    You could check the schematic.

    --
    Jasen.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jasen Betts@21:1/5 to Don on Sun Jul 24 22:31:34 2022
    On 2022-07-19, Don <g@crcomp.net> wrote:
    Lasse Langwadt Christensen wrote:
    skrev Don:

    <snip>

    Did you overlooked the iic part of my original followup up there? ^^^
    My RPi Apps use nanosleep to react to and time external Inter-Integrated >>> Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    you are generating signals, not reacting and measuring. That easy you just burn cycles while waiting
    and iic will work just fine with milli second timing ...

    How is nanosleep going to help if you want to time when and for how long and

    You need to generate and interpret signals with nano second timing to
    use i2c. Here's a power-on code snippet from my App:

    /* Initialize when power supply conditions are not met: */
    nSleep (15000000L); /* Wait 15 ms, 15000000 ns */
    iicWrite(0x00); /* RS=Instruction; RW=Write; */
    nSleep (40L); /* Wait 40 ns */
    iicWrite(0x34); /* E; DB5=Function Set; DB4=8-bit */
    nSleep (230L); /* Wait 230 ns */

    Ah right, so not actually "doing" IIC at all. just naively calling
    "iicWrite()" not even checking the response, just waiting and
    hoping. I can see how timing could be critical for that.

    --
    Jasen.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don@21:1/5 to Jasen Betts on Mon Jul 25 03:42:49 2022
    Jasen Betts wrote:
    Don wrote:
    Lasse Langwadt Christensen wrote:
    skrev Don:

    <snip>

    Did you overlooked the iic part of my original followup up there? ^^^
    My RPi Apps use nanosleep to react to and time external Inter-Integrated >>>> Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    you are generating signals, not reacting and measuring. That easy you just >>> burn cycles while waiting
    and iic will work just fine with milli second timing ...

    How is nanosleep going to help if you want to time when and for how long and

    You need to generate and interpret signals with nano second timing to
    use i2c. Here's a power-on code snippet from my App:

    /* Initialize when power supply conditions are not met: */
    nSleep (15000000L); /* Wait 15 ms, 15000000 ns */
    iicWrite(0x00); /* RS=Instruction; RW=Write; */
    nSleep (40L); /* Wait 40 ns */
    iicWrite(0x34); /* E; DB5=Function Set; DB4=8-bit */
    nSleep (230L); /* Wait 230 ns */

    Ah right, so not actually "doing" IIC at all. just naively calling "iicWrite()" not even checking the response, just waiting and
    hoping. I can see how timing could be critical for that.

    Ah, you're confused. ;) You naively assume my own iicwrite() is the same
    as a unix write().
    My iicWrite() merely changes the state of combinational logic for presentation to the target as part a single, larger, I2C write message.
    It only changes the data sent down the SDA at precise (in some case
    ns) times, per the target's protocol.
    My /code snippet/ shows only /a part/ of a single message from the
    RPi2 controller to a target. With I2C you must wait until the /whole/
    message is delivered before "checking."

    Danke,

    --
    Don, KB7RPU, https://www.qsl.net/kb7rpu
    There was a young lady named Bright Whose speed was far faster than light;
    She set out one day In a relative way And returned on the previous night.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jan Panteltje@21:1/5 to g@crcomp.net on Mon Jul 25 05:17:43 2022
    On a sunny day (Mon, 25 Jul 2022 03:42:49 -0000 (UTC)) it happened "Don" <g@crcomp.net> wrote in <20220724b@crcomp.net>:

    Jasen Betts wrote:
    Don wrote:
    Lasse Langwadt Christensen wrote:
    skrev Don:

    <snip>

    Did you overlooked the iic part of my original followup up there? ^^^ >>>>> My RPi Apps use nanosleep to react to and time external Inter-Integrated >>>>> Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    you are generating signals, not reacting and measuring. That easy you just >>>> burn cycles while waiting
    and iic will work just fine with milli second timing ...

    How is nanosleep going to help if you want to time when and for how long and

    You need to generate and interpret signals with nano second timing to
    use i2c. Here's a power-on code snippet from my App:

    /* Initialize when power supply conditions are not met: */
    nSleep (15000000L); /* Wait 15 ms, 15000000 ns */
    iicWrite(0x00); /* RS=Instruction; RW=Write; */
    nSleep (40L); /* Wait 40 ns */
    iicWrite(0x34); /* E; DB5=Function Set; DB4=8-bit */
    nSleep (230L); /* Wait 230 ns */

    Ah right, so not actually "doing" IIC at all. just naively calling
    "iicWrite()" not even checking the response, just waiting and
    hoping. I can see how timing could be critical for that.

    Ah, you're confused. ;) You naively assume my own iicwrite() is the same
    as a unix write().
    My iicWrite() merely changes the state of combinational logic for
    presentation to the target as part a single, larger, I2C write message.
    It only changes the data sent down the SDA at precise (in some case
    ns) times, per the target's protocol.
    My /code snippet/ shows only /a part/ of a single message from the
    RPi2 controller to a target. With I2C you must wait until the /whole/
    message is delivered before "checking."

    I2C is a not-time critical protocol,
    that is why you can use it on a multitasking system
    where it is interrupted on a regular basis.
    I wrote my own i2c routines years ago and have used those on PIs many times
    see my website download link for code.
    No nano-nano stuff needed anywhere, usleep is fine..




    Danke,

    --
    Don, KB7RPU, https://www.qsl.net/kb7rpu
    There was a young lady named Bright Whose speed was far faster than light; >She set out one day In a relative way And returned on the previous night.



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don@21:1/5 to Jan Panteltje on Mon Jul 25 08:35:00 2022
    Jan Panteltje wrote:
    Don Wrote:

    <snip>

    You need to generate and interpret signals with nano second timing to
    use i2c. Here's a power-on code snippet from my App:

    /* Initialize when power supply conditions are not met: */
    nSleep (15000000L); /* Wait 15 ms, 15000000 ns */
    iicWrite(0x00); /* RS=Instruction; RW=Write; */
    nSleep (40L); /* Wait 40 ns */
    iicWrite(0x34); /* E; DB5=Function Set; DB4=8-bit */
    nSleep (230L); /* Wait 230 ns */

    <snip>

    I2C is a not-time critical protocol,
    that is why you can use it on a multitasking system
    where it is interrupted on a regular basis.
    I wrote my own i2c routines years ago and have used those on PIs many times see my website download link for code.
    No nano-nano stuff needed anywhere, usleep is fine..

    "Brevity is the soul of wit" and "I2C is a not-time critical protocol"
    says it all, doesn't it?
    Here's the "Write Mode Timing Diagram" for the target of interest,
    my RPi2's target for this thread:

    https://crcomp.net/iic44780/timing2.png

    The third line down on the first table shows the "E Rise/Fall Time" Characteristic, tR. And tR's Max. is specified as 25 nS.
    Upon further reflection, it's clearly outside of my control. Ergo,
    the RPi2 itself must accomplish the rise time within spec.

    Beings I2C doesn't qualify, another RPi2 to test for nsleep() must be
    devised. Stand by.

    And, it turns out my homegrown iicWrite() actually does test for an
    error condition:

    void iicWrite(char iicByte) {
    rdwr.msgs[0].buf[1] = iicByte;

    if (ioctl(fd, I2CRDWR, &rdwr) < 0) {
    perror("ioctl");
    snprintf(errMessage, sizeof(errMessage), "ioctl: error %d sending write", errno);
    errorExit();
    }
    }


    Danke,

    --
    Don, KB7RPU, https://www.qsl.net/kb7rpu
    There was a young lady named Bright Whose speed was far faster than light;
    She set out one day In a relative way And returned on the previous night.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jasen Betts@21:1/5 to Don on Mon Jul 25 10:16:06 2022
    On 2022-07-25, Don <g@crcomp.net> wrote:
    Jasen Betts wrote:
    Don wrote:
    Lasse Langwadt Christensen wrote:
    skrev Don:

    <snip>

    Did you overlooked the iic part of my original followup up there? ^^^ >>>>> My RPi Apps use nanosleep to react to and time external Inter-Integrated >>>>> Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    you are generating signals, not reacting and measuring. That easy you just >>>> burn cycles while waiting
    and iic will work just fine with milli second timing ...

    How is nanosleep going to help if you want to time when and for how long and

    You need to generate and interpret signals with nano second timing to
    use i2c. Here's a power-on code snippet from my App:

    /* Initialize when power supply conditions are not met: */
    nSleep (15000000L); /* Wait 15 ms, 15000000 ns */
    iicWrite(0x00); /* RS=Instruction; RW=Write; */
    nSleep (40L); /* Wait 40 ns */
    iicWrite(0x34); /* E; DB5=Function Set; DB4=8-bit */
    nSleep (230L); /* Wait 230 ns */

    Ah right, so not actually "doing" IIC at all. just naively calling
    "iicWrite()" not even checking the response, just waiting and
    hoping. I can see how timing could be critical for that.

    Ah, you're confused. ;) You naively assume my own iicwrite() is the same
    as a unix write().

    It's fairly clear that iicwrite take an integer (probably byte)
    parameter. I didn't miss that.

    You know what I'm thinking about as well as you understand IIC.
    You should check for an ack bit after every byte sent, and I'm not
    seeing evidence of that above.

    If you're having rate problems it's also possible you're not
    watching the clk line.

    --
    Jasen.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don@21:1/5 to Jasen Betts on Mon Jul 25 15:19:50 2022
    Jasen Betts wrote:
    Don wrote:
    Jasen Betts wrote:
    Don wrote:
    Lasse Langwadt Christensen wrote:
    skrev Don:

    <snip>

    Did you overlooked the iic part of my original followup up there? ^^^ >>>>>> My RPi Apps use nanosleep to react to and time external Inter-Integrated >>>>>> Circuit signals. ...

    OK, maybe you're supposed to say i2c instead of iic.

    you are generating signals, not reacting and measuring. That easy you just
    burn cycles while waiting
    and iic will work just fine with milli second timing ...

    How is nanosleep going to help if you want to time when and for how long and

    You need to generate and interpret signals with nano second timing to
    use i2c. Here's a power-on code snippet from my App:

    /* Initialize when power supply conditions are not met: */
    nSleep (15000000L); /* Wait 15 ms, 15000000 ns */
    iicWrite(0x00); /* RS=Instruction; RW=Write; */
    nSleep (40L); /* Wait 40 ns */
    iicWrite(0x34); /* E; DB5=Function Set; DB4=8-bit */
    nSleep (230L); /* Wait 230 ns */

    Ah right, so not actually "doing" IIC at all. just naively calling
    "iicWrite()" not even checking the response, just waiting and
    hoping. I can see how timing could be critical for that.

    Ah, you're confused. ;) You naively assume my own iicwrite() is the same
    as a unix write().

    It's fairly clear that iicwrite take an integer (probably byte)
    parameter. I didn't miss that.

    You know what I'm thinking about as well as you understand IIC.
    You should check for an ack bit after every byte sent, and I'm not
    seeing evidence of that above.

    My apologies to you and the others who tried to get your point through
    my thick head. Jan's a polyglot. He's a superb communicator. And it
    finally sunk in.

    Now, let's talk about the ack bit you mention. You correctly note how my
    code does not look for it.
    You can blame it on this profoundly lazy guy within me. He reasons,
    "Why not let a PCF8574A take care of all of the I2C ack housekeeping for
    you?" And, presto, the PCF8574A simplifies error checks:

    void iicWrite(char iicByte) {
    rdwr.msgs[0].buf[1] = iicByte;

    if (ioctl(fd, I2CRDWR, &rdwr) < 0) {
    perror("ioctl");
    snprintf(errMessage, sizeof(errMessage), "ioctl: error %d sending write", errno);
    errorExit();
    }
    }

    In the end, it's very poor communication on my part to lazily copy-and-
    paste a "code snippet" into my followup. My plan is to ultimately write-
    up my RPi BSD version of Jan's OLED code and publish it to my website.

    Danke,

    --
    Don, KB7RPU, https://www.qsl.net/kb7rpu
    There was a young lady named Bright Whose speed was far faster than light;
    She set out one day In a relative way And returned on the previous night.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DecadentLinuxUserNumeroUno@decadenc@21:1/5 to albert@cherry. on Sat Jul 30 12:05:55 2022
    albert@cherry.(none) (albert) wrote in news:nnd$224d213a$6ed2eb7a@d7dff6696c7ccdd2:

    In article <ilhbdhp4i6lcl486j5u3gijh9a7mbrej9c@4ax.com>,
    John Larkin <xx@yy.com> wrote:
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff
    <dp@tgi-sci.com> wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware,
    like ARMs usually do. I've seen vague references to using the
    GPU to do timings.

    I'd like to measure frequencies and timestamp some edges, in
    the 1 us sort of domain, several channels. I guess we could
    hang a small FPGA off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of
    FPGAs and ARM chips, and I know a guy who would like to do the
    programming. He's a retired Fellow of United Technologies
    (Collins) who really likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer
    stuff, so we'd have to do that externally, in a small FPGA
    probably. We might have three frequency counters and maybe six
    edge time stampers in a FIFO or something. Pretty simple.

    The Raspberry pi 1 has a 64 bit counter offset 0x9100 in the
    Virtual Memory IO Space
    This is the Forth code, fetching a double precision number
    of the addres

    : TICKS ^clk 2@ ;

    This seems to be more reliable of the counters in the Intel.
    It is running at 1 Mhz.
    Others pi's (Orange pi) have similar counters.


    Some torque sensors make tricky timing waveforms.


    Groetjes Albert

    Check out the new pico W rPi...

    <https://www.raspberrypi.com/news/raspberry-pi-pico-w-your-6-iot-
    platform/>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DecadentLinuxUserNumeroUno@decadenc@21:1/5 to DecadentLinuxUserNumeroUno@decadenc on Sat Jul 30 12:11:13 2022
    DecadentLinuxUserNumeroUno@decadence.org wrote in news:tc36r3$14r9$1 @gioia.aioe.org:

    albert@cherry.(none) (albert) wrote in news:nnd$224d213a$6ed2eb7a@d7dff6696c7ccdd2:

    In article <ilhbdhp4i6lcl486j5u3gijh9a7mbrej9c@4ax.com>,
    John Larkin <xx@yy.com> wrote:
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff
    <dp@tgi-sci.com> wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware,
    like ARMs usually do. I've seen vague references to using the
    GPU to do timings.

    I'd like to measure frequencies and timestamp some edges, in
    the 1 us sort of domain, several channels. I guess we could
    hang a small FPGA off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of
    FPGAs and ARM chips, and I know a guy who would like to do the >>>programming. He's a retired Fellow of United Technologies
    (Collins) who really likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer
    stuff, so we'd have to do that externally, in a small FPGA
    probably. We might have three frequency counters and maybe six
    edge time stampers in a FIFO or something. Pretty simple.

    The Raspberry pi 1 has a 64 bit counter offset 0x9100 in the
    Virtual Memory IO Space
    This is the Forth code, fetching a double precision number
    of the addres

    : TICKS ^clk 2@ ;

    This seems to be more reliable of the counters in the Intel.
    It is running at 1 Mhz.
    Others pi's (Orange pi) have similar counters.


    Some torque sensors make tricky timing waveforms.


    Groetjes Albert

    Check out the new pico W rPi...

    <https://www.raspberrypi.com/news/raspberry-pi-pico-w-your-6-iot-
    platform/>


    Even better!

    <https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to xx@yy.com on Sat Jul 30 13:17:25 2022
    In article <ilhbdhp4i6lcl486j5u3gijh9a7mbrej9c@4ax.com>,
    John Larkin <xx@yy.com> wrote:
    On Mon, 18 Jul 2022 22:23:21 +0300, Dimiter_Popoff <dp@tgi-sci.com>
    wrote:

    On 7/18/2022 22:13, John Larkin wrote:


    The pi doesn't seem to have any general counter/timer hardware, like
    ARMs usually do. I've seen vague references to using the GPU to do
    timings.

    I'd like to measure frequencies and timestamp some edges, in the 1 us
    sort of domain, several channels. I guess we could hang a small FPGA
    off to the side if pi can't do it.

    Do pi's have crystal oscillators? I guess we could add one too.




    Are you serious about using yet another aliexpress toy for some
    real design?

    https://en.wikipedia.org/wiki/Raspberry_Pi

    Not exactly a toy. But it would save us using up our stock of FPGAs
    and ARM chips, and I know a guy who would like to do the programming.
    He's a retired Fellow of United Technologies (Collins) who really
    likes to code.


    Other than the obvious question above, does not ARM have some
    sort of timebase register as part of the core? This might be
    usable to some extent, depending on how much jitter you can
    tolerate.

    The ARM in the pi seems to have none of the usual counter/timer stuff,
    so we'd have to do that externally, in a small FPGA probably. We might
    have three frequency counters and maybe six edge time stampers in a
    FIFO or something. Pretty simple.

    The Raspberry pi 1 has a 64 bit counter offset 0x9100 in the
    Virtual Memory IO Space
    This is the Forth code, fetching a double precision number
    of the addres

    : TICKS ^clk 2@ ;

    This seems to be more reliable of the counters in the Intel.
    It is running at 1 Mhz.
    Others pi's (Orange pi) have similar counters.


    Some torque sensors make tricky timing waveforms.


    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)