Re: Need help with PI PICO...

Liste des GroupesRevenir à cs raspberry-pi 
Sujet : Re: Need help with PI PICO...
De : tnp (at) *nospam* invalid.invalid (The Natural Philosopher)
Groupes : comp.sys.raspberry-pi
Date : 24. Mar 2024, 00:20:34
Autres entêtes
Organisation : A little, after lunch
Message-ID : <utnkjj$3t5m0$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 23/03/2024 18:37, Ahem A Rivet's Shot wrote:
On Sat, 23 Mar 2024 17:45:05 +0000
The Natural Philosopher <tnp@invalid.invalid> wrote:
 
It would seem from the pin states that it gets permanently stuck in

>
while(!gpio_get(ULTRASONIC_IN))
;
>
Can anyone cast any light on this one?
>
Or suggest a bug hunting methodology?
  Assuming you have access to the source of gpio_get() instrument the
inside of it with tracers (I'd use printf if there's anything listening to
stdout - otherwise find somewhere to put breadcrumbs that you can see in
real time (in ancient times I'd just watch the blinkenlights). Wait for it
to lock up and see what it's doing.
 
Well I did. That's how I got this far.
I know it enters the routine, but never leaves, and the lack of GPIO voltage suggest it is being stuck where it is.
My choice tree  is between the GPIO out signal never being received by the ultrasonic module, or the GPIO in signal is being missed by the Pi PICO on account of possibly some interrupt masking its appearance until it is too late and its gone low again.

Alternatively run it under strace or similar and wait for it to
lock up or wait for it to lock up and attach gdb (you'll want to compile
with -g for that).
 
AIUI those are linux tools.
We are running bare metal-ish here.
Back in the day I would have used a chip emulator with hardware break points.
And a cost of hundreds of thousands.

There's three - hopefully one of them will shed some light.
 
It's odd, it may be something to do with short ultrasonic distances.  I have the PCB just lolling around on the desk, and facing a wall a few inches away seemed to make it crash moire predictably
--
“Puritanism: The haunting fear that someone, somewhere, may be happy.”
H.L. Mencken, A Mencken Chrestomathy

Date Sujet#  Auteur
23 Mar 24 * Need help with PI PICO...35The Natural Philosopher
23 Mar 24 +* Re: Need help with PI PICO...30Ahem A Rivet's Shot
24 Mar 24 i`* Re: Need help with PI PICO...29The Natural Philosopher
24 Mar 24 i +* Re: Need help with PI PICO...27Ahem A Rivet's Shot
24 Mar 24 i i`* Re: Need help with PI PICO...26The Natural Philosopher
25 Mar 24 i i `* Re: Need help with PI PICO...25Pancho
25 Mar 24 i i  `* Re: Need help with PI PICO...24The Natural Philosopher
26 Mar 24 i i   +- Re: Need help with PI PICO...1The Natural Philosopher
26 Mar 24 i i   +* Re: Need help with PI PICO...6Ahem A Rivet's Shot
26 Mar 24 i i   i`* Re: Need help with PI PICO...5The Natural Philosopher
26 Mar 24 i i   i `* Re: Need help with PI PICO...4David Higton
27 Mar 24 i i   i  `* Re: Need help with PI PICO...3The Natural Philosopher
28 Mar 24 i i   i   `* Re: Need help with PI PICO...2Robert Riches
28 Mar 24 i i   i    `- Re: Need help with PI PICO...1The Natural Philosopher
26 Mar 24 i i   +* Re: Need help with PI PICO...12Pancho
27 Mar 24 i i   i`* Re: Need help with PI PICO...11The Natural Philosopher
27 Mar 24 i i   i +* Re: Need help with PI PICO...2David Higton
27 Mar 24 i i   i i`- Re: Need help with PI PICO...1The Natural Philosopher
29 Mar 24 i i   i `* Re: Need help with PI PICO...8Pancho
29 Mar 24 i i   i  +* Re: Need help with PI PICO...6The Natural Philosopher
29 Mar 24 i i   i  i+* Re: Need help with PI PICO...2Pancho
29 Mar 24 i i   i  ii`- Re: Need help with PI PICO...1The Natural Philosopher
30 Mar 24 i i   i  i`* Re: Need help with PI PICO...3The Natural Philosopher
30 Mar 24 i i   i  i `* Re: Need help with PI PICO...2Pancho
30 Mar 24 i i   i  i  `- Re: Need help with PI PICO...1The Natural Philosopher
29 Mar 24 i i   i  `- Re: Need help with PI PICO...1druck
28 Mar 24 i i   +* Re: Need help with PI PICO...2Björn Lundin
28 Mar 24 i i   i`- Re: Need help with PI PICO...1The Natural Philosopher
29 Mar 24 i i   `* Re: Need help with PI PICO...2Michael Schwingen
29 Mar 24 i i    `- Re: Need help with PI PICO...1The Natural Philosopher
24 Mar 24 i `- Re: Need help with PI PICO...1Michael Schwingen
24 Mar 24 `* Re: Need help with PI PICO...4Theo
24 Mar 24  `* Re: Need help with PI PICO...3The Natural Philosopher
24 Mar 24   +- Re: Need help with PI PICO...1Michael Schwingen
24 Mar 24   `- Re: Need help with PI PICO...1Theo

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal