Search found 96 matches

by martincho
Tue Jul 05, 2022 1:59 am
Forum: General Discussion and Questions
Topic: How to brick your Pico in one easy step?
Replies: 7
Views: 3782

Re: How to brick your Pico in one easy step?

Just to be clear, this isn't "bricked" in the way the term is conventionally used as it can be trivially recovered via the bootloader. What you have done is flash the equivalent of a "while(1) {}" loop if you were using the Pico-SDK directly. "Bricked" would mean, functionally equivalent to, well, ...
by martincho
Mon Jul 04, 2022 9:32 pm
Forum: General Discussion and Questions
Topic: How to brick your Pico in one easy step?
Replies: 7
Views: 3782

How to brick your Pico in one easy step?

This is a continuation of a prior post. I just wanted to make it stand on its own with a clear description of the problem for anyone to reproduce. MicroPython v1.18 on Pico from time import sleep, ticks_ms, ticks_diff import micropython import machine def main(): led0 = machine.Pin(25, machine.Pin.O...
by martincho
Mon Jul 04, 2022 6:40 am
Forum: General Discussion and Questions
Topic: Locked out of Pico after main runs?
Replies: 6
Views: 3370

Re: Locked out of Pico after main runs?

Perhaps related... An interesting thing I've seen is that the very first print command issues might print all characters but one. It happens randomly. The very first thing my program prints is a short tuple identifier: (230, 96, 145, 3, 195, 28, 111, 41) Every so often the last parenthesis does not ...
by martincho
Mon Jul 04, 2022 6:33 am
Forum: General Discussion and Questions
Topic: Locked out of Pico after main runs?
Replies: 6
Views: 3370

Re: Locked out of Pico after main runs?

Ah. I am running 1.18. I'll switch to 1.19.1 and see if anything changes. I didn't update just to avoid surprises...but now I have a surprise of my own, so it might be worth it.

Thanks. I'll report back once I get a chance to do it.
by martincho
Mon Jul 04, 2022 6:20 am
Forum: General Discussion and Questions
Topic: Locked out of Pico after main runs?
Replies: 6
Views: 3370

Re: Locked out of Pico after main runs?

What's happening is interesting. I think it also affects the conventional UARTS. I have reduced the load sleep time down to 10 seconds and everything still works fine. I'll ignore Thonny for now. Don't need it for the real application. What I do need is to be able to connect to the USB serial port t...
by martincho
Mon Jul 04, 2022 3:51 am
Forum: General Discussion and Questions
Topic: Locked out of Pico after main runs?
Replies: 6
Views: 3370

Re: Locked out of Pico after main runs?

UPDATE: I took another Pico and started over. I'm kind of glad I am doing this on a Pico rather than our custom boards. It would not be fun to "brick" them this way (although, I suspect they could be unbricked using SWD...I just don't have the time to go down that rabbit hole). Anyhow, I installed t...
by martincho
Mon Jul 04, 2022 3:02 am
Forum: General Discussion and Questions
Topic: Locked out of Pico after main runs?
Replies: 6
Views: 3370

Locked out of Pico after main runs?

I've been developing without many issues for several weeks. The workflow has been: Edit code on PyCharm Pro -> use Thonny to send file to Pico -> Use Thonny to run the file (not necessarily main.py). Today I added a "main.py" that simply imports "app.py" from a release directory on the Pico. It's a ...
by martincho
Thu Jun 30, 2022 7:13 am
Forum: General Discussion and Questions
Topic: bits to bytes
Replies: 58
Views: 25651

Re: bits to bytes

jimmo wrote:
Thu Jun 30, 2022 4:53 am
"you should be able to make your eyes only read the green text and still know exactly what the code does and why"
Could not agree more.
by martincho
Thu Jun 30, 2022 4:30 am
Forum: General Discussion and Questions
Topic: bits to bytes
Replies: 58
Views: 25651

Re: bits to bytes

Regarding bytes/bytearrays. When I need to get into the details I tend to use this simple hex dump tool I wrote. It makes it far easier to look at data, from, say, a communications protocol or a chip you might be talking to. FYI, https://github.com/micropython/micropython-example-boards/blob/main/s...
by martincho
Thu Jun 30, 2022 12:34 am
Forum: General Discussion and Questions
Topic: bits to bytes
Replies: 58
Views: 25651

Re: bits to bytes

I have also identified a lot of opportunities to make the MicroPython faster. Great! One of the most useful tools for improving MicroPython's performance is the performance test suite. See https://github.com/micropython/micropython/tree/master/tests#perf_bench for details. I'll probably have some t...