Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

My computer can beat up your computer. -- Karl Lehenbauer


computers / comp.sys.raspberry-pi / Re: Pico - issue with interrupts and sleep??

SubjectAuthor
* Pico - issue with interrupts and sleep??Mike Scott
+* Re: Pico - issue with interrupts and sleep??David Taylor
|`- Re: Pico - issue with interrupts and sleep??The Natural Philosopher
+- Re: Pico - issue with interrupts and sleep??Dennis Lee Bieber
+* Re: Pico - issue with interrupts and sleep??The Natural Philosopher
|`* Re: Pico - issue with interrupts and sleep??Theo
| `* Re: Pico - issue with interrupts and sleep??Pancho
|  +- Re: Pico - issue with interrupts and sleep??Theo
|  +* Re: Pico - issue with interrupts and sleep??Ahem A Rivet's Shot
|  |`* Re: Pico - issue with interrupts and sleep??The Natural Philosopher
|  | `* Re: Pico - issue with interrupts and sleep??Ahem A Rivet's Shot
|  |  `- Re: Pico - issue with interrupts and sleep??The Natural Philosopher
|  `* Re: Pico - issue with interrupts and sleep??The Natural Philosopher
|   `* Re: Pico - issue with interrupts and sleep??Mike Scott
|    `* Re: Pico - issue with interrupts and sleep??David Taylor
|     `* Re: Pico - issue with interrupts and sleep??Mike Scott
|      `* Re: Pico - issue with interrupts and sleep??David Taylor
|       `* Re: Pico - issue with interrupts and sleep??Mike Scott
|        `* Re: Pico - issue with interrupts and sleep??Mike Scott
|         `* Re: Pico - issue with interrupts and sleep??David Taylor
|          `* Re: Pico - issue with interrupts and sleep??Mike Scott
|           +- Re: Pico - issue with interrupts and sleep??David Taylor
|           `- Re: Pico - issue with interrupts and sleep??The Natural Philosopher
`* Re: Pico - issue with interrupts and sleep??Pancho
 `* Re: Pico - issue with interrupts and sleep??Mike Scott
  `* Re: Pico - issue with interrupts and sleep??Pancho
   `* Re: Pico - issue with interrupts and sleep??The Natural Philosopher
    +* Re: Pico - issue with interrupts and sleep??Martin Gregorie
    |`* Re: Pico - issue with interrupts and sleep??The Natural Philosopher
    | +* Re: Pico - issue with interrupts and sleep??Ahem A Rivet's Shot
    | |`* Re: Pico - issue with interrupts and sleep??The Natural Philosopher
    | | `* Re: Pico - issue with interrupts and sleep??Ahem A Rivet's Shot
    | |  `* Re: Pico - issue with interrupts and sleep??The Natural Philosopher
    | |   `* Re: Pico - issue with interrupts and sleep??Ahem A Rivet's Shot
    | |    `- Re: Pico - issue with interrupts and sleep??The Natural Philosopher
    | `* Re: Pico - issue with interrupts and sleep??Martin Gregorie
    |  `* Re: Pico - issue with interrupts and sleep??The Natural Philosopher
    |   `- Re: Pico - issue with interrupts and sleep??Martin Gregorie
    `- Re: Pico - issue with interrupts and sleep??Ahem A Rivet's Shot

Pages:12
Re: Pico - issue with interrupts and sleep??

<uamfvu$1ntb9$4@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6794&group=comp.sys.raspberry-pi#6794

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mar...@mydomain.invalid (Martin Gregorie)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Sat, 5 Aug 2023 21:46:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <uamfvu$1ntb9$4@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uag1f5$kvms$4@dont-email.me>
<uagj6t$qs8r$1@dont-email.me> <uaj204$18qhv$1@dont-email.me>
<uakv0g$1lq8q$4@dont-email.me> <ualeff$1ntb9$1@dont-email.me>
<ualukj$1q6vr$9@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 5 Aug 2023 21:46:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a8ee72c85671cf4283ec360fff5ea6ae";
logging-data="1832297"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+cBRPiYoNQMRGUXLQn5J/BOzk+UkrQjTs="
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:NThzFegiRsMr5Su1VwX+wva8N3I=
 by: Martin Gregorie - Sat, 5 Aug 2023 21:46 UTC

On Sat, 5 Aug 2023 17:50:27 +0100, The Natural Philosopher wrote:

> ??? You cant get a browser to run PERL. If you want to use your browser
> as an almost real time interactive control interface for a remote device
> you have no choice BUT to run javaScript. It's the only language a
> browser understands.
>
True enough. Call That a brain fart: I don't feed a browser anything
except 100% HTML that's occasionally augmented with bits of PHP.

Other than that, these days I mainly write programs in C and Java,
Spamassassin extensions in Perl (not a favourite language) and use AWK for
heavy duty text manipulation and almost everything else that isn't plain
Linux/UNIX shell script.

I used to know a few assemblers: PLAN (ICL 1900 mainframes), TAL (Tandem
Nonstop systems) MC6809 and 68000 but haven't used them for years), I used
to write a lot of SQL, COBOL, RPG3 (UGH!!) and PL/1. I also wrote a tiny
bit of Algol 68 and liked that a lot - IMO a sadly neglected language.


--

Martin | martin at
Gregorie | gregorie dot org

Re: Pico - issue with interrupts and sleep??

<uanfd9$24rg2$4@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6798&group=comp.sys.raspberry-pi#6798

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Sun, 6 Aug 2023 07:42:49 +0100
Organization: A little, after lunch
Lines: 40
Message-ID: <uanfd9$24rg2$4@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uag1f5$kvms$4@dont-email.me>
<uagj6t$qs8r$1@dont-email.me> <uaj204$18qhv$1@dont-email.me>
<uakv0g$1lq8q$4@dont-email.me> <ualeff$1ntb9$1@dont-email.me>
<ualukj$1q6vr$9@dont-email.me>
<20230805182121.fca5a9b5718e634ca5ccbb1c@eircom.net>
<uam256$1qt5d$2@dont-email.me>
<20230805192011.c406d89c4e4863c8764bac78@eircom.net>
<uam81p$1rp0j$2@dont-email.me>
<20230805222541.c3d50588b62f5debda95d115@eircom.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 6 Aug 2023 06:42:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0d4179a52b400d01c1216a70961e8025";
logging-data="2256386"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MdwiQR3e3AS6l54cWPUWjTjfhixTJjuc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:Ks0nuvoZLDJrZ2vrUtCWFH0bVYs=
Content-Language: en-GB
In-Reply-To: <20230805222541.c3d50588b62f5debda95d115@eircom.net>
 by: The Natural Philosop - Sun, 6 Aug 2023 06:42 UTC

On 05/08/2023 22:25, Ahem A Rivet's Shot wrote:
> On Sat, 5 Aug 2023 20:31:05 +0100
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>
>> On 05/08/2023 19:20, Ahem A Rivet's Shot wrote:
>>> On Sat, 5 Aug 2023 18:50:30 +0100
>>> The Natural Philosopher <tnp@invalid.invalid> wrote:
>>>
>>>> On 05/08/2023 18:21, Ahem A Rivet's Shot wrote:
>>>>> On Sat, 5 Aug 2023 17:50:27 +0100
>>>>> The Natural Philosopher <tnp@invalid.invalid> wrote:
>>>>>
>>>>>> ??? You cant get a browser to run PERL.
>>>>>
>>>>> Oh yes you can :)
>
>> Yebbut the whole point was that the person I responded to said that they
>> didn't NEED JAVASCRIPT to run in a *browser*. They could run PERL
>> *instead*.
>
> Ah well that's the important missing word - you can have it as well
> but not instead. Unless you want to write a browser (perhaps in perl).
>
Oh, please don't say that. someone is sure to try to do it. And make it
run JavasShit as well.

--
If you tell a lie big enough and keep repeating it, people will
eventually come to believe it. The lie can be maintained only for such
time as the State can shield the people from the political, economic
and/or military consequences of the lie. It thus becomes vitally
important for the State to use all of its powers to repress dissent, for
the truth is the mortal enemy of the lie, and thus by extension, the
truth is the greatest enemy of the State.

Joseph Goebbels

Re: Pico - issue with interrupts and sleep??

<uanh07$2548t$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6799&group=comp.sys.raspberry-pi#6799

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Sun, 6 Aug 2023 08:09:58 +0100
Organization: A little, after lunch
Lines: 94
Message-ID: <uanh07$2548t$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uag1f5$kvms$4@dont-email.me>
<uagj6t$qs8r$1@dont-email.me> <uaj204$18qhv$1@dont-email.me>
<uakv0g$1lq8q$4@dont-email.me> <ualeff$1ntb9$1@dont-email.me>
<ualukj$1q6vr$9@dont-email.me> <uamfvu$1ntb9$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 6 Aug 2023 07:09:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0d4179a52b400d01c1216a70961e8025";
logging-data="2265373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/oHwW07NaAX62OMBAqWf1UY46MQ5e+cl8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:Wnd/VX1pUE1J+9B7Iuswq6ChfLQ=
In-Reply-To: <uamfvu$1ntb9$4@dont-email.me>
Content-Language: en-GB
 by: The Natural Philosop - Sun, 6 Aug 2023 07:09 UTC

On 05/08/2023 22:46, Martin Gregorie wrote:
> On Sat, 5 Aug 2023 17:50:27 +0100, The Natural Philosopher wrote:
>
>> ??? You cant get a browser to run PERL. If you want to use your browser
>> as an almost real time interactive control interface for a remote device
>> you have no choice BUT to run javaScript. It's the only language a
>> browser understands.
>>
> True enough. Call That a brain fart: I don't feed a browser anything
> except 100% HTML that's occasionally augmented with bits of PHP.
>
> Other than that, these days I mainly write programs in C and Java,
> Spamassassin extensions in Perl (not a favourite language) and use AWK for
> heavy duty text manipulation and almost everything else that isn't plain
> Linux/UNIX shell script.
>
> I used to know a few assemblers: PLAN (ICL 1900 mainframes), TAL (Tandem
> Nonstop systems) MC6809 and 68000 but haven't used them for years), I used
> to write a lot of SQL, COBOL, RPG3 (UGH!!) and PL/1. I also wrote a tiny
> bit of Algol 68 and liked that a lot - IMO a sadly neglected language.
>
>
All of that is probably admirable for what you do.

But not for what I want to do.

I want to control my central heating remotely via a browser interface,
in great detail and in a highly configurable way , yet with an elegant
and simple user interface.

To make it simple to use, it gets to be fiendishly complex to program.

I *could* use the hooks that are in basic HTML - the input statements
and the GET and POST methods plus refreshing the pages via submit
buttons, but that is even worse than the existing box on the wall with
its fading 20 year old LCD display and its complex and time consuming
button presses.

It's so much easier to use GUI type tools - mouse movements and scroll
wheel and button presses or drag and drop type techniques to configure
things, and these techniques simply didn't exist when HTML was first
invented. Now they are accessible, but only as JavaScript events, so I
have to use the bloody language.

And let me tell you, it's AWFUL.

I learnt SQL because I wanted to do some stuff with databases. SQL is
remarkably sane. At least for simple stuff. When it got complex I
dragged out a compiler or PHP to do the clever stuff. Because even when
I could figure out the exact SQL command to get the result I wanted with
nested joins and what have you, it took me longer to figure it out than
write C code to do it with multiple simple queries, and the C code ran
50 times faster than, at least MySQL. I cant answer for e.g. Oracle etc.

My coding career was always driven by *result* targets. I wanted to
achieve an end, what do I have to learn to do it? And I learnt enough to
do it, and *not a penny more*.

What I want to do here, requires javaScript. And some sort of server
side scripting. That could be C, C++, or PHP or almost any language
that runs on a linux server. I am sure that you could write it all in
perl or assembler, too.

But the shortest route that appeared to me some years back was PHP,
which is a hacked together POS, but its fairly simple if you don't ask
it to do huge tricks, just like MySQL. In the past I have interfaced it
with C code when it proved incapable of handling large data objects
without crashing, but it's fine for simple jobs, like taking a
javaScript Ajax requests and updating a file on the server for example.

So I have no religion about any of these languages at all. They are
just the least effort route to what I wanted to do, then and now. All of
them suck to some extent, but for me, C sucks the least. As a friend
once said 'the end result is always just bits, in silicon' and how you
get there is a choice.

I guess I could in this instance, have avoided JavaScript by
constructing a network GUI that wasn't HTML based and constructing a
custom server that wasn't Apache, to talk to it. But that would mean
compiling up what amounts to a custom 'browser' for android, OSX, IOS,
Windows...and Linux.

Nope. I'll let Firefox, et al, handle that, thank you!

So I have to use what they come with.

--
"When a true genius appears in the world, you may know him by this sign,
that the dunces are all in confederacy against him."

Jonathan Swift.

Re: Pico - issue with interrupts and sleep??

<uaoa0a$28nkp$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6812&group=comp.sys.raspberry-pi#6812

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mar...@mydomain.invalid (Martin Gregorie)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Sun, 6 Aug 2023 14:16:42 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 136
Message-ID: <uaoa0a$28nkp$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uag1f5$kvms$4@dont-email.me>
<uagj6t$qs8r$1@dont-email.me> <uaj204$18qhv$1@dont-email.me>
<uakv0g$1lq8q$4@dont-email.me> <ualeff$1ntb9$1@dont-email.me>
<ualukj$1q6vr$9@dont-email.me> <uamfvu$1ntb9$4@dont-email.me>
<uanh07$2548t$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 6 Aug 2023 14:16:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="77941cbb6eeb481237f2924fd886f7f0";
logging-data="2383513"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19YuOzVToDG1ErvKLLl5CzN8gfzb6TpWOw="
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:xFxFVs+61QYcbfxOOUAWkvHZers=
 by: Martin Gregorie - Sun, 6 Aug 2023 14:16 UTC

On Sun, 6 Aug 2023 08:09:58 +0100, The Natural Philosopher wrote:

> I want to control my central heating remotely via a browser interface,
> in great detail and in a highly configurable way , yet with an elegant
> and simple user interface.
>
I'd use Java for that. Its standard library classes for handling control
panels, menus etc are much nicer to write the GUI in (Provided you use the
generic Window/Controller/Model program structure) than anything available
in C or C++.

One of the most satisfying small personal projects I've done in Java was
to write an editor for CSV data files. Yes, I know that you can use a
spreadsheet, but they have stupid limits such as 16K rows per file and
apparently (I don't use M$ software) no warning to a user exceeding that
limit that data is being lost. Also, spreadsheets and have almost no
decent tools for search and display within a large file, let alone any
ability to search for rows containing specified value(s) and convert them
to or from comment lines. When I was roster manager at my gliding club I
needed to edit CSV files with 5000+ lines and up to 30 columns, I wrote my
own CSV editor in Java. This provides several editing features I needed
that are not available in spreadsheets and for giggles included a
scripting facility as well. It all went together much faster than I
expected, does exactly what I need and does it quickly.

The only other way to handle these edits rapidly would be to use bash:
this would be equally fast to use but would it take longer to write the
various scripts than it does to run a CSV file through my editor.

Some of the 4GL systems come close, but (a) who uses then now and (b)
there's no way they can be a front end for your sort of controller. Anyway
they get tiresome if you try to do anything with them except what they're
designed for: maintaining data in related sets of indexed files, though I
did write a Sculptor 4GL system to handle scoring for the British National
Free Flight Champs and the Stonehenge Cup. This ran on a bog standard
80286 PC in the back of a covered van and was powered by a portable
generator.


> To make it simple to use, it gets to be fiendishly complex to program.
>
> I *could* use the hooks that are in basic HTML - the input statements
> and the GET and POST methods plus refreshing the pages via submit
> buttons, but that is even worse than the existing box on the wall with
> its fading 20 year old LCD display and its complex and time consuming
> button presses.
>
That sounds nasty. For HTML pages that will be displayed by a web server I
generally stick to vanilla HTML pages with bits of PHP thrown in if I want
to accept data from an HTML page. The O'Reilly "Programming PHP" book is
pretty straight forward and is well organised, and some of the things yo
might want to do may require an HTML server (I run an Apache server at
home on my LAN).

If you'd rather stick to C, have you considered using Curses to display a
control panel and manage both status display and input of control
settings? Its a while since I've used it, but I seem to recall that it
will also accept input from on screen windows. O'Reilly have a decent
guide to it.

> It's so much easier to use GUI type tools - mouse movements and scroll
> wheel and button presses or drag and drop type techniques to configure
> things, and these techniques simply didn't exist when HTML was first
> invented. Now they are accessible, but only as JavaScript events, so I
> have to use the bloody language.
>
I tried Javascript: I tried it once and found both it and the book on it
to be poorly organised, badly written, and lacking in any overall
description of how the bloody language works and how its various parts
interact.
> And let me tell you, it's AWFUL.
>
Couldn't agree more.

But seriously, as a C man it would be worth your while at least looking at
either Curses for laying out and painting the display if its directly
attached to the MPU (i.e. is running on an RPi, and combining PHP and HTML
(they work well together) if you need anything that Curses can't handle.

> I learnt SQL because I wanted to do some stuff with databases. SQL is
> remarkably sane. At least for simple stuff. When it got complex I
> dragged out a compiler or PHP to do the clever stuff. Because even when
> I could figure out the exact SQL command to get the result I wanted with
> nested joins and what have you, it took me longer to figure it out than
> write C code to do it with multiple simple queries, and the C code ran
> 50 times faster than, at least MySQL. I cant answer for e.g. Oracle etc.
>
That's generally true. I like SQL and have used it on several different
databases and data warehouses. Its particularly well integrated into both
C and Java.

Mind you, I also liked IDMS, the CODASYL database. Its so well integrated
into COBOL that its effective a language extension.

> My coding career was always driven by *result* targets. I wanted to
> achieve an end, what do I have to learn to do it? And I learnt enough to
> do it, and *not a penny more*.
>
I thought that was a fairly general approach, at least in the better
software houses. Certainly I was used to be asked what I knew about 'x'
and,if my answer was 'heard of but not used' and it was within my
skillset, getting a heal of manuals dumped on my desk and told 'You're on
the project starting week after next' and also knowing that, if I was
struggling, somebody I could talk to about 'x' would be in the pub on
Friday.

> What I want to do here, requires javaScript. And some sort of server
> side scripting. That could be C, C++, or PHP or almost any language
> that runs on a linux server. I am sure that you could write it all in
> perl or assembler, too.
>
See above except that, assuming that your application drives the display
directly, I'd look at Java or C plus Curses, and PHP if absolutely
necessary - I've used PHP and quite like it, combined with HTML, for pages
managed by an Apache server..

> But the shortest route that appeared to me some years back was PHP,
> which is a hacked together POS, but its fairly simple if you don't ask
> it to do huge tricks, just like MySQL. In the past I have interfaced it
> with C code when it proved incapable of handling large data objects
> without crashing, but it's fine for simple jobs, like taking a
> javaScript Ajax requests and updating a file on the server for example.
>
I suspect its not meant to work that way, which is why I suggested using
Curses for output to the screen and PHP only to read user input to the
screen.

Of course, Java does both pretty much seamlessly, but seeing that you
prefer C,...

--

Martin | martin at
Gregorie | gregorie dot org

Re: Pico - issue with interrupts and sleep??

<uavp8g$3t5ig$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6893&group=comp.sys.raspberry-pi#6893

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED.scottsonline.org.uk!not-for-mail
From: usenet...@scottsonline.org.uk.invalid (Mike Scott)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Wed, 9 Aug 2023 11:19:59 +0100
Organization: Scott family
Message-ID: <uavp8g$3t5ig$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uaf51r$g063$4@dont-email.me>
<G9j*Qe0mz@news.chiark.greenend.org.uk> <uaj21p$18naf$1@dont-email.me>
<uakv1t$1lq8q$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 9 Aug 2023 10:20:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="scottsonline.org.uk:51.148.134.104";
logging-data="4101712"; mail-complaints-to="abuse@eternal-september.org"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Content-Language: en-GB
In-Reply-To: <uakv1t$1lq8q$5@dont-email.me>
 by: Mike Scott - Wed, 9 Aug 2023 10:19 UTC

On 05/08/2023 08:51, The Natural Philosopher wrote:
> On 04/08/2023 15:30, Pancho wrote:
>> On 04/08/2023 15:01, Theo wrote:
>>> The Natural Philosopher <tnp@invalid.invalid> wrote:
>>>> Well, bare metal programming is what it is. Now if someone wrote a
>>>> software emulator for a PICO we could debug the thing...
>>>
>>> https://github.com/wokwi/rp2040js
>>
>> What are the chances an emulator would model a race condition accurately?
>
> As good as the person who wrote it chose to make it.

[OP]
On which note, I'll add where I've got to, as it looks like a race
condition somewhere although whether in the micropython system or the
chip, I have no idea.

I'm including a little test program that has a 10ms timer interrupt
within which time.sleep_us() is called to provide a short delay. The
main part of the code does a sleep for a second and checks an
appropriate number of interrupts has occurred, printing the count. A
couple of led's are toggled so I can see it's still running.

For delays < 5usec or > 100usec, no problem and it seems to run forever.
For delays in the range 10..20 usec, the program will eventually hang -
no interrupts and main loop stuck.

The tm1637 module uses delays of 10usec when clocking the chip, right in
the 'hang' range. Changing that 10 usec delay for two 5 usec delays
seems to work round the issue, and I've since had my clock program run
for nearly 24 hours without issue.

I'd be interested whether others get the same results from the test
program (on a picoW to be precise). It needs to run for an extended
period. Mind the line wrap.

import machine
import time

mainLoopTime = 1000 # msec
interruptPeriod = 10 # msec (must be same units as mainlooptime)
usleepDelay = 5 # microsec
# no dlay good to 138200
# 1 us good to 188000
# 5 us good to 395200
# 10 us fails
# 15 us fail 14010
# 20 us fails 26600
# 100 us good to 372000

interruptCounter = 0

led = machine.Pin("LED", machine.Pin.OUT)
xled = machine.Pin(0, machine.Pin.OUT)

def update(timer):
global interruptCounter

interruptCounter += 1
if usleepDelay != 0:
time.sleep_us(usleepDelay)
if interruptCounter % 32 == 0:
xled.toggle()

timer = machine.Timer(mode=machine.Timer.PERIODIC,
period=interruptPeriod, callback=update)

lastCounter = interruptCounter
while(True):
time.sleep_ms(mainLoopTime)
led.toggle()
copyIC = interruptCounter
expectedCounter = lastCounter + mainLoopTime//interruptPeriod
print(expectedCounter, copyIC)
if abs(copyIC - expectedCounter) > 5:
print(copyIC, expectedCounter, lastCounter, " delay", usleepDelay)
raise Exception("**** problem ****")
lastCounter = copyIC

--
Mike Scott
Harlow, England

Re: Pico - issue with interrupts and sleep??

<ub29td$9umq$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6904&group=comp.sys.raspberry-pi#6904

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED.94.173.109.94!not-for-mail
From: david-ta...@blueyonder.co.uk.invalid (David Taylor)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Thu, 10 Aug 2023 10:16:29 +0100
Organization: A noiseless patient Spider
Message-ID: <ub29td$9umq$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uaf51r$g063$4@dont-email.me>
<G9j*Qe0mz@news.chiark.greenend.org.uk> <uaj21p$18naf$1@dont-email.me>
<uakv1t$1lq8q$5@dont-email.me> <uavp8g$3t5ig$1@dont-email.me>
Reply-To: david-taylor@blueyonder.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 10 Aug 2023 09:16:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="94.173.109.94";
logging-data="326362"; mail-complaints-to="abuse@eternal-september.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Content-Language: en-GB
In-Reply-To: <uavp8g$3t5ig$1@dont-email.me>
 by: David Taylor - Thu, 10 Aug 2023 09:16 UTC

On 09/08/2023 11:19, Mike Scott wrote:
> I'd be interested whether others get the same results from the test
> program (on a picoW to be precise). It needs to run for an extended
> period. Mind the line wrap.

In another context, I needed to run a physical Pico-W but with the Wi-Fi
disabled (to get more memory). I can test your program, but have you tried
running the plain Pico firmware, rather than the Pico-W one?
--
Cheers,
David
Web: https://www.satsignal.eu

Re: Pico - issue with interrupts and sleep??

<ubd97m$2b7rv$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6978&group=comp.sys.raspberry-pi#6978

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: usenet...@scottsonline.org.uk.invalid (Mike Scott)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Mon, 14 Aug 2023 14:12:21 +0100
Organization: Scott family
Lines: 29
Message-ID: <ubd97m$2b7rv$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uaf51r$g063$4@dont-email.me>
<G9j*Qe0mz@news.chiark.greenend.org.uk> <uaj21p$18naf$1@dont-email.me>
<uakv1t$1lq8q$5@dont-email.me> <uavp8g$3t5ig$1@dont-email.me>
<ub29td$9umq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 14 Aug 2023 13:12:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="83975a4832d33e97689547fa2eab640f";
logging-data="2465663"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18c3vZFQUGk0jwuMplWvnFiRfgAimKJs6U="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:5IwyH/m0QCcu3LOW7wcBBTRxPSg=
In-Reply-To: <ub29td$9umq$1@dont-email.me>
Content-Language: en-GB
 by: Mike Scott - Mon, 14 Aug 2023 13:12 UTC

On 10/08/2023 10:16, David Taylor wrote:
> On 09/08/2023 11:19, Mike Scott wrote:
>> I'd be interested whether others get the same results from the test
>> program (on a picoW to be precise). It needs to run for an extended
>> period. Mind the line wrap.
>
> In another context, I needed to run a physical Pico-W but with the Wi-Fi
> disabled (to get more memory).  I can test your program, but have you
> tried running the plain Pico firmware, rather than the Pico-W one?

I have now.

I was running rp2-pico-w-20230422-unstable-v1.19.1-1019-g9e6885ad8.uf2
which I've replaced with rp2-pico-20230426-v1.20.0.uf2 which seems to be
the latest for the plain pico.

That fails as well.

Likewise rp2-pico-w-20230426-v1.20.0.uf2 (the latest picoW) fails.

Is there anywhere to report this sort of bug? I'm hoping it's a
micropython software issue, not a board fault.

--
Mike Scott
Harlow, England

Re: Pico - issue with interrupts and sleep??

<ubdfad$2635m$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6979&group=comp.sys.raspberry-pi#6979

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david-ta...@blueyonder.co.uk.invalid (David Taylor)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Mon, 14 Aug 2023 15:56:13 +0100
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <ubdfad$2635m$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uaf51r$g063$4@dont-email.me>
<G9j*Qe0mz@news.chiark.greenend.org.uk> <uaj21p$18naf$1@dont-email.me>
<uakv1t$1lq8q$5@dont-email.me> <uavp8g$3t5ig$1@dont-email.me>
<ub29td$9umq$1@dont-email.me> <ubd97m$2b7rv$1@dont-email.me>
Reply-To: david-taylor@blueyonder.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 14 Aug 2023 14:56:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9c3273e9c1a8d115eecad967e710b88e";
logging-data="2297014"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wMUow2B5OOHqBxda7AMcRArap44P5cpM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:IeRpVZoQmWZs6jsv0P4rV1GBI3c=
Content-Language: en-GB
In-Reply-To: <ubd97m$2b7rv$1@dont-email.me>
 by: David Taylor - Mon, 14 Aug 2023 14:56 UTC

On 14/08/2023 14:12, Mike Scott wrote:
> I have now.
>
> I was running rp2-pico-w-20230422-unstable-v1.19.1-1019-g9e6885ad8.uf2
> which I've replaced with rp2-pico-20230426-v1.20.0.uf2 which seems to be
> the latest for the plain pico.
>
> That fails as well.
>
> Likewise rp2-pico-w-20230426-v1.20.0.uf2 (the latest picoW) fails.
>
>
> Is there anywhere to report this sort of bug? I'm hoping it's a
> micropython software issue, not a board fault.

I have these:

pimoroni-picow-v1.20.3-micropython.uf2
pimoroni-pico-v1.20.3-micropython.uf2

which sound later than yours, and I see 120.4 is out:

https://github.com/pimoroni/pimoroni-pico/releases/tag/v1.20.4

You could report an issue here:

https://github.com/pimoroni/pimoroni-pico/issues

or on their forums:

https://forums.pimoroni.com/

I've found them quite helpful.

To add to the confusion there's a new MicroPython out, but I don't know whether
it's tested/approved for Pimoroni stuff....
--
Cheers,
David
Web: https://www.satsignal.eu

Re: Pico - issue with interrupts and sleep??

<ubj1ti$3cuia$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6996&group=comp.sys.raspberry-pi#6996

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: usenet...@scottsonline.org.uk.invalid (Mike Scott)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Wed, 16 Aug 2023 18:44:17 +0100
Organization: Scott family
Lines: 59
Message-ID: <ubj1ti$3cuia$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uaf51r$g063$4@dont-email.me>
<G9j*Qe0mz@news.chiark.greenend.org.uk> <uaj21p$18naf$1@dont-email.me>
<uakv1t$1lq8q$5@dont-email.me> <uavp8g$3t5ig$1@dont-email.me>
<ub29td$9umq$1@dont-email.me> <ubd97m$2b7rv$1@dont-email.me>
<ubdfad$2635m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 16 Aug 2023 17:44:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="acdb014a71bd75e9b7dfc104b12d2849";
logging-data="3570250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+L36xtL4PLCiIYoL5RsZg7aRN3Kp5vc/I="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:RZ8sDMxQiLKq2c6jfBmwa3s4vUA=
In-Reply-To: <ubdfad$2635m$1@dont-email.me>
Content-Language: en-GB
 by: Mike Scott - Wed, 16 Aug 2023 17:44 UTC

On 14/08/2023 15:56, David Taylor wrote:
> On 14/08/2023 14:12, Mike Scott wrote:
>> I have now.
>>
>> I was running rp2-pico-w-20230422-unstable-v1.19.1-1019-g9e6885ad8.uf2
>> which I've replaced with rp2-pico-20230426-v1.20.0.uf2 which seems to be
>> the latest for the plain pico.
>>
>> That fails as well.
>>
>> Likewise rp2-pico-w-20230426-v1.20.0.uf2 (the latest picoW) fails.
>>
>>
>> Is there anywhere to report this sort of bug? I'm hoping it's a
>> micropython software issue, not a board fault.
>
> I have these:
>
>   pimoroni-picow-v1.20.3-micropython.uf2
>   pimoroni-pico-v1.20.3-micropython.uf2
>
....
Thanks for the info.

I've now tried pimoroni-picow-v1.20.4-micropython - that's worse than
ever, crashing much sooner for the problem range. (I notice the file is
significantly larger than 1.19.1 or 1.20.0)

On the bright side, it does suggest the issue is in the micropython
rather than being a chip problem.

I've found the following; the number indicates the number of loops of my
test rig recorded either at failure or when my patience ran out.
# these times for firmware 1.19.0 or 1.20.0 (mixed)
# no dlay good to 138200
# 1 us good to 188000
# 5 us good to 395200
# 7 us good to 335146
# 10 us fails 14410
# 15 us fail 14010
# 20 us fails 26600
# 30 fails 261893
# 32 fails 42430
# 35 us good to 421110
# 40 us good to 378478
# 50 good to 572000
# 100 us good to 372000

There really does seem to be a window when sleeping from just under 10
to just under 35 us where interrupts seem to fail eventually.

Weird.

I'll see if I can get to grips with the github bug reporting.

--
Mike Scott
Harlow, England

Re: Pico - issue with interrupts and sleep??

<ubl7li$3pnqo$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6998&group=comp.sys.raspberry-pi#6998

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: usenet...@scottsonline.org.uk.invalid (Mike Scott)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Thu, 17 Aug 2023 14:34:42 +0100
Organization: Scott family
Lines: 23
Message-ID: <ubl7li$3pnqo$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uaf51r$g063$4@dont-email.me>
<G9j*Qe0mz@news.chiark.greenend.org.uk> <uaj21p$18naf$1@dont-email.me>
<uakv1t$1lq8q$5@dont-email.me> <uavp8g$3t5ig$1@dont-email.me>
<ub29td$9umq$1@dont-email.me> <ubd97m$2b7rv$1@dont-email.me>
<ubdfad$2635m$1@dont-email.me> <ubj1ti$3cuia$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 17 Aug 2023 13:34:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9dde6bdf426d6e513e357e930d16f1ed";
logging-data="3989336"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rwywrkYMOfi9Mfdfs04hGk5A8ikvFW1U="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:WRFvvHFxQ/daldL/baSahtsMV58=
In-Reply-To: <ubj1ti$3cuia$1@dont-email.me>
Content-Language: en-GB
 by: Mike Scott - Thu, 17 Aug 2023 13:34 UTC

On 16/08/2023 18:44, Mike Scott wrote:
.....
> There really does seem to be a window when sleeping from just under 10
> to just under 35 us where interrupts seem to fail eventually.
>
> Weird.

What's more, it only seems to affect the picoW.

I've tried two W's now, and one without the wifi.

Both W's fail the same way; I've not seen the plain one fail.

Can anyone replicate this please?

>
> I'll see if I can get to grips with the github bug reporting.

--
Mike Scott
Harlow, England

Re: Pico - issue with interrupts and sleep??

<ublobu$3l73c$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=6999&group=comp.sys.raspberry-pi#6999

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david-ta...@blueyonder.co.uk.invalid (David Taylor)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Thu, 17 Aug 2023 19:19:42 +0100
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <ublobu$3l73c$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uaf51r$g063$4@dont-email.me>
<G9j*Qe0mz@news.chiark.greenend.org.uk> <uaj21p$18naf$1@dont-email.me>
<uakv1t$1lq8q$5@dont-email.me> <uavp8g$3t5ig$1@dont-email.me>
<ub29td$9umq$1@dont-email.me> <ubd97m$2b7rv$1@dont-email.me>
<ubdfad$2635m$1@dont-email.me> <ubj1ti$3cuia$1@dont-email.me>
<ubl7li$3pnqo$1@dont-email.me>
Reply-To: david-taylor@blueyonder.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 17 Aug 2023 18:19:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0de7b4592c0252a7066ec2965e119abb";
logging-data="3841132"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YXL2PP3+0ssq1iDrfL1boSXfoZRUMIkg="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:J4vUzYeLYTlG36XCPJh/HjqRN84=
In-Reply-To: <ubl7li$3pnqo$1@dont-email.me>
Content-Language: en-GB
 by: David Taylor - Thu, 17 Aug 2023 18:19 UTC

On 17/08/2023 14:34, Mike Scott wrote:
> On 16/08/2023 18:44, Mike Scott wrote:
> ....
>> There really does seem to be a window when sleeping from just under 10
>> to just under 35 us where interrupts seem to fail eventually.
>>
>> Weird.
>
> What's more, it only seems to affect the picoW.
>
> I've tried two W's now, and one without the wifi.
>
> Both W's fail the same way; I've not seen the plain one fail.
>
> Can anyone replicate this please?
>
>
>>
>> I'll see if I can get to grips with the github bug reporting.
>

Can you point to some test code, and brief instructions, please?
--
Cheers,
David
Web: https://www.satsignal.eu

Re: Pico - issue with interrupts and sleep??

<ubn962$6cvn$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=7001&group=comp.sys.raspberry-pi#7001

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: usenet...@scottsonline.org.uk.invalid (Mike Scott)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Fri, 18 Aug 2023 09:12:49 +0100
Organization: Scott family
Lines: 52
Message-ID: <ubn962$6cvn$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uaf51r$g063$4@dont-email.me>
<G9j*Qe0mz@news.chiark.greenend.org.uk> <uaj21p$18naf$1@dont-email.me>
<uakv1t$1lq8q$5@dont-email.me> <uavp8g$3t5ig$1@dont-email.me>
<ub29td$9umq$1@dont-email.me> <ubd97m$2b7rv$1@dont-email.me>
<ubdfad$2635m$1@dont-email.me> <ubj1ti$3cuia$1@dont-email.me>
<ubl7li$3pnqo$1@dont-email.me> <ublobu$3l73c$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 18 Aug 2023 08:12:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1ae9b24baf838436f4abb342e4560c20";
logging-data="209911"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jwVc09o6AQfozGpdfEqTeybhI/YdPPTk="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:wRELwR6e11eqSO9p1Hnt8pc/lsg=
In-Reply-To: <ublobu$3l73c$1@dont-email.me>
Content-Language: en-GB
 by: Mike Scott - Fri, 18 Aug 2023 08:12 UTC

On 17/08/2023 19:19, David Taylor wrote:
> On 17/08/2023 14:34, Mike Scott wrote:
>> On 16/08/2023 18:44, Mike Scott wrote:
>> ....
>>> There really does seem to be a window when sleeping from just under 10
>>> to just under 35 us where interrupts seem to fail eventually.
>>>
>>> Weird.
>>
>> What's more, it only seems to affect the picoW.
>>
>> I've tried two W's now, and one without the wifi.
>>
>> Both W's fail the same way; I've not seen the plain one fail.
>>
>> Can anyone replicate this please?
>>
>>
>>>
>>> I'll see if I can get to grips with the github bug reporting.
>>
>
> Can you point to some test code, and brief instructions, please?

Test code is two articles up-thread.

I've also posted to the raspberry pi forum. Thread is at
https://forums.raspberrypi.com/viewtopic.php?t=355111

(which also includes the test code minus the python indents)

with another's notes at
https://forums.raspberrypi.com/viewtopic.php?t=312874
(including his test rig)

It seems a problem in micropython has been known about for a couple of
years, but hasn't been fixed.

For completeness though, I've tried again running the code on a plain
pico. It did fail this morning, but ran for maybe 20x more interrupts
than the picoW before hanging.

Frankly, I'm saddened. So much promise. The board is great, but firmware
that "usually works" is IMO broken and not to be trusted. So I guess
it's the bin for micropython, and I'll have to see about a replacement,
probably C++, SDK. Maybe more luck there.

--
Mike Scott
Harlow, England

Re: Pico - issue with interrupts and sleep??

<ubncnk$5708$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=7002&group=comp.sys.raspberry-pi#7002

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david-ta...@blueyonder.co.uk.invalid (David Taylor)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Fri, 18 Aug 2023 10:13:24 +0100
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <ubncnk$5708$1@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uaf51r$g063$4@dont-email.me>
<G9j*Qe0mz@news.chiark.greenend.org.uk> <uaj21p$18naf$1@dont-email.me>
<uakv1t$1lq8q$5@dont-email.me> <uavp8g$3t5ig$1@dont-email.me>
<ub29td$9umq$1@dont-email.me> <ubd97m$2b7rv$1@dont-email.me>
<ubdfad$2635m$1@dont-email.me> <ubj1ti$3cuia$1@dont-email.me>
<ubl7li$3pnqo$1@dont-email.me> <ublobu$3l73c$1@dont-email.me>
<ubn962$6cvn$1@dont-email.me>
Reply-To: david-taylor@blueyonder.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 18 Aug 2023 09:13:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="efefa53f5cc638ebf62ce1499383a0b4";
logging-data="171016"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Nqe2A8JKPh2SMlkBrOrxPYYHliTmf7PQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:r2fopO6W6WzPS6P4fYC2QUe+CGM=
Content-Language: en-GB
In-Reply-To: <ubn962$6cvn$1@dont-email.me>
 by: David Taylor - Fri, 18 Aug 2023 09:13 UTC

On 18/08/2023 09:12, Mike Scott wrote:
> Test code is two articles up-thread.
>
> I've also posted to the raspberry pi forum. Thread is at
> https://forums.raspberrypi.com/viewtopic.php?t=355111
>
> (which also includes the test code minus the python indents)
>
> with another's notes at
> https://forums.raspberrypi.com/viewtopic.php?t=312874
> (including his test rig)
>
> It seems a problem in micropython has been known about for a couple of
> years, but hasn't been fixed.
>
> For completeness though, I've tried again running the code on a plain
> pico. It did fail this morning, but ran for maybe 20x more interrupts
> than the picoW before hanging.
>
> Frankly, I'm saddened. So much promise. The board is great, but firmware
> that "usually works" is IMO broken and not to be trusted. So I guess
> it's the bin for micropython, and I'll have to see about a replacement,
> probably C++, SDK. Maybe more luck there.

Downloaded and testing with firmware 1.20.4 from:

https://github.com/pimoroni/pimoroni-pico/releases/tag/v1.20.4

With a 15 us sleep delay, the program stopped running at 3902. LED
continuously lit, no error message printed.

Second run: 5203, LED dark. Device warmer, perhaps?

Third run: 2601, LED dark.

All these are near multiples of 1300, aren't they. Chance, or....

Fourth run: 3601, LED lit, so not 1300!

--
Cheers,
David
Web: https://www.satsignal.eu

Re: Pico - issue with interrupts and sleep??

<ubnef8$73pr$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=7003&group=comp.sys.raspberry-pi#7003

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pico - issue with interrupts and sleep??
Date: Fri, 18 Aug 2023 10:43:04 +0100
Organization: A little, after lunch
Lines: 65
Message-ID: <ubnef8$73pr$2@dont-email.me>
References: <uadvdo$5dbb$1@dont-email.me> <uaf51r$g063$4@dont-email.me>
<G9j*Qe0mz@news.chiark.greenend.org.uk> <uaj21p$18naf$1@dont-email.me>
<uakv1t$1lq8q$5@dont-email.me> <uavp8g$3t5ig$1@dont-email.me>
<ub29td$9umq$1@dont-email.me> <ubd97m$2b7rv$1@dont-email.me>
<ubdfad$2635m$1@dont-email.me> <ubj1ti$3cuia$1@dont-email.me>
<ubl7li$3pnqo$1@dont-email.me> <ublobu$3l73c$1@dont-email.me>
<ubn962$6cvn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 18 Aug 2023 09:43:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7179f08ab2177105fecc6bec380e59d6";
logging-data="233275"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+faoPXx4uWlGOUnFt105vGKukwNLtdvSk="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:JDcZtHhkTBlkVCe+r0UjOS5LaEQ=
Content-Language: en-GB
In-Reply-To: <ubn962$6cvn$1@dont-email.me>
 by: The Natural Philosop - Fri, 18 Aug 2023 09:43 UTC

On 18/08/2023 09:12, Mike Scott wrote:
> On 17/08/2023 19:19, David Taylor wrote:
>> On 17/08/2023 14:34, Mike Scott wrote:
>>> On 16/08/2023 18:44, Mike Scott wrote:
>>> ....
>>>> There really does seem to be a window when sleeping from just under 10
>>>> to just under 35 us where interrupts seem to fail eventually.
>>>>
>>>> Weird.
>>>
>>> What's more, it only seems to affect the picoW.
>>>
>>> I've tried two W's now, and one without the wifi.
>>>
>>> Both W's fail the same way; I've not seen the plain one fail.
>>>
>>> Can anyone replicate this please?
>>>
>>>
>>>>
>>>> I'll see if I can get to grips with the github bug reporting.
>>>
>>
>> Can you point to some test code, and brief instructions, please?
>
> Test code is two articles up-thread.
>
> I've also posted to the raspberry pi forum. Thread is at
> https://forums.raspberrypi.com/viewtopic.php?t=355111
>
> (which also includes the test code minus the python indents)
>
> with another's notes at
> https://forums.raspberrypi.com/viewtopic.php?t=312874
> (including his test rig)
>
> It seems a problem in micropython has been known about for a couple of
> years, but hasn't been fixed.
>
> For completeness though, I've tried again running the code on a plain
> pico. It did fail this morning, but ran for maybe 20x more interrupts
> than the picoW before hanging.
>
> Frankly, I'm saddened. So much promise. The board is great, but firmware
> that "usually works" is IMO broken and not to be trusted. So I guess
> it's the bin for micropython, and I'll have to see about a replacement,
> probably C++, SDK. Maybe more luck there.
>
>

You do eliminate at least one more layer of uncertainty with C, in that
you can see (sic!) exactly what the assembler code is doing.
I know from experience it is all to easy to write a bit of 'code that
must not be interrupted' and not realise it needs to be surrounded by a
pair of 'disable/enable interrupt' instructions...and it is just things
like timers that get interrupted by timer interrupts that are likely to
blow things up.

--
In a Time of Universal Deceit, Telling the Truth Is a Revolutionary Act.

- George Orwell

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor