Sujet : Re: Need help with PI PICO...
De : steveo (at) *nospam* eircom.net (Ahem A Rivet's Shot)
Groupes : comp.sys.raspberry-piDate : 23. Mar 2024, 19:37:23
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240323183723.b2902fb94d75422b924c1bc7@eircom.net>
References : 1
User-Agent : Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1)
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.
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).
There's three - hopefully one of them will shed some light.
-- Steve O'Hara-SmithOdds and Ends at http://www.sohara.org/For forms of government let fools contestWhate're is best administered is best - Alexander Pope