Re: Grounded grid VHF front-end

Liste des GroupesRevenir à se design 
Sujet : Re: Grounded grid VHF front-end
De : antispam (at) *nospam* fricas.org (Waldek Hebisch)
Groupes : sci.electronics.design
Date : 18. Nov 2024, 22:22:26
Autres entêtes
Organisation : To protect and to server
Message-ID : <vhgb6g$2j4be$2@paganini.bofh.team>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
john larkin <JL@gct.com> wrote:
On Sun, 17 Nov 2024 14:50:58 -0000 (UTC), antispam@fricas.org (Waldek
Hebisch) wrote:
 
USB can do milliseconds, ethernet hundreds of microseconds, small
micros can do much better.  Theoretically with a micro connected via USB
one can synchronize clocks of the micro and PC with microsecond
accuracy, I plan to try this but do not know how this will work.
 
We're designing some products around the RP2040, the Pi Pico
processor.
 
Turns out that in some cases, it's easier to bit-bang an SPI interface
than program an SPI engine. To fine-tune timings in 7 ns increments,
we can use no-op instructions.
 
I wonder what's a safe c-language NOP single-clock operation that no
compiler is smart enough to optimize out and doesn't add a bunch of
loads and stores.

As JM wrote, with gcc (and I think clang too) you can use imline asm
like:

    __asm__ volatile ("nop");

gcc is supposed to keep it.  There is potential trouble with reordering,
in general gcc can move statements to a different place when it thinks
that the affect is the same.  'volatile' is supposed to prevent such
movement (gcc still may move "normal" code around it, but access to
GPIO should be volatile too and gcc will not reorder volatile
operations).

We're experimenting with that sort of timing on an oscilloscope. The
GCC or whatever code timing tools don't work in this case.

Oscilloscope is good to see what happens at the pins.  For observing
internal time one can read systick register (I did not check RP2040,
but I think it can be configured to change every clock).

Something like
 
        gpio_put(FIRST_GPIO, 1);
        gpio_put(FIRST_GPIO, 0);
        gpio_put(FIRST_GPIO, 1);
        gpio_put(FIRST_GPIO, 0);
 
Makes the port pin change every 7 ns. That's astounding. So maybe a
dummy port bang is my no-op. Just repeat what we just set it to.

I you want accuracy up to a single clock, then your code is brittle.
RP2040 is a complex device and can do many things simultaneously.
There is large potential for undesired interference.  Basically,
if you have code in a single bank of the RAM and your RP2040 is
doing nothing else than bit-banging, then you are resonably safe.
However, if SPI peripherial can do what you need, then IMO it
is better solution, as SPI is dedicated hardware block which can
operate without interference in parallel with other blocks.

--
                              Waldek Hebisch

Date Sujet#  Auteur
9 Nov 24 * Grounded grid VHF front-end62Liz Tuddenham
9 Nov 24 +* Re: Grounded grid VHF front-end36john larkin
9 Nov 24 i`* Re: Grounded grid VHF front-end35Liz Tuddenham
9 Nov 24 i `* Re: Grounded grid VHF front-end34Cursitor Doom
9 Nov 24 i  +* Re: Grounded grid VHF front-end22john larkin
9 Nov 24 i  i`* Re: Grounded grid VHF front-end21Cursitor Doom
9 Nov 24 i  i +* Re: Grounded grid VHF front-end8Liz Tuddenham
10 Nov 24 i  i i+- Re: Grounded grid VHF front-end1Jan Panteltje
10 Nov 24 i  i i`* Re: Grounded grid VHF front-end6Cursitor Doom
10 Nov 24 i  i i `* Re: Grounded grid VHF front-end5Jan Panteltje
10 Nov 24 i  i i  `* Re: Grounded grid VHF front-end4Edward Rawde
11 Nov 24 i  i i   +- Re: Grounded grid VHF front-end1Jan Panteltje
19 Nov 24 i  i i   `* Re: Grounded grid VHF front-end2Waldek Hebisch
19 Nov 24 i  i i    `- Re: Grounded grid VHF front-end1Jan Panteltje
9 Nov 24 i  i +* Re: Grounded grid VHF front-end6Joe Gwinn
10 Nov 24 i  i i`* Re: Grounded grid VHF front-end5Dan Green
10 Nov 24 i  i i `* Re: Grounded grid VHF front-end4john larkin
10 Nov 24 i  i i  `* Re: Grounded grid VHF front-end3Liz Tuddenham
10 Nov 24 i  i i   `* Re: Grounded grid VHF front-end2Ralph Mowery
10 Nov 24 i  i i    `- Re: Grounded grid VHF front-end1john larkin
9 Nov 24 i  i `* Re: Grounded grid VHF front-end6Phil Hobbs
10 Nov 24 i  i  +- Re: Grounded grid VHF front-end1Liz Tuddenham
10 Nov 24 i  i  +- Re: Grounded grid VHF front-end1Ralph Mowery
10 Nov 24 i  i  `* Re: Grounded grid VHF front-end3piglet
10 Nov 24 i  i   +- Re: Grounded grid VHF front-end1john larkin
10 Nov 24 i  i   `- Re: Grounded grid VHF front-end1Cursitor Doom
9 Nov 24 i  `* Re: Grounded grid VHF front-end11Liz Tuddenham
10 Nov 24 i   `* Re: Grounded grid VHF front-end10john larkin
10 Nov 24 i    `* Re: Grounded grid VHF front-end9Liz Tuddenham
10 Nov 24 i     `* Re: Grounded grid VHF front-end8john larkin
10 Nov 24 i      `* Re: Grounded grid VHF front-end7Liz Tuddenham
10 Nov 24 i       `* Re: Grounded grid VHF front-end6john larkin
10 Nov 24 i        +* Re: Grounded grid VHF front-end4Cursitor Doom
10 Nov 24 i        i+* Re: Grounded grid VHF front-end2john larkin
10 Nov 24 i        ii`- Re: Grounded grid VHF front-end1Cursitor Doom
11 Nov 24 i        i`- Re: Grounded grid VHF front-end1Jan Panteltje
10 Nov 24 i        `- Re: Grounded grid VHF front-end1Liz Tuddenham
10 Nov 24 +* Re: Grounded grid VHF front-end23Jan Panteltje
10 Nov 24 i+- Re: Grounded grid VHF front-end1Jan Panteltje
10 Nov 24 i`* Re: Grounded grid VHF front-end21Cursitor Doom
10 Nov 24 i `* Re: Grounded grid VHF front-end20Jan Panteltje
10 Nov 24 i  `* Re: Grounded grid VHF front-end19Cursitor Doom
10 Nov 24 i   `* Re: Grounded grid VHF front-end18Jan Panteltje
10 Nov 24 i    +* Re: Grounded grid VHF front-end3Cursitor Doom
11 Nov 24 i    i`* Re: Grounded grid VHF front-end2Jan Panteltje
11 Nov 24 i    i `- Re: Grounded grid VHF front-end1Cursitor Doom
17 Nov 24 i    `* Re: Grounded grid VHF front-end14Waldek Hebisch
17 Nov 24 i     `* Re: Grounded grid VHF front-end13Jan Panteltje
17 Nov 24 i      `* Re: Grounded grid VHF front-end12Waldek Hebisch
17 Nov 24 i       +* Re: Grounded grid VHF front-end6Jan Panteltje
17 Nov 24 i       i`* Re: Grounded grid VHF front-end5Waldek Hebisch
18 Nov 24 i       i `* Re: Grounded grid VHF front-end4Jan Panteltje
18 Nov 24 i       i  `* Re: Grounded grid VHF front-end3Waldek Hebisch
18 Nov 24 i       i   `* Re: Grounded grid VHF front-end2Jan Panteltje
18 Nov 24 i       i    `- Re: Grounded grid VHF front-end1Waldek Hebisch
17 Nov 24 i       `* Re: Grounded grid VHF front-end5john larkin
17 Nov 24 i        +* Re: Grounded grid VHF front-end2JM
17 Nov 24 i        i`- Re: Grounded grid VHF front-end1john larkin
18 Nov 24 i        `* Re: Grounded grid VHF front-end2Waldek Hebisch
19 Nov 24 i         `- Re: Grounded grid VHF front-end1john larkin
11 Nov 24 `* Re: Grounded grid VHF front-end2brian
11 Nov 24  `- Re: Grounded grid VHF front-end1Liz Tuddenham

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal