#circuitpython-dev

1 messages · Page 88 of 1

tulip sleet
#

the C6 has a vastly different version of NINA-FW, so if you see differences, then upgrading/downgrading NINA-FW on the Airlift Featherwing would narrow down what is different

manic glacierBOT
slender iron
#

👋 Hi folks, I'm back working while the baby is napping (~2 hours a day). Feel free to ping me here, on issues or PRs and I'll get back to you when I can.

manic glacierBOT
lone axle
# tulip sleet the C6 has a vastly different version of NINA-FW, so if you see differences, the...

I think it may be a more general issue with version 3 of nina-fw. I have tested a feather RP2350 + Airlift featherwing now and found that I see the same issues there as on the Fruit Jam with the C6. I've also now downgraded the Airlift featherwing to version 2 nina-fw and am getting consistently successful requests.

I do think the slowness mentioned in my original message was unrelated. That turned out to be display related. The terminal showing caused it to slow down considerably and was further exacerbated by debug=True, and additional prints that I had added. If I stop showing the terminal before running request it iterates at a much faster pace.

Strangely the slowness induced by the display actually seems to have been helping the network issue though. With terminal hidden and faster iteration now the request frequently fails with Timed out waiting for SPI char. Chunk size no longer seems to matter all sizes frequently fail with the same exception.

I'm going to test a little more and try with a different port to see if it's rp2350 specific and then I'll make an issue with my findings on nina-fw.

#

I noticed under the releases of nina-fw repo there is are debug builds of the bin files. Would those potentially output any more useful info? and if so does it just come out of serial or need something external hooked up?

manic glacierBOT
tulip sleet
#

But there are multiple debug logging options. I had to turn on mbedtls or lwip separately to debug something or other. Try a couple of different webservers, and if you can, also try an http vs https server, to see if there's some slowdown due to encryption.

manic glacierBOT
#

@tannewt - @FoamyGuy and I figured out how to write an LVGL font to the screen and then we have explored using that font in a Terminal. My application: A CP437 font in a Terminal for MSDOS emulation. Tim's been doing an IRC client.

The size issue is secondary, fixed with a larger font for now.

Below is a decent Terminal program using such a font. It's very basic but works.

# SPDX-FileCopyrightText: Copyright (c) 2025 Tim C for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c)...
manic glacierBOT
#

Makes sense! I'll distinguish here and use the "Invalid state" message. Seems that "BAD_STATE" in this case resembles the peripheral itself being busy or the API believes it's in the middle of a transaction. I could create another message for "Peripheral is busy" if that's better, but I feel like "Invalid state" does cover that, although perhaps it's more of a reach. To keep size down, I'll still opt to reuse the existing message because it seems sufficient to me.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I had similar issues and looked into this a bit more in detail. It's working for me if I set a short device name on the BLERadio.name property only and use that name in scanning (I use the service UUID in addition).

Some findings:

  • A too big BLE advertising packet creates issues (AI says 31 bytes max)

If I put in a too long name, or populate both the name and local name in a way that the total packet size get's too big, I run into different types of issues depending on the scanning softwa...

manic glacierBOT
#

I'd like to see this example expanded to a full screen bitmap to we can use escape codes to go to any location on screen and write a character or characters in the CP437 font.

I'm not sure what you mean by full screen bitmap. It looks to me like the terminal should be as big as the screen. Terminal should already support escape codes to move the cursor: https://docs.circuitpython.org/en/latest/shared-bindings/terminalio/index.html#terminalio.Terminal

tidal kiln
#

is there anyway to suppress the I2C pull up check in CP?

tulip sleet
tidal kiln
#

does bitbangio do the check also? 🤔

tulip sleet
#

no, doesn't look like it

manic glacierBOT
tidal kiln
#
Adafruit CircuitPython 9.2.8 on 2025-05-28; Adafruit QT Py RP2040 with rp2040
>>> import board
>>> import bitbangio
>>> i2c = bitbangio.I2C(board.SCL, board.SDA)
>>> 

indeed

#

thanks!

manic glacierBOT
#

@TheKitty adding these lines just before the main loop of the example code in your previous message will move the cursor and then write a string at the new location:

move_cursor = chr(27) + "[10;10H"
terminal.write(f"{move_cursor}Moved to somewhere else")

I am not 100% certain of the arguments, I think it's x/y starting from top left of the terminal, so this is 10 characters in from left, and 10 down from top after it moves. But I have not experimented with other values to validate.

manic glacierBOT
#

Most of my time yesterday evening was getting extended characters working.
Then I tried to write them at (50,20) and it did the horizontal but not the
vertical motion. I tried the fullscreen code with no effect

Anne Barela
Engineer, Adafruit Industries
@.***

On Fri, Jul 11, 2025, 12:10 PM foamyguy @.***> wrote:

FoamyGuy left a comment (adafruit/circuitpython#10448)
https://github.com/adafruit/circuitpython/issues/10448#issuecomment-3063091966

@TheKitty...

manic glacierBOT
#

This patch reverts #10397. See #10466.
I don't think the code the feature can be kept.

Ideally the underlying code could try to do it and fallback to the old behavior if it explodes,
but that would also require a good bit of documentation and testing for when and how it works.
(i.e. only first PulseIn object, only if maxlen > 128, on these chips)

#

Likely so, thanks, I'll test

On Fri, Jul 11, 2025 at 1:23 PM foamyguy @.***> wrote:

FoamyGuy left a comment (adafruit/circuitpython#10448)
https://github.com/adafruit/circuitpython/issues/10448#issuecomment-3063298712

I think it may actually be y,x instead of the other way around. "[50;20H"
stays at the bottom of the screen because 50 is larger than the number of
rows in the terminal.

"[20;50H" moves the cursor to this position:
image.png (view on web...

#

CircuitPython version and board name

Adafruit CircuitPython 9.2.7 on 2025-04-01; Adafruit Feather ESP32-S3 Reverse TFT with ESP32S3

Code/REPL

import board
import busio

uart = busio.UART(board.TX, board.RX, baudrate=1200)
#string being sent is "\n"

while True:
    line = uart.readline()
    if line:
        print("Received line:", line.decode().strip())
    num_bytes = uart.in_waiting
    if num_bytes > 0:
        print(f"{num_bytes} bytes waiting")
       ...
#

Yay it works

# SPDX-FileCopyrightText: Copyright (c) 2025 Tim C for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2025 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT
#
import gc

from terminalio import Terminal
import displayio 
from lvfontio import OnDiskFont
from adafruit_fruitjam.peripherals import request_display_config
import supervisor

def draw_box(width, height, color_box, x, y):
    top_left = '\xDA'  # CP437 characters for single line drawing...
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.8-10-g8f54e33437 on 2025-07-11; LILYGO T-Deck (Plus) with ESP32S3

Code/REPL

>>> import microcontroller
>>> microcontroller.cpu.frequency
240000000
>>> microcontroller.cpu.frequency = 80000000
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: can't set attribute 'frequency'
>>>

Behavior

This worked, what happened?
The code all looks fine, as it was. Some...

manic glacierBOT
unkempt mist
manic glacierBOT
#

Turns out that one of the main culprits in my use case was frequent calls to time.monotonic_ns(), which returns a long long int (and therefore causes an allocation which must be collected, as opposed to regular CircuitPython int/float values). When I swapped those out for calls to time.monotonic() (which returns a float without triggering an allocation) my calls to gc.collect() became significantly faster (from an average of ~350 down to ~70 milliseconds).

If gc.collect()...

#

I can, would you be more specific as to what is a restart vs what is a
reload?

On Fri, Jul 11, 2025 at 4:07 PM Scott Shawcroft @.***>
wrote:

tannewt left a comment (adafruit/circuitpython#10450)
https://github.com/adafruit/circuitpython/issues/10450#issuecomment-3063834624

I think these settings will apply after a restart but not a reload. We
only init the display on startup. Can you confirm it works after a restart?


Reply to this email directly, vie...

#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.8 on 2025-07-08; Adafruit Fruit Jam with rp2350b

Code/REPL

None

Behavior

See Description

Description

On https://docs.circuitpython.org/en/latest/shared-bindings/terminalio/

The text under terminalio..Terminal seems to look to use Markdown but the bullets and table are smushed together rather than tidy. It makes it difficult to decipher/read... I went in to edit terminal...

manic glacierBOT
#

How would we do this exactly? I was experimenting with the porch values but don't remember having any success with it.

I've mostly kept maximally forgiving monitors and video capture devices so I don't have one of the 'picky' one mentioned above at hand at the moment, but broadly I've always increased only the 'back porch' values arbitrarily. If needed I'll reduce the 'front porch' and 'sync width' values to "Reduced Blanking v2" values (8 h. front porch, 32 h. pulse width), and always (th...

#

The Rasperry Pi Pico, based on the RP2040, has a register that maintains the status of I2C interrupt flags called IC_INTR_STAT. The bits of this register are set by hardware and cleared by software. Before this commit, the I2CTarget library did not clear the restart bit (R_RESTART_DET) in this register after an I2C transaction ended, causing the is_restart field of the i2ctarget_i2c_target_request_obj_t struct to always be true after the first I2C transaction. This commit causes the restart a...

manic glacierBOT
#

TL;DR - It would be useful to have some functionality provided by the standard Python inspect module in CircuitPython, especially

  • basic stack frame inspection (i.e. walk up the call stack from within a function)
  • simple callable signature inspection (parameter names required positional / optional positional / keyword counts)

There are a number of useful Python patterns which rely on the ability to get information about the "caller" from with a function/method (i.e. walk back up t...

manic glacierBOT
manic glacierBOT
#

@b-blake
I'm not sure if this is a bug or simply a problem of expectations/documentation.

The current CP-alpha creates a second drive ("SD-card reader" as you call it) on the host for a potentially later added SD-card, even if no hardware is attached/configured (this is /dev/sdb on my computer, on Windows it is similar). I have a Pico with an externally attached SD-card breakout. As soon as I mount this breakout from within my CP program (same code as with CP9), I can not only access the ...

manic glacierBOT
lone sandalBOT
manic glacierBOT
#

@bablokb,

I have not been able to replicate your success. Can you post your code so I can give it a try?
Your reference to /dev/sdb and /dev/sdb1 sounds like you are using a Linux PC. I am using a Windows PC.

I say SD card reader because when I click on it from File Manager I get "Please insert a disk into USB Drive (M:)".
This is the same message I get when I plug in an empty USB SD card reader into my PC.

Bruce

manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.8 on 2025-07-08; Adafruit Fruit Jam with rp2350b
Board ID:adafruit_fruit_jam
UID:1AE156A36397E861

Code/REPL

# SPDX-FileCopyrightText: Copyright (c) 2025 Tim C for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2025 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT
#
import gc

from terminalio import Terminal
import displayio 
from lvfontio import OnDiskFo...
manic glacierBOT
#

When I was implementing the collect optimization I was using C-level pin high and low toggles to use my logic analyzer to measure collect performance. It is about as low overhead as you can get I think.

I don't recall the exact numbers, but I saw some major improvements when I switched from 9.x to the "latest build" 10.0.alpha with the new optimizations.

I'm measuring gc.collect() time with before/after calls to time.monotonic(). That adds a little overhead, but shouldn't be signific...

manic glacierBOT
#

Yes, I am using Linux and the naming is of course different to Windows but the behavior is similar. When I plug in the Pico the logs tell me that I have a drive with "media removed". As soon as I mount from within my CP program, the system detects that I "inserted" the SD card.

My code from within CP is fairly boilerplate, you will find similar code in many tutorials/learning guides. The SD-card breakout is connected to four pins for SPI including chip-select.

import board
import busio
...
manic glacierBOT
#

I believe that the current behavior is intentional and not really a bug, though it does differ from standard terminal behavior in other computer environment. Support for color codes was added here: https://github.com/adafruit/circuitpython/pull/10105 and it's always been setting the color of all the text at once rather than ranges of text enclosed in the escape sequences.

The new https://github.com/adafruit/Adafruit_CircuitPython_Color_Terminal offers an extended terminal class that does su...

manic glacierBOT
#

@bablokb,

I am getting different results with the same code you are using. It could be a Windows thing vs a Linux thing.

The boot_out.txt shows:
Adafruit CircuitPython 10.0.0-alpha.8 on 2025-07-08; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w
UID:E6614103E719A637
MAC:28:CD:C1:00:6B:08

Bruce's code:
**import board
import busio
import sdcardio
import storage

SD_SCK = board.GP18
SD_MISO = board.GP16
SD_MOSI = board.GP19
SD_CS = board.GP17

spi_bus = busio.SPI(SD_SCK,SD_M...

#

I don't think this needs to be reverted completely. I would conditionalize using DMA by checking for SOC_RMT_SUPPORT_DMA ( https://github.com/adafruit/circuitpython/issues/10466#issuecomment-3053886875). If DMA is available, then I think one could always use DMA, without a length limit.

If DMA is not available (e.g. on ESP32-S2), then the length should be validated to be <=128 (or is it <128?). We would then document the length limits in a LImitations section in the shared-bindings...

#

Using small values (<128) doesn't work with the DMA logic even on s3. This broke all existing code.
And using more than one instance is also broken.

So yea, conditions would need to be checked, or a try-except logic should be applied, trying DMA then the original logic.

However when requesting >128 and DMA is unavailable, a new error would have to be shown.

In either case, since the reversion is not wanted, I'll be closing this.

manic glacierBOT
manic glacierBOT
#

Just to make sure: the code I posted is only the part that does the mount. You would still need a while True: pass loop at the end (or anything else that keeps the program running). I would even suggest something like this:

import board
import busio
import sdcardio
import storage
import os

SD_SCK = board.GP18
SD_MISO = board.GP16
SD_MOSI = board.GP19
SD_CS = board.GP17
spi_bus = busio.SPI(SD_SCK,SD_MOSI,SD_MISO)
sdcard = sdcardio.SDCard(spi_bus,SD_CS,1_000_000)
vfs = storage.VfsFat(s...
manic glacierBOT
#

Thank you for your feedback. As you suggested, I changed the module name to wiznet and added the PIO SPI functionality.

However, while my local build does not exceed the flash size for the wiznet_w55rp20_evb_pico board, the pre-commit workflow fails with a "region FLASH_FIRMWARE overflowed" error.
Could you please let me know why this is happening? Is there anything specific I should do to pass the pre-commit workflow?

lone sandalBOT
manic glacierBOT
#

Just for context, when I added the color support I had always intended to work on implementing the standard ANSI character implementation (as well as a blinking cursor) rather than the current full screen color but tilepalettemapper wasn't complete yet and @bill88t mentioned he had some thoughts on implementing ANSI support so I put it aside. The current implementation hasn't been around long enough that I would worry about maintaining the full screen behavior if there is a character based ap...

manic glacierBOT
#

Thanks @RetiredWizard. You've helped fill in the gaps.

Terminal ANSI implementation is incomplete due to when it was added. Likely the documentation should be changed noting full screen color behavior and noting adafruit)color_terminal for a more complete ANSI implementation.

With trying to get 10.0.0 out, core work on terminalio can be pushed out, I would think as there is an alternative, functional library.

I can document all this behavior in the guide I hope to finally get out this week.

manic glacierBOT
sick pier
#

WUMPUS

#

vs. Robo Nelly ^

lone axle
#

<@&356864093652516868> the (currently) Bi-Weekly meeting will occur today here on discord and the normally scheduled time of 11am US Pacific / 2pm US Eastern. About 2 hours from now. Fill in your notes and status updates to the shared document any time: https://docs.google.com/document/d/1tNfH3S0mIj57cCBzMRyaPH49nARgvj3ZDp2TbR1Nd4o/edit?tab=t.0 We look forward to hearing from all attendees.

#

@sick pier That is enough random gif / emotes. This is not really on topic in this channel and pushes other messages further back in history even though it's not as directly problematic as some types of spam.

tulip sleet
#

@lone axle could you read my input for the meeting? I heard nearly all of the previous meeting but my earbuds went out. Tnx

lone axle
#

Yep, will do.

thorny jay
#

Just listening.

#
element14 Community

Lorraine hacks a Bluetooth-controlled LEGO train in this week’s episode of element14 Presents, mounting a track system to the ceiling of her home. She integrates CircuitPython, a Seeed XIAO board, NeoPixels, and a spinning LIDAR sensor to detect walls and control the train’s movement. Lorraine's pro

manic glacierBOT
#

220 ms sounds about right to me. I did some testing with my improvement here: https://blog.adafruit.com/2025/04/28/improving-garbage-collection-time-in-circuitpython/

You may also be able to find more buffers that don't need to be scanned during collect.

What do you mean by 'manually freed'?

I was mainly thinking about allocations used internally for things like kwargs. Once in a while you can also make changes from python land to help too. For example enumerate() will do a temporary t...

thorny jay
#

Thank you @lone axle

wraith crow
#

Great Job @lone axle and Thanks!!!

lone axle
#

Thank you, Have a great week everyone 👋

lone axle
#

Here is the notes document for the next CircuitPython Weekly Meeting. It is on Monday 7/28/25 at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1ncUmb1lkvktAE-wOGZbF_OMUQQu0iEHk9b1R_t55Rmg/edit?usp=sharing

manic glacierBOT
manic glacierBOT
#

The pre-commit errors have to do with formatting style changes: https://github.com/adafruit/circuitpython/actions/runs/16258353450/job/45898635679?pr=10440#logs. If you install pre-commit locally, pre-commit will check locally and fix up the source. See https://learn.adafruit.com/building-circuitpython/build-circuitpython#install-pre-commit-3096511 for details.

The size issue is for certain builds. Some languages are larger than others. en_US, which you are building, fits, but some other...

tulip sleet
#

@lone axle If you have time to approve https://github.com/adafruit/circuitpython/pull/10468, I would be grateful. Scott already approved it, but there was a minor merge conflict in one board file that I fixed, so it needs a re-review. Then I can proceed with making the changes to update which TinyUF2 to use everywhere.

tulip sleet
#

@lone axle tyvm!

lone axle
#

Yep, you're welcome

manic glacierBOT
manic glacierBOT
#

Question:

Do you know if this comment is still valid?

Adafruit_CircuitPython_BLE/adafruit_ble/services/standard/hid.py
Line: 159 # Output reports not currently implemented (e.g. LEDs on keyboard)

I am trying to receive HID output reports over BLE, but the _characteristic.value of ReportOut object stays unchanged.

IOS is "seeing" my device and also connects, but I do not see any output data coming.

The same device connected via usb_hid with the same report descriptor works fine!

orchid basinBOT
#

For CircuitPython 10, the ESP32-S2 and ESP32-S3 flash partition layouts have changed, to increase the size of the firmware partition. These changes are upward-compatible with CircuitPython 9.1.0 and up. All the builds have now been updated to assume the new partition layout.

  • Bump the TinyUF2 version for esp32s2 and esp32s3 to 0.3.50.
  • Update and rewrite the Espressif bootloader install/update section, to make it clearer and point to external references.

Here is a screenshot of ...

manic glacierBOT
#

ports/raspberrypi/common-hal/picodvi/init.c does a query to see if there is a valid monitor I2C EDID connection on init. This is queried to provide some monitor resolution availability information.

In discussions this week, testing of Adafruit and non-Adafruit HDMI displays was discussed.

I suggest that the EDID resolution information be available to CircuitPython such that programs which may want specific resolutions or utility programs looking at a connected monitor may check the pert...

manic glacierBOT
manic glacierBOT
lone axle
#

Maybe for external displays we should encourage people to initialize them in boot.py and set them onto supervisor.runtime.display That would do a few things that I think are positive:

  • more closely mimic the core behavior with init display once on boot up then keep it around without releasing
  • lead to more portable code.py since display initialization with pins / different types of displays etc.. all live outside of code.py
  • make the project code run faster since it won't be releasing and re-initialzing the display every time it runs.
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 10.0.0-beta.0
orchid basinBOT
manic glacierBOT
#

I'm not sure if this is the right place for this so forgive me if it isn't.

I was trying to import from micropython import const into my code.py and am getting Import "micropython" could not be resolved. I have circuitpython-stubs installed and other circuitpython specific libraries are all getting typed correctly so I believe I have everything setup correct.

Would it be possible to add micropython.const to this typing library to get the type hint? I'd be happy to open a PR myself...

#

@dunkmann00 moved to core repo now. I also raised the question about static stubs in the weeds during this weeks meeting and we are good with moving forward on that idea. In the top level of the repo in a new stubs folder was the suggested place to put them.

Along with adding static .pyi files there, I think we'll need to update the make stubs command to pull in those files during the stubs build.

I will try to test the process out.

manic glacierBOT
#

I'm not the best library writer but this CircuitPython code seems to work well and demonstrated getting the data one might want to have:

# SPDX-FileCopyrightText: Copyright (c) 2025 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT
#
import sys
import board
import busio 

def parse_established_timings(edid):
    """Parse established timings from EDID bytes 35-37"""
    modes = []
    
    # Byte 35 (established timings I)
    if edid[35] & 0x80:
        modes.append("7...
tulip sleet
#

https://blog.adafruit.com/2025/07/15/circuitpython-10-0-0-beta-0-released/

Highlights of this release

  • Increase the firmware partition size for ESP32-S2 boards with 4MB flash, allowing more features to be included. This change was made for 4MB flash ESP32-S3 boards in previous releases. Starting with this release, you must now update the TinyUF2 bootloader on all 4MB flash ESP32-S2 and ESP32-S3 boards. See the release notes for details.
  • Fix Espressif pulseio.PulseIn regression.

The "OPEN INSTALLER" button on the CircuitPython.org board pages is now updated to install the new bootloader

slender iron
lone axle
#

I did not consider the errors not going out though and that is unfortunate for this because it would make troubleshooting issues with the init more confusing since people will need to know to look in boot_out, assuming they would go to there.

#

I guess there really is no need to use boot.py as I think more about it. Instead of encourage setting up the display in there projects could set it up in a seperate file display.py or whatever and then in code.py check for the display and if it's None then call the function from display.py to initialize it.

manic glacierBOT
#

Stubs are mostly generated from modules in shared-bindings. But in order to generate the stub the c code has to be commented with the appropriate type hints. If a module is located somewhere else (like micropython.const) and/or there are not the appropriate doc comments, no stub is generated for it. For these occassions we can create static stubs in the stubs directory that can be used in circuitpython-stubs.

This also creates a stub for micropython.const and adds the static stubs ...

manic glacierBOT
manic glacierBOT
#

I looked into the docs build error. It's root cause is that now it's trying to pull from multiple different places for the micropython module.

I've tested the following solution locally and it appears to be working:

  1. Delete: https://github.com/adafruit/circuitpython/blob/main/docs/library/micropython.rst. Sphinx will pull from the stubs for anything that it can, so it no longer needs this static rst file it will pull from the new static .pyi file. Which in hindsight is actually kind...
manic glacierBOT
#

Just for your info:
Only slightly modified code works fine under CP 10.0.0.-beta.0


import sys
import time
import supervisor
import adafruit_ble
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.standard.hid import HIDService
from adafruit_ble.services.standard.device_info import DeviceInfoService
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS

# Create HID and Device Info service...
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The raspberrypi and zephyr-cp ports would still use the lib/certificates/data/roots.pem. It's a question of firmware space about whether we could switch to the the same list as espressif, and I plan to look at that (I'll open issues.) But I am not concerned about that: the difference is less of an issue than Espressif users having to deal with the previous limited root list.

manic glacierBOT
#

I think having it pulled in via stubs makes the docs assume that it is inside of shared-bindings. I just noticed also the URL that the micropython docs ends up at is different:

Currently live:

/docs/library/micropython.html

With this PR change:

/shared-bindings/micropython/index.html

I'm not sure how to fix it. I think that it's getting picked up by this autodoc https://github.com/adafruit/circuitpython/blob/main/shared-bindings/index.rst?plain=1#L24-L28 but I d...

manic glacierBOT
#

CircuitPython version and board name

Raspberry Pi Pico, Circuit Python 9.2.8

Code/REPL

(See code in description)

Behavior

Editor crashes, erasing the serial window and it's debug messages.

Description

Found that these line of code will work,
import board
import rotaryio
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP2, divisor=4)

But these line cause everything to crash,
import board
import rotaryio
tuning = ...

manic glacierBOT
manic glacierBOT
#
  • Fixes #10394

The arguments to heap_caps_malloc() were in the wrong order. Thanks @sola85 for spotting this.

Tested. Jumpered A0 and A1 on a QT Py ESP32-S3:


>>> import pwmio, frequencyio, board
>>> a0 = pwmio.PWMOut(board.A0, frequency=123456)
>>> a0.duty_cycle=32768
>>> a1 = frequencyio.FrequencyIn(board.A1)
>>> a1.value
123450

Note that it also "worked" before this fix, but the size allocation was all wrong.

manic glacierBOT
manic glacierBOT
#

I have a very simple replicator for this. I think it has to do with problems expanding the initial heap.

Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit QT Py RP2040 with rp2040
>>> l = [0]*7937
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError: memory allocation failed, allocating 31748 bytes
>>> 
[hard reset or ctrl-D]
```
Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit QT Py RP2040 with rp2040
>>> l = [0]*7936
>>> l = [0]*7...
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 9.2.5 on 2025-03-19; Adafruit Feather RP2040 USB Host with rp2040

Code/REPL

import usb.core
import time

time.sleep(5) # needed for USB to settle? I don't think so, but whatev.

print("Looking for midi devices")
while True:
    i = 0
    for device in usb.core.find(find_all=True):
	print("Found a device")
	i += 1
    print(f"Found {i} devices; going around again...")
    time.sleep(1)

Behav...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Hi Thanks for your time.

I downloaded 10.0.0.0-beta.0 and the very, very latest time stamped: 2025-07-17T11:26:36.000Z.

They both have the same behavior.... Pico cashes hard and USB is lost, only way to recover is to manually edit the "code.py" file back into a proper state. i.e. Sequential pins on the incremental encoder statement.

lone sandalBOT
manic glacierBOT
#

CircuitPython version and board name

n/a; M5Stack Dial

Code/REPL

n/a

Behavior

file note found at https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/m5stack_dial/tinyuf2-m5stack_dial-0.35.0-combined.bin


NoSuchKey
The specified key does not exist.
bootloaders/esp32/m5stack_dial/tinyuf2-m5stack_dial-0.35.0-combined.bin
72H3P2CEBHJY9JF6
x0dDo+1+LIr0f8PEepejXh+yu2500mFsxVpT+5+L5mFoUQC5zzpY2ohUj+omVr/Q8PokZIQHUQU=

Descr...

manic glacierBOT
#

Bug Report: alarm.pin.PinAlarm Mis-maps to Incorrect Pins on ESP32 Feather
Description

alarm.pin.PinAlarm consistently fails to wake the board on the configured pin. Instead, it wakes up on a completely different, incorrect, and seemingly random pin. This behavior has been observed with multiple confirmed RTC-capable GPIOs and appears to be a fundamental bug in the core alarm module's handling of the PinAlarm configuration.

Board Information

Board Name: Adafruit Feather HUZZAH32 with ESP32...

manic glacierBOT
#

I think the documentation is very explicit on this behavior (https://docs.circuitpython.org/en/latest/shared-bindings/alarm/index.html#alarm.exit_and_deep_sleep_until_alarms):

After restart, an alarm equivalent to the one that caused the wake-up will be available as alarm.wake_alarm. Its type and/or attributes may not correspond exactly to the original alarm.

manic glacierBOT
manic glacierBOT
#

Oh, thank you. I will look into this!

On Fri, Jul 18, 2025, 12:25 AM bablokb @.***> wrote:

bablokb left a comment (adafruit/circuitpython#10498)
https://github.com/adafruit/circuitpython/issues/10498#issuecomment-3087206588

I think the documentation is very explicit on this behavior (
https://docs.circuitpython.org/en/latest/shared-bindings/alarm/index.html#alarm.exit_and_deep_sleep_until_alarms
):

After restart, an alarm equivalent to the one that cau...

#

@keen101 You are not seeing Pretending to deep sleep until alarm, CTRL-C or file write., right? On an ESP32 it should not do fake deep sleep, because there is no USB.

Have you tried this test with an ESP32-S2 or ESP32-S3, if you have those boards? I would be interested to know if you get different pin results. I probably tested this with S2 or S3, but at the time, we may not have even had an ESP32 build.

@bablokb It was not our intention to give incorrect pin numbers. I wrote that line t...

manic glacierBOT
#

@bablokb It was not our intention to give incorrect pin numbers. I wrote that line to caution against expecting exactly the same alarm, and even before pin alarms were implemented. It may have been a caution against expecting the same time interval (I think we can't remember the time interval). I will try to make that more precise.

At least for the RP2xxx the code does not record any pin-number:

    alarm->base.type = &alarm_pin_pinalarm_type;
    // TODO:...
manic glacierBOT
manic glacierBOT
#

FYI

We (Dan, TonyC and I) may have found the culprit.
The issue shows up on Windows 10 Version 22H2, and Windows 11 Version 23H2.
The issue does not show up on Windows 11 Version 24H2.
No bets on 25H2 when ever it arrives.

IMHO Windows 10 will be around for a while.
I have three good machines that will not upgrade to Windows 11.
There are probably many people with machines like my three.

This Forum thread shows the discovery process.
[https://forums.adafruit.com/viewtopic.php?t=219232]...

manic glacierBOT
#

Hello Dan, (and others),

Thank you for the quick replies and for looking into this. I'm a beginner with CircuitPython and am still learning the ins and outs, so I really appreciate your help. Yes, just trying to test out early deep sleep code with the esp32 with the goal of emulating some of the work being done at Colorado State University with environmental / agriculture sensors and IOT.

From what I can tell, I don't seem to be getting the "Pretending to deep sleep" message. My board's ser...

manic glacierBOT
#

This is a second attempt at allowing longer pulse sequences to be recorded using pulseio.PulseIn on espressif ports using the DMA backend of the RMT hardware.

This is essentially the same code as in the original PR https://github.com/adafruit/circuitpython/pull/10397, but the new logic is now only activated in cases where the existing logic didn't work, i.e. if maxlen > 128. I believe this fixes all issues raised in https://github.com/adafruit/circuitpython/issues/10466 and https://git...

green mural
#

I'm new at this. A month or so ago I got a library for an AS7343 light sensor accepted to the community bundle. Now I need to fix and issue, but I'm not sure how to do that and stay connected to the community bundle. I read that I should make the changes to my personal repo for the library and then change the version tag and magically it will go into the community bundle, but I'm not finding much that actually makes sense for this process.

jaunty juniper
green mural
#

@jaunty juniper Thanks. I'll try this in a few days when I get the issue fixed.

lone sandalBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 9.2.8 on 2025-05-28; M5Stack Cardputer with ESP32S3

Code/REPL

with open("/test.txt", "rb") as f:
	print(f.readlines())

Behavior

No errors or crashes are produced, but if the code is run while the board is not plugged into a computer, it will hang until the board is plugged into a computer again.

If the code is run while the board is plugged into a computer, the code runs as expected witho...

manic glacierBOT
#

infuriatingly, i can't seem to reproduce this anymore after shuffling my imports, so something else is at play here.

i tracked down this issue through trying to use bitmap_font with fonts stored in the flash (which gets mounted when the board is plugged into a computer). the program still exhibits the same behaviour with fonts, each time a new font or glyph needs to be loaded, it hangs until plugged in, even if i can no longer reproduce it with just an open.

manic glacierBOT
manic glacierBOT
#

I thave a hypothesis about this. This cardputer-specific code overrides board_serial_attached(), which by default returns false.
https://github.com/adafruit/circuitpython/blob/3512e668913437482dba78c23a920fc76b96457a/ports/espressif/boards/m5stack_cardputer/cardputer_keyboard.c#L130-L133

So it will normally return true, even when USB is not connected, because the cardputer keyboard input is set up when CircuitPython starts. This causes this serial_connected() to return true, even if USB ...

manic glacierBOT
#

i'd like to focus away from the test file at the moment since I can't seem to reproduce the issue at all with just a simple file anymore. this is a simplified program i've managed to reliably reproduce the issue with:

import board
from displayio import TileGrid, Palette, Group
from adafruit_bitmap_font import bitmap_font
from adafruit_display_text import bitmap_label

palette = Palette(2)
palette[0] = 0xffffff
palette[1] = 0x000000
font_file = "fonts/Arial.bdf"
font = bitmap_font.l...
manic glacierBOT
#

after much experimentation and plugging and unplugging of USB cables, this is the minimal reproducible program i can find:

from adafruit_display_text import bitmap_label

with open("/test.txt", "rb") as f:
	print(f.readlines())

while True:
	pass

opening the file for read in text mode rather than binary does not exhibit the issue. any imports other than bitmap_label don't seem to exhibit the issue. the contents of test.txt don't seem to affect readlines at all, whether t...

manic glacierBOT
#

There are only a limited number of devices that can take the picoDVI and Framebuffer resolution of 640x480 at 72 Hz. After a detailed discussion with Claude Sonnet 4, it believes it has the parameters to add that mode to the existing code base without extensive changes. A sample Framebuffer setup:

import board
import picodvi

# 60Hz for capture card compatibility
fb = picodvi.Framebuffer(640, 480,
    clk_dp=board.CKP, clk_dn=board.CKN,
    red_dp=board.D0P, red_dn=board.D0N,
    green_dp...
manic glacierBOT
#

Here is code for implementing the 800x480 @65Hz for the Adafruit 2260 display

``
/*

  • CircuitPython RP2350 PicoDVI 800x480 Support
  • This code adds 800x480@65Hz resolution support to CircuitPython's picodvi implementation
  • for RP2350 microcontrollers with PSRAM.
  • Timing calculations for 800x480@65Hz:
    • Pixel clock: 32.5 MHz
    • TMDS clock: 325 MHz
    • Horizontal total: 1000 pixels (800 + 40 + 80 + 80)
    • Vertical total: 500 lines (480 + 1 + 3 + 16)
    • Refresh rate: 6...
manic glacierBOT
lone sandalBOT
tulip sleet
candid sun
#

@tulip sleet i thought the meeting was next week (28th)?

lone axle
#

Same, that is what I mentioned at the end of last week meeting and set up the doc for.

tulip sleet
#

<@&356864093652516868> SORRY - it's next week. I was looking at the wrong week.

manic glacierBOT
#
[adafruit/circuitpython] New branch created: TheKitty-patch-1
manic glacierBOT
#

These three files plus the documentation below constitute adding two new display resolutions to the picoDVI only for RP2350. It was made through Claude 4 Sonnet conversation https://claude.ai/chat/9d9fd6af-629a-4c5f-be60-deca6dc5c798.

This should not interfere with RP2040 implementation. It does add a scanning frequency kwarg to differentiate between, say, 640x480 @72Hz (existing) vs. 640x480 @60Hz (new).

I do NOT have a CircuitPython build environment so this PR is untested. It is subm...

manic glacierBOT
thorny jay
# manic glacier

You might not regret the cardputer acquisition, it is really tiny but feel like a full computer (without mouse).
The kind of portable programming device we were having with pocket calculator (HP / TI / Sharp).
I don't think it is really usable as you need small fingers, and the screen is super small, but there are a lot of interesting details.
You can make it thin by removing the extended battery, you can attach that to lego technics.
I need to make better use of that gem, that currently stay protected in the provided box.

devout jolt
pastel valley
#

the most useful thing i did with it so far (which is the project i was working on with bitmap fonts) was for it to work as a replacement for the app to run a bluetooth label printer

lone axle
#

That is cool! nice job fitting that into such a small display.

thorny jay
# devout jolt Agreed that it’s so small as to be almost unusable. But as a test platform for W...

You'll have to tell me more about "set of remotely-accessible CirPy board"... do you have some sort of online machine with CircuitPython gizmo USB connected to it, and you ssh or else to that machine?

Now, I was thinking the cardputer was coming with a nice protective box... but maybe not, if it is not the case, then the case I use is a Pimoroni plastic box. https://shop.pimoroni.com/products/pirate-brand-plastic-loot-box?variant=21803682693203
My cardputer was moving a bit in there, so I added a tissue and then it was tight in. I am not sure if I used the Small or Large version. Large: 145x90x40mm vs Small: 90x66x30mm.
The reason I don't know is that it is so small that I could not locate my cardputer at home for the moment. That is the problem of beeing too small.

Pliable polypropylene provides protection for portable parts of projects, equipment and contraptions*.

thorny jay
thorny jay
manic glacierBOT
#
  1. Please change the files to minimize the diff. There is a lot of extraneous changes that are unnecessary.
  2. Please also make changes to fix the build. Once the CI is green, you'll get a build you can test on the device.

Submitting untested, uncompiled code isn't helpful and wastes time. Please ensure you do 1 before submitting a build. The diff is shown when proposing the PR. Ideally 2 would be done as well before submitting.

devout jolt
# thorny jay You'll have to tell me more about "set of remotely-accessible CirPy board"... do...

It's just exactly like you describe: a Raspberry Pi with a powered 7-port USB hub and various CircuitPython devices (currently: Lolin S2 mini, QTPy m0, Trinkey of some sort, cardputer, Pico, M4 pyportal)
I ssh into the Pi, use "discotool" to find the serial port & mount point of each device, use "microcontroller.on_next_reboot(microcontroller.RunMode.{UF2,BOOTLOADER})" to try out new CirPy builds or UF2 bootloaders. The USB hub also is controllable via uhubctl so I can powercycle a specific hub port if needed

manic glacierBOT
#

CircuitPython version and board name

main (raw SPI, or SPIDevice):
Adafruit CircuitPython 9.2.8 on 2025-05-28; Adafruit Feather M4 Express with samd51j19
Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit Feather M4 Express with samd51j19
Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit Feather RP2040 with rp2040

secondary (I2CTarget):
Adafruit CircuitPython 9.2.8 on 2025-05-28; Adafruit Feather M4 Express with samd51j19
Adafruit CircuitPython 10.0.0-beta...
manic glacierBOT
manic glacierBOT
#

It also looks like when some non-[0, 0] values are written from the main to the SPITarget, it messes up the values written back to the main.

Here's example print output with 2-byte buffers on both ends, where the main writes various values (and the secondary is also set to write back predictable values instead of ADC):

<img width="1046" height="226" alt="Image" src="https://github.com/user-attachments/assets/97d3d7b7-225a-44c2-8f18-f50af8b12086" />
(note that as mentioned earlier, in the ...

manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 9.2.8 on 2025-05-28; Raspberry Pi Pico with rp2040

(In reality a custom Pi Pico clone designed by me)

Code/REPL

No specific code

Behavior

I'm trying to copy source files to my board, but it fails if a file with the same name doesn't already exist:

mpremote connect id:E464D431C33D2021 fs cp communication.py :      
cp communication.py :
mpremote: Error with transport:
Traceback (m...
manic glacierBOT
#

I checked the code, and for the copy it uses open(xxx,'wb'), and that is nothing extraordinary.

I maintain a similar project (cp-shell), that also uses this call and I don't have problems with this.

To debug, you have to manipulate the mpremote code and make sure it prints the complete error-stack on the device side. (mpremote is Python, so that is not the problem).

Not related to this issue, but relevant: why do you use mpremote after all? The Pico has native usb, so you could just mou...

#

Not related to this issue, but relevant: why do you use mpremote after all? The Pico has native usb, so you could just mount the device and use the copy command of your OS. Should be more reliable, faster and stable.

I'm building a test rig that handles 8 circuitpython devices at the same time. They are hot swapped during operation, and test code is temporarily pushed to each unit to test the hardware. Then the actual "production" code is written to then to make them ready for shipping.

I...

#

I also posted this in the (closed) micropython issue: https://github.com/micropython/micropython/issues/17752#issuecomment-3108736502

The CircuitPython/MicroPython difference in how to print OSError exceptions happened a long time ago. We added printing a filename about five years ago in some cases.

CircuitPython:

>>> open("foo")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 2] No such file/directory: foo

CPython doe...

#

I'm sure there are other solutions to my issues, but I have got the impression that CircuitPython aims to be compatible with mpremote - hence the bug report.

We don't actively try to keep mpremote working, because we don't use it ourselves. But when it doesn't, it has sometimes been due to a bug on our side.

Thank you. I don't know how ideas like these are synchronized between mp/cp though - how and who would decide what course to take (if any)?

Someone (you, if you're interested) cou...

manic glacierBOT
#

@dhalbert

We don't actively try to keep mpremote working, because we don't use it ourselves.

Thank you for clarifying. So is cpshell to be considered the official tool for syncing files between a local git repo and cp boards, or is there a third option?

Someone (you, if you're interested) could submit a PR to micropython to handle the CircuitPython case.

I'd love to, but I'm afraid my C skills are terribly lacking 😅

manic glacierBOT
manic glacierBOT
#

So is cpshell to be considered the official tool for syncing files between a local git repo and cp boards, or is there a third option?

No, cpshell is not official. I wrote it only for boards that don't have native usb and where the web-workflow fails. It is very slow on these boards, but the web-workflow always fails for me. And if it would work, I would still look for a script-based solution.

On the Pico, I use a mount/rsync/umount-script to synchronize my local git-repos with my CP-bo...

manic glacierBOT
manic glacierBOT
#
  • Fixes #10488
  • Fixes #10489

Change the raspberrypi and zephyr-cp wifi builds to use the full Mozilla certificate bundle from https://github.com/adafruit/certificates. Now all our wifi builds use the full bundle.

This update required https://github.com/adafruit/certificates/pull/10 to work. When i was testing this, the RP2 builds mysteriously did not work for an https://api.github.com HTTPS fetch. This was because the Comodo "AAA Certificate Sevices" root had recently been remov...

manic glacierBOT
#

So is cpshell to be considered the official tool for syncing files between a local git repo and cp boards, or is there a third option?

For all my CircuitPython projects, I use make and rsync to sync .py code files and .mpy library files from a local git repo to my CIRCUITPY drive over USB mass storage. That approach has been working great for me.

One caveat is that I typically only have one CIRCUITPY device connected at a time. So, my Makefile rules wouldn't work for you unless ...

manic glacierBOT
#

Description

This pull request adds support for the Waveshare ESP32-S3-LCD-1.47 board to CircuitPython. The implementation includes board-specific configurations, pin definitions, and initialization code for the onboard 1.47-inch LCD display (ST7789 driver, 172x320 resolution), TF card slot, RGB LED, and other peripherals. The changes are based on the official Waveshare documentation: ESP32-S3-LCD-1.47 Wiki.

Changes

  • A...
manic glacierBOT
#

My rsync uses some more args which I think are useful:

--delete --inplace \
   --no-owner --no-group --modify-window=2

If there is not much free space on flash, the rsync will fail without --inplace because without you have a copy-delete-move operation thus you need two times the space for every file (and for e.g. fonts this can be critical).

--delete will make sure the files on the device are in sync with the files in your repo in case you deleted something. But watch out, yo...

manic glacierBOT
#

Here's a simpler example. Ignore the data flowing back from the secondary to the main, main concern is how the data written from the main gets changed at the SPITarget secondary depending on the values sent.

SPITarget code is the same as in the docs example, except for timing, renaming the secondary-to-main buffer, and printing only that buffer after the transaction:

import time  ####
import board
import analogio
from spitarget import SPITarget

time.sleep(3)  # wait for serial after r...
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

@tannewt Here is a scenario where automount does not seem to do the locking I would expect. Tested on a PyPortal with 10.0.0-beta.0.
Run this program (I imported it in the REPL)

import board
import os
import random
import sdcardio
import storage
import time

spi = board.SPI()
cs = board.SD_CS

sdcard = sdcardio.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")

while True:
    filename = f"/sd/{random.randint(0,10000)}"
    print("Trying to create", filename)
    f ...
manic glacierBOT
#

I tested this again on a Feather RP2040 USB Host running 10.0.0-beta.0.

This keyboard: https://www.adafruit.com/product/857 still does not work if it is connected when the device boots up, but does after unplug / re-plug.

This more recent keyboard: https://www.adafruit.com/product/1736 does work correctly if connected when the device boots up though. As does a logictech wireless keyboard that I use.

I believe the miniature keyboard (product 857) is the one I was using when I originall...

manic glacierBOT
#

The code here: https://github.com/adafruit/Adafruit_CircuitPython_PIOASM/blob/main/examples/pioasm_hello.py#L30 which is embedded in this guide page: https://learn.adafruit.com/intro-to-rp2040-pio-with-circuitpython/using-pio-to-turn-an-led-on-and-off

Creates a StateMachine with frequency 2000. When I run this code on a Pico w/ 10.0.0-beta.0 it raises this error: ValueError: frequency out of range

In testing a few values it seems that 4000 is the minimum accepted value.

I can update...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The cause of this seems to be the same condition as #10298: an error while paste mode is in use. If you paste code into the REPL in the Mu serial window with middle-button on Linux or similar, it goes into Paste Mode. If an exception is raised while running the pasted code, then on the next ctrl-D to >>>, CircuitPython will crash hard and go into safe mode.

It does not always happen: short inputs don't seem to provoke this, but the code above does.

#10298 appeared to be specified to RISCV...

tulip sleet
#

@lone axle did you turn on the "no reset" in the web serial tool?

#

i haven't checked the pins

#

you could just load the passthrough and then try esptool.py from the shell, like just chip_id

lone axle
#

it is on. I didn't explicitly flip the switch though, it loads for me in this position

tulip sleet
#

that looks right. maybe limor wrote a passthrough already?

lone axle
#

esptool.py does the same thing on the neopixel and outputs this:

esptool v5.0.1
Serial port /dev/ttyACM0:
Connecting......................................

A fatal error occurred: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
#

my best guess is that either Serial1 or SPI are incorrect, but I'm not sure how to tell exactly. Serial1 seems to match as defined here: https://github.com/earlephilhower/arduino-pico/blob/cdf25b45b8b5926b8cfbd1544608484069abf3e1/variants/adafruit_fruitjam/pins_arduino.h#L46-L47, SPI is more ambiguous because there are both SPI1 and SPI0 defined here: https://github.com/earlephilhower/arduino-pico/blob/cdf25b45b8b5926b8cfbd1544608484069abf3e1/variants/adafruit_fruitjam/pins_arduino.h#L52-L62. Looking at the pin diagram I believe SPI1 is correct, but it's unclear to me which just SPI is, I tried using SPI1 and SPI2 in the code as well though and neither of this behaved any different.

manic glacierBOT
manic glacierBOT
#

Aha, the problem here is that ESP32 supports only RTC_GPIO for pin wakeups, and it's numbering the pins according to the RTC_GPIO numbering scheme, which confusingly numbers the pins differently from regular GPIO. In that scheme, RTC_GPIO17 is regular GPIO27, which is exactly the mismatch I see when I run a simplified version of your test program. Now I know what to fix.

https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/gpio.html

manic glacierBOT
#

Thanks for submitting a pull request to CircuitPython! Remove these instructions before submitting.

See https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github for detailed instructions.

  • Consider whether to submit this PR against main or against (if it exists) the branch for the current stable release or an upcoming minor release. The branch will be named i.j.x, for example, 9.2.x. Bug fixes and minor enhancements can be submitted against the stable relea...
#
  • Fixes #10498

On ESP32, alarm.wake_alarm.pin was wrong, because it was return the RTC_GPIO pin number, not the regular GPIO. On ESP32 only (at present), the RTC_GPIO numbers do not line up with the regular GPIO numbers. There is no direct mapping function or table to go from RTC_GPIO to GPIO, so I just wrote a search loop to find the right pin, using the supplied mapping function the other way.

Tested on Feather ESP32 V2, and tested that there was no regression on a Feather TFT ESP32...

manic glacierBOT
#

Hi dhhalbert - I am not pasting code at all.

To reproduce, type this into the editor window the location is a PICO board code.py file.
import board
import rotaryio
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP2, divisor=4)
print('all is good....')

Then run the code - all is good the serial window shows the result

Then change the 'tuning' line to,
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP11, divisor=4)

Then run the code - the code causes the USB serial connect...

manic glacierBOT
quartz folio
manic glacierBOT
#

CircuitPython version and board name

ESP32 Feather HUZZAH32 in CircuitPython 10.x.x Beta/Nightly

Code/REPL

N/A as any code cannot be uploaded. Any code in a code.py file is fine to test with for this bug.

Behavior

not able to Serial File Transfer (Mu/ampy) Broken on ESP32 Feather HUZZAH32. Since this board does not have native USB support for file transfer, this becomes a critical issue for this type of board.

Description

Issue Description:
...

manic glacierBOT
#

Hi, I tried 10.0.0 beta 0 and latest on a feather Huzzah with Mu and Thonny and was able to transfer files to the board.

  • Do you have access to the serial REPL when the file transfer doesn't work ?
  • Did you do a full flash erase when installing the bin to the board ?
  • Have you pressed reset on the board after installing ?
  • Have you tried with Thonny ?
manic glacierBOT
#

Thanks @Neradoc,

That is disappointing that you were not able to replicate the issue.
Perhaps it is just this EzSBC clone that has the issue? A Linux specific
bug? As for accessing the REPL on MU after the US-10.0.0-alpha.8 was just
uploaded i get pretty much no characters at all. Nothing seems to be
printed. After a couple tries of resetting or unplugging the usb cable and
trying again I got two instances where I got a partial text message and
some corrupted characters. and both are...

#

In addition, @dhalbert,

I tried the link you sent for the workaround, and the USB option hangs with
the circuitpython going around in infinite loop and the ESP32 physically
starts flashing the red and green leds over and over again, indicating a
major fault of some sort.

the installer tool on
https://circuitpython.org/board/adafruit_feather_huzzah32/ when I try to
use it to update the wifi credentials hangs and the ESP32 physically starts
flashing the red and green leds over and o...

manic glacierBOT
#

I tested with the 10.0.0-beta.0 firmware on an Adafruit Feather Huzzah 32, as @Neradoc did. I erased the flash with esptool.py and uploaded that version with esptool.py. This is on Ubuntu 24.04.

I also found that the "OPEN INSTALLER" on the board page didn't work, so I used esptool.py instead.

I then used Mu 1.20 in ESP MicroPython mode. I did have to reset the board to get the Files window to work. I wrote a blink program which I got to run:

<img width="1080" height="272" alt="Image" src=...

manic glacierBOT
#

If all else fails I wrote a utility that takes a slightly different approach and has worked for me as a last resort. The utility pushes a tiny program over to the micro-controller and then uses that to help with the file transfers. The User Interface is bizarre but since there are so many options for transferring files to micro-controllers I didn't feel it was worth any polish. The serial port is also hard coded so you'll have to update it with the appropriate port name as described in the re...

manic glacierBOT
#

From what I read about this board, the red and green LEDs show serial transmission. I don't know if there are hardware differences with the feather, since it looks like it's the same module.

ets Jul 29 2019 12:21:44��� D D@ ���

That looks like what you get when it's not using the right baud rate for the serial transmission.
For example if I use 9600 instead of 115200 in screen, I get that kind of things:

...

manic glacierBOT
#

@RetiredWizard

If all else fails I wrote a utility that takes a slightly different approach and has worked for me as a last resort.

This is not much different to what mpremote, rshell, cpshell and code.circuitpython.org do (the latter implements this in javascript). They all "upload" a code-snippet that reads data sent by the host via REPL. This works fine for small files, but as soon as you transfer large files it will take a long time, especially if you don't have flow-control. But it w...

manic glacierBOT
#

So, I don't see that -- both host and CircuitPython are able to read/write. In the example in the OP, the program tries to start writing right away. It's not clear whether that happens before or after enumeration.

The host does not update its idea of what is on the drive if writes occur without its knowledge. So per-file-open locking does not help the host. Maybe if any file open for write occurs on the CircuitPython side, it should lock the host out of writing until the next enumeration. I...

manic glacierBOT
#

@Neradoc,

That is kind of what I was thinking as well.

I was able to use screen on the command line to display what is happening
behind the scenes a bit. It looks like the ESP32 is still running serial at
the default baud rate, but I'm not sure why anything else is not working.
To me it looks like the message is still messed up a bit?

@.***:~$ screen /dev/ttyUSB0 115200

Adafruit CircuitPython 10.0.0-alpha.8 on 2025-07-08; Adafruit Feather
HUZZAH32 with ESP32
Board ID:ad...

manic glacierBOT
#

@bablokb

This is not much different to what mpremote, rshell, cpshell and code.circuitpython.org

Thanks! It's been a while since I actually worked on the board that needed this, I don't know if I forgot that these tools used server/client connections or never knew it.

I believe the problem I was having was a UART buffer overrun error or something similar where typing simple commands into the console worked but whenever you tried to communicate more than a hand full of characters at ful...

manic glacierBOT
#

I believe the problem I was having was a UART buffer overrun error or something similar where typing simple commands into the console worked but whenever you tried to communicate more than a hand full of characters at full speed you would encounter transmission errors.

That is the core of the problem. I added two parameters to cpshell (chunk_size and chunk_wait) to work around this problem but verifying is certainly the most robust approach.

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-beta.0-8-g857c625421-dirty on 2025-07-25; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

Code/REPL

import time
from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services import Service
from adafruit_ble.characteristics import Characteristic
from adafruit_ble.characteristics.json import JSONCharacteristic
f...
tulip sleet
#

@lone axle do you want to merge the nina-fw now (you gave a thumbs up), or else figure out how to test C6 and merge after that?

#

(can answer in the PR)

crimson ferry
#

dan, just out of curiosity, Nina now supports ESP32 and C6… Is there any reason it wouldn’t work with S2 or S3?

tulip sleet
lone axle
lone axle
# tulip sleet <@382939733107408897> there are Python versions of passthroughs. I don't know if...

Only tested briefly but no luck with miniesptool. I am thinking at least part of my problem is I'm not getting the C6 into boot loader mode properly. The arduino passthrough and this miniesptool code seems to be using GPIO0 for that https://github.com/adafruit/Adafruit_CircuitPython_miniesptool/blob/fdd7cce7eddd45e29930759984ccc58e63849d40/examples/miniesptool_simpletest.py#L18. But I am unsure how to set that based on the fruit jam pinout. It seems like maybe GPIO0 doesn't get it's own pin on the RP2350, and perhaps it's IO9 instead of 0, but maybe that is okay for this module.

The schematic shows it connected sort of to the IRQ pin and I have tried using that in place of GPIO0 but it doesn't seem to work.

#

I'm not 100% fluent in schematic icons, maybe this is indicating that ESP_BOOT is broken out to a pad or pinhole. I briefly tried jumping a single pinhole on the board that is near-ish to the ESP to GND while running the arduino pass through code but it didn't help, and I decided not to push my luck randomly jumping what is to me an unknown pin much more.

tulip sleet
#

are you using rev C or rev D or earlier?

#

there was some shuffling of this, but I think it was early on

lone axle
#

I believe it's rev C

#

yep, just found the label, definitely rev C.

#

It does have some of the I2S pins used by the TLV dac swapped around on this revision as compared to some later ones, I've swapped them in the code on my device to work around that.

tulip sleet
#

are you using board.ESP_IRQ?

lone axle
#

I beleive so, I updated the simpletest code with these:

tx = board.ESP_TX
rx = board.ESP_RX
resetpin = board.ESP_RESET
gpio0pin = board.ESP_IRQ
tulip sleet
#

a confusing thing is that IO9 has nothing to do with the pin numbers on the RP2350. The RP2350 has its GPIO23 connected to ESP_BOOT

#

does ESP_TX go to the RX pin on the C6?

#

need to make sure whose point of view it is

lone axle
#

I believe so. Sorry I cropped out the other side. This is the full C6 module in the Fruit Jam schematic:

tulip sleet
#

rev D:

    { MP_ROM_QSTR(MP_QSTR_ESP_CS), MP_ROM_PTR(&pin_GPIO46) },
    // was GPIO0 on ESP32. Used for IRQ and mode switching.
    { MP_ROM_QSTR(MP_QSTR_ESP_IRQ), MP_ROM_PTR(&pin_GPIO23) },
    // BUSY is also known as READY, and is RTS for BLE mode.
    { MP_ROM_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_GPIO3) },
    { MP_ROM_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_GPIO22) },
    // TX and RX are from the point of view of the RP2350.
    { MP_ROM_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_GPIO8) },
    { MP_ROM_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_GPIO9) },
#

Rev C onl y has { MP_ROM_QSTR(MP_QSTR_ESP_CS), MP_ROM_PTR(&pin_GPIO46) },
ok, never mind..., thought there might be pin changes there

#

I did get this working on a Fruit Jam mockup with RP2350B Metro and a C6 breakout.

lone axle
#

I have a full ESP32-C6 Feather that I got out, but am unsure if it could be used to test. Willing to try if it can.

tulip sleet
#
import board
import digitalio
import time

esp32_reset = digitalio.DigitalInOut(board.D12)
esp32_gpio0 = digitalio.DigitalInOut(board.D10)

esp32_gpio0.switch_to_output(False)
esp32_reset.switch_to_output(False)
time.sleep(0.1)
esp32_reset.value = True
time.sleep(0.1)

esp32_reset.deinit()
esp32_gpio0.deinit()
#

this is when I was using the breakout

#

oh, wait, not a breakout, what was I doing, maybe the C6 Feather

#

honestly, I don't remember. Most of my testing was with the ESP32 breakout. The Feather has IO9 broken out, so you could make a test jig with that

tulip sleet
manic glacierBOT
#

Circuitpython does not support filtering from someModule import * when someModule contains all = ['symbol1', 'symbol2', ...]. This results in importing more symbols than intended, which can cause a little wasted memory (entries in the globals() in the scope containing from someModule import * ) and differs from CPython in ways that can introduce subtle bugs (primarily through unexpected replacement of existing symbols).

I have modified mp_import_all(...) in **py/runti...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Circuitpython does not support filtering from someModule import * when someModule contains __all__ = ['symbol1', 'symbol2', ...]. This results in importing more symbols than intended, which can cause a little wasted memory (entries in the globals() in the scope containing from someModule import * ) and differs from CPython in ways that can introduce subtle bugs (primarily through unexpected replacement of existing symbols).

This includes an enhanced mp_import_all(...) in ...

turbid radish
#

Searching for a 3.5 to 7" LCD display that has a HDMI interface that can do 640x480 (hopefully at 72Hz) for Fruit Jam. Lits of 800x400 but I specifically want 640x480 mode

turbid radish
turbid radish
#

Tag messagees #CircuitPythonDay2025

lone axle
turbid radish
#

I always welcome tips for articles & projects

candid sun
thorny jay
#

Thank you @tulip sleet

turbid radish
#

Thanks @tulip sleet !

lone axle
#

Thanks for hosting Dan. have a great week everyone 👋

manic glacierBOT
manic glacierBOT
#

This basic reproducer code seems to consistently cause a hard crash on the Fun House. It is a very pared down version of this project: https://learn.adafruit.com/funhouse-mail-slot-detector code

from adafruit_funhouse import FunHouse

funhouse = FunHouse(default_bg=None, scale=3)

def send_io_data(mail_value):
    funhouse.network.push_to_io("mail", mail_value)


print("before send to io")
send_io_data(1)
print("after send to io")

I have tested on both of these versions and behavior ...

tulip sleet
#

<@&356864093652516868>
Here is the notes document for the next CircuitPython Weekly Meeting, in two weeks, on August 11, 2025. We are doing bi-weekly meetings during July and August. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868>
https://docs.google.com/document/d/11KpdjrQUXbQ_-uasV4gLlZIPz3q-nfP7A2c9isIOVvg/edit?usp=sharing

manic glacierBOT
#

I can verify that typing the following into the REPL on RP2 returns to the REPL but causes a safe mode crash when trying to run code.py with Ctrl-D. No need to be in Paste mode or anything special. Perhaps a PIO resource isn't getting freed? Video demo of what I'm seeing attached. This is on Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Raspberry Pi Pico 2 with rp2350a

https://github.com/user-attachments/assets/935d04d1-e664-4c53-8201-5e673c3acaba

tiny peak
# lone axle https://github.com/dhalbert/cookiecutter-playground-bundle

re: meeting in the weeds discussion on the mysterious cookiecutter-playground-bundle repo that @tulip sleet didn't remember the details about... way back when (perhaps mid/late June, 2024?), there was a CircuitPython meeting where a couple folks (perhaps Dan & Jeff?) discussed how it would be useful to have a cookiecutter for building Playground guide project bundles. So, I wrote one. I still use an evolved version of that bundle builder for all my guides. But, for my purposes, it's more convenient to just copy the bundle_builder.py stuff and the associated .github folder with the action spec yaml file rather than using cookiecutter. So, I asked Dan if Adafruit would be interested in maintaining the cookiecutter I wrote, he suggested I could transfer it to him as an intermediate step (as I'm not a member of the Adafruit org), and so I did that.

#

The current contents of the cookiecutter-playground-bundle repo are out of date (code refers to 8.x and is unaware of 10.x, etc.). If anyone wanted to spruce that up a bit, a good starting point would be to compare the cookiecutter-playground-bundle Makefile, bundle_builder.py, and bundle_manifest.cfg files to the ones in any of my recent Plaground guide repos, for example, perhaps samblenny/fruit-jam-portable-midi-synth.

tulip sleet
tiny peak
#

in the mean time, we've had some great improvements to 9.x and 10.x

#

dev hours well spent

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

So, I'm wondering if this is a problem specific to the EzSBC clone of the
ESP32 feather...

Specifically the EzSBC ESP32_Feather Chip is* ESP32-D0WD-V3 (revision 3)*

I think this means that this chip is somewhere between an adafruit HUZZAH32
and an adafruit HUZZAH32 V2. I notice that there are different
circuitpython firmwares for each. Up until now I have been running
(adafruit-circuitpython-adafruit_feather_huzzah32-en_US-9.2.8.bin) as the
stable firmware on my board and it has ...

manic glacierBOT
#

The Feather ESP32V2 is qutie different from the Feather HUZZAH32. It has 8MB flash and 2MB PSRAM; the HUZZAH32 has 4MB flash and no PSRAM. That would explain the failure for the V2 firmware to work on your EZSBC board.

The EzSBC Feather differences from the HUZZAH32 are explained here: https://news.ezsbc.com/esp32-in-feather-format/. The differences are minor.

The chip version should not make a difference. It is not specified as part of the build.

There are a few other differences I see co...

manic glacierBOT
manic glacierBOT
#

Hey Dan, I had not and shelved it. Let me get back to it and let you know.

Sent from Mars


From: Dan Halbert @.>
Sent: Tuesday, July 29, 2025 8:37:21 AM
To: adafruit/circuitpython @.
>
Cc: ThinMan @.>; Mention @.>
Subject: Re: [adafruit/circuitpython] Walkmp3rson learn guide does not work with CP 9.x Freezes and displays USB not recognizable on PC Windows (Issue #9211)

[https://avatars.githubusercontent.com/u/284...

devout jolt
tulip sleet
#

we have a to-do for this somewhere. I think the issue is that it's a shared page and we have to consider how to mention both, or separate boards without sdcardio

devout jolt
devout jolt
tulip sleet
#

it is actually a "templated page", which allows us to tweak certain parts for the specific guide

#

it would be easy enough to copy this template and change the example to use sdcardio. It has to get put on someone's to-do list 🙂

#

i put it on my to-do list, but someone else might do it

devout jolt
tulip sleet
tulip sleet
#

once it's mounted, nothing different to see

#

I looked at the learn guides containing "sdcardIo" but there are not a lot of fancy audio projects

#

maybe they mostly still use adafruit_sdcard

manic glacierBOT
#

Hey Dan, I may have spoken to soon. New error. Both with 9.2.8 and 10 Beta 0

The display paints right up to displaying the name of the song and then it crashes with this error message on line 165 which is this command audio.play(mixer)

I am using all of John Parks hardware in the learn guide.

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
/sd/01_Bartlebeats_Carpeter_.mp3
/sd/02_Bartlebeats_Small_Selective_.mp3
/sd/03_Bartl...

#

Hi Dan, Nope never resolved it.

Since last posting here I finally signed up for IO+ and because that setup was running on a Qt Py S2 with IO supported sensors, I converted it over to Wippersnapper and removed the OLED completely. Although now with Wippersnapper supporting I2C OLED displays I might hook the OLED back up again.

Although that would having nothing to do with this topic using CP so adding it back under WS won't give me any useful information here. I could try running the CP co...

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit Metro RP2350 with rp2350b

Code/REPL

import time, board, busio, sdcardio
try_adafruit_sdcard = True
mount_point = "/sd"

# pin definitions
sd_sck   = board.SD_SCK   # board.GP34   # "CLK"
sd_mosi  = board.SD_MOSI  # board.GP35   # "SI"
sd_miso  = board.SD_MISO  # board.GP36   # "SO"
sd_cs    = board.SD_CS    # board.GP39   # "CS"

# sd card setup
if try_adafruit_...
tulip sleet
#

@devout jolt

Is there a method to unconfigure the PIO-USB usb host stuff?
I'm not familiar enough with it to know, sorry.

manic glacierBOT
#

Hi Dan, So I did a little more digging and tested other OS and found any higher than 9.2.5 & 10 crashes with the memory error message. 9.2.4 works fine. Thats about as far as I can go in testing. So something changed in the audiobusio subroutine.
This was fun and have a great day.
Dale Etchells aka ThinMan


From: Dan Halbert @.>
Sent: Tuesday, July 29, 2025 8:37 AM
To: adafruit/circuitpython @.
>
Cc: ThinMan @.***>; Mention...

thorny jay
#

Hello @dahn did you get your Cardputer, what version did you take? I have now two differents, the v1.0 and the v1.1.
Both run 9.2.8 without problem.
There is a behaviour difference for the v1.1.
The trick is that the neopixel(?) is only powered when the screen is powered. So at boot time, the first few blink at bootstap are not visible. Not sure how to turn off the screen, but the theory is that v1.1 can sleep and consume much less than the v1.0. The other difference relate to Wifi antena that give better reception on v1.1 (not tested but hardware only).
I have a video of both startup, if needed I can upload and share.

So the same CircuitPython firmware is good enough for both version of the Cardputer.

thorny jay
# thorny jay Hello @dahn did you get your Cardputer, what version did you take? I have now tw...

In the coming weeks, the Cardputer ADV is expected. The big difference expected is that the keyboard will not be a matrix of 4x14 (consuming that 4+14 GPIO) but there will be an I2C interface to read the keyboard. And the saved GPIO will be exposed.
So while it might be possible to boot with the same firmware, but without the keyboard.
Right now I have no clue how CP can support and I2C keyboard "natively". I am sure someone with more skills will be able to propose a way to support it.

slender iron
tulip sleet
#

@devout jolt ^^

manic glacierBOT
#

Hey Dan, Sounds good. So between Audiomix and Audiobusio. I was trying to see if there was a difference in Github but I am not really sure where to start looking in Github. I love a good mystery.


From: Dan Halbert @.>
Sent: Tuesday, July 29, 2025 3:05 PM
To: adafruit/circuitpython @.
>
Cc: ThinMan @.>; State change @.>
Subject: Re: [adafruit/circuitpython] Walkmp3rson learn guide does not work with CP 9.x Freeze...

manic glacierBOT
#

Hi. No, never understood what was going on, didn’t make sense why the baud rate would be different. I gave up on the SiLabs solution.

On Jul 29, 2025, at 7:40 AM, Dan Halbert @.***> wrote:

dhalbert
left a comment
(adafruit/circuitpython#8897)
https://github.com/adafruit/circuitpython/issues/8897#issuecomment-3132868928
@MHVUT https://github.com/MHVUT Hi - it's been well over a year. Did you ever resolve this?


Reply to this email directly, v...

#

Ok, I've figured out the issue. It happens when growing the heap with an allocation that is larger than the existing heaps total size. (This is why it works if you do the smaller 7936 allocation first. When allocating for 7937 it is growing based on the total heap size, not the in-progress allocation alone.)

We computed the size necessary for the in-progress allocation slightly wrong which resulted in expanding the heap too little, thus causing the memory error. We computed the number of blo...

#

I have built a board that includes 4 keyswitches connected to an analog input on an rp2040 mcu. I have a function which reads the analog converter and decodes the result into 4 different keyup / keydown actions.

I would like to simplify the rest of my code by using an event abstration rather than if-blocks, and saw the keypad module includes "Event" and EventQueue, which sounded great -- until I saw that it was not instantiable in normal code.

So... I guess I could reimplement EventQueue in...

lone axle
#

@tiny peak if you're interested in simplifying the build process and configuration for your project bundler, it's possible to use circup programmatically from other code, and it can target a mock device on the local filesystem instead of a real device. It will automatically download the bundle and get libraries out of it to include in the bundle zip. The Fruit Jam OS builder uses this technique here: https://github.com/adafruit/Fruit-Jam-OS/blob/main/build.py#L115-L122 It would save you from needing to list out the libraries in the config file since it can use the --auto flag, it'll also automatically grab dependencies of libraries it includes.

manic glacierBOT
tiny peak
# lone axle <@1220648290941669377> if you're interested in simplifying the build process and...

Thanks for the suggestion... I realize my approach is a bit outside the norm. If somebody wants to overhaul that stuff to work in a more typical way, go for it! I come from more of a security minded background where minimizing auto-magical stuff helps me sleep better. I worry about stuff like software supply chain attacks on pypi packages, minimizing the amount of random code that gets run on my dev box without my specific request for it to happen, and overall just minimizing opportunities for bit-rot. For my purposes, it works great to use the bundle_manifest.cfg file with a hardcoded bundle zipfile URL and hardcoded library names to be extracted from that file by my bundle_builder.py script. It's basically a low-effort equivalent of package managers that let you do lock-file style dependency version pinning with version numbers, SHA hashes, or whatever. I like it because it lets me get very reproducible results while pulling in a minimum of external code that might break or misbehave for reasons outside my control at some future time.

#

I realize most people don't care about that stuff though. If people want to use a different approach that works in a more familiar way with more automatic magic stuff, that's good too.

lone axle
#

I see upsides both ways :). Not having it pull in new versions of libraries that may be incompatible is nice about the more manual approach for instance

#

I just used the latest version of your bundler successfully on my first project with it 🎉 So thanks for sharing this tool!

tiny peak
#

yeah, one of my main priorities for the bundle builder was making it easy to have a relatively simple and stable thing for guides that would also be easy to update if needed. I just kinda slapped together the minimum thing that met that goal.

lone axle
#

And I'd say I generally worry about similar things. But I've also written lots of, and read through all of circup so I feel more comfortable with it.

tiny peak
#

yeah, for an Adafruit maintained thing, using circup would probably make a lot of sense

#

one note on usage is that when I write a guide, I usually update the board I'm using to the newest CircuitPython release and grab the latest library bundle URL to match it. My procedure for using it definitely depends on the Playground guide mentioning the specific CircuitPython version I was using

#

I don't really have a good solution for helping people update the bundle if that's needed to match an upgraded CircuitPython version

#

I'm probably gonna run into that if I end up updating all my Fruit Jam guides once I get a production rev D+ board and 10.0.0 gets released

#

to update things for 10.0.0, probably I'll just manually go through my repos and guides, bump the library bundle url, test and commit that, cut a new release, then edit the guide urls for the download project bundle buttons.

manic glacierBOT
manic glacierBOT
#

Mixed news. Rebasing off 10.0.0-beta.0 did not fix my boot looping issue, but switching from qio to dio flash mode did stopped it from looping. However, it still doesn't fully boot into CircuitPython.

This output is printed to the UART. No USB device shows up.

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xd (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x78
load:0x403cc710,len:0x848
load:0x403ce710,len:0x20b8
entry 0x403cc710...
crimson ferry
#

Is there a way in CircuitPython to programmatically get the SERCOM number on M4 for a given pin (other than a lookup table)?

stuck elbow
crimson ferry
#

SAMD51 boards have primary and secondary SERCOMs for some pins... will CircuitPython automatically use: primary only? whichever is still available?

#

(is there a way to force secondary, or mix primary and secondary by a device needing that?)

tulip sleet
crimson ferry
#

thanks, I had a bug but fixing that confirmed... I can have a device use mixed primaries and secondaries of a given SERCOM 🙂

tulip sleet
crimson ferry
#

ah, that makes sense. my issue is I'm using a Feather M4 (b/c FeatherWings) and using almost all the pins, but have 6 SERCOM devices so it's tight

tulip sleet
crimson ferry
#

yeah, I just modified one to get the pins for SPITarget 🙂

tulip sleet
#

Limor had to spend time playing musical SERCOM's to get the best pin choices on various SAMD boards.

crimson ferry
#

I can see that would be quite a challenge to optimize

#

now to see if I can juggle further and get my second UART back

#

I always thought the CS pin didn't have to be on a SERCOM on SAMD (the SPI pin finder I had doesn't use it), but for SPITarget I can't switch the CS pin willy-nilly (like, to A0 which isn't on any SERCOM)

tulip sleet
#

for the purposes of SPITarget, CS is handled by the hw so it knows data is coming in (my assumption). For sending data out, your program knows when it. There is hw support for hw-controlled CS: CTRLB.MSSEN

#

but we don't use it

crimson ferry
#

ah, ok that also makes sense, thanks

lone axle
#

Builds of Fruit Jam OS are published as zip file assets on the Github release https://github.com/adafruit/Fruit-Jam-OS/releases, much like individual libraries, and the bundle. Would we want to / is it possible to have a special link or button on https://circuitpython.org/board/adafruit_fruit_jam/ that downloads the latest Fruit Jam OS zip?

and/or sort of related, but perhaps a question for the learn devs, is it possible to have a button or link in a learn guide that automatically links to a file on the latest release of a repo without having to specify the specific release tag in the URL?

manic glacierBOT
#

hi , done following but nothing was change am still not see ftp service in nrfconnect mobile app
i rebuild my uf2 with changes in file mpconfigboard.mk
USB_VID = 0x239A
USB_PID = 0x80DA
USB_PRODUCT = "PCA10056"
USB_MANUFACTURER = "Nordic Semiconductor"

MCU_CHIP = nrf52840
UF2_NAME = "SENSERA_Device"
CIRCUITPY_BUILD_EXTENSIONS = bin,uf2

QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ"
CIRCUITPY_BLEIO = 1
CIRCUITPY_BLE_WORKFLOW = 1
CIRCUITPY_BLE_FILE_SERVI...

manic glacierBOT
#

Will there ever be displays with three highlight colors? Maybe eventually it should be an array.

Yup, I was thinking about this as well.

I will mention a suggestion I made long ago, which is to put args to the C display constructors into a struct, so we can use named arguments, use 0 as default values, etc., instead of passing dozens of arguments.

Do we have a separate issue for this? Claude may be able to do it.

manic glacierBOT
#

Some display constructors can take a lot of arguments:

  • common_hal_rgbmatrix_rgbmatrix_construct() -- 15 args
  • common_hal_busdisplay_busdisplay_construct() -- 28 args
  • common_hal_epaperdisplay_epaperdisplay_construct() -- 35 (soon 36) args

Since C doesn't have default arg values or keywords args, the arg lists are quite unwieldy.

I propose creating a struct to pass to these constructors. The struct could be initialized with named fields, and many could be omitted if the def...

#

Allow mono audiosample sources to play through a stereo audiomixer.Mixer object and add audiomixer.MixerVoice.panning (with synthio.BlockInput support).

These new features greatly improve audiomixer.Mixer usability for sample-based musical instruments. It also optimizes flash storage when stereo audio files are unnecessary when mixed with a stereo source (you'd otherwise have to double the channel count + file size).

Code Demonstration (requires appropriate mono.wav and stereo.w...

fiery pecan
lone axle
manic glacierBOT
tulip sleet
#

@slender iron I am all set to do a beta.1 release immediately (release notes done) so we can have a named release for MagTag. Anything else you want in it?

slender iron
#

nope!

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 10.0.0-beta.1
orchid basinBOT
manic glacierBOT
#

To be clear, I already have code that works, albeit not in an "event" style, so I don't need another solution for that.

What I was asking about is whether
(a) it is possible for me to add an AnalogKeys class to circuitpython core, or preferably
(b) how would the existing code be made usable from python context, so I can create my new class in python?

I say preferably (b) because it would enable lots of other use cases and simplify tinkering, but (a) works for me too.

#

Could you say more exactly what you are doing with the inputs? You're reading a variable analog voltage and interpreting it? What exactly is the mapping? To add an AnalogKey capability, it would be something that is pretty widely applicable.

The main virtue of keypad is that it does background scanning so you don't have to. Or, are you willing to do the scanning yourself, but you'd like to add events to an EventQueue? We've talked about making it possible to create your own `EventQueue...

manic glacierBOT
#

Do you need background scanning ? If so, you would have to try and make a class for the builtin keypad library in C.
If not, and you can scan "manually" often enough in your loop, you can implement it in python.

I wrote this, I believe it worked at the time, but I haven't used it since actually.
https://github.com/Neradoc/Analog_Button_Keypad/blob/main/analog_button.py

Helper class for buttons using a resistor ladder and analog output. Follows the keypad module API.

Also this to combine m...

manic glacierBOT
#

https://developer.nordicsemi.com started blocking wget as a User-Agent very recently. A Nordic DevZone user gave me an alternate URL that still works.

This broke the nordic builds on the 10.0.0-beta.1 release :frowning_face: . I am building them on a local machine.

See https://devzone.nordicsemi.com/f/nordic-q-a/123372/https-developer-nordicsemi-com-is-blocking-some-user-agent-values-on-downloads

slender iron
manic glacierBOT
orchid basinBOT
manic glacierBOT
#

On those boards that have a built-in display (and even those that don't, when a display has been connected but then the board restarts) there are several lines of text shown in the terminal before there's an opportunity to turn off the display in boot.py. For some projects, having this display eliminated would result in a much more usable project.

My current project is a kids' toy, based on an ESP32S3-TFT feather. Having that text displayed wouldn't be a good thing in this situation

A su...

orchid basinBOT
tulip sleet
manic glacierBOT
manic glacierBOT
#

Could you say more exactly what you are doing with the inputs? You're reading a variable analog voltage and interpreting it? What exactly is the mapping? To add an AnalogKey capability, it would be something that is pretty widely applicable.

The main virtue of keypad is that it does background scanning so you don't have to. Or, are you willing to do the scanning yourself, but you'd like to add events to an EventQueue? We've talked about making it possible to create your own `Even...

manic glacierBOT
#

Do you need background scanning ? If so, you would have to try and make a class for the builtin keypad library in C. If not, and you can scan "manually" often enough in your loop, you can implement it in python.

I wrote this, I believe it worked at the time, but I haven't used it since actually. https://github.com/Neradoc/Analog_Button_Keypad/blob/main/analog_button.py

Background scanning would be nice, indeed, but I can cope with calling a scan function manually.

I do like the keypa...

manic glacierBOT
#

Hi @CDarius, your PR #9093 added this board. The error above looks like a copy-pasta problem. Do you have the board? Would you be willing to submit a PR to fix, and maybe double-check the other pin assignments? Thanks.

If you do submit a PR, could you group pin aliases (same pin, different names) together, and add blank lines before and after? That makes it easy to see the aliases.

manic glacierBOT
#
Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit Fruit Jam with rp2350b

With this code which is embedded in I2C page of many learn guides:

import board
import busio
from microcontroller import Pin


def is_hardware_i2c(scl, sda):
    try:
        p = busio.I2C(scl, sda)
        p.deinit()
        return True
    except ValueError:
        return False
    except RuntimeError:
        return True


def get_unique_pins():
    exclude = [
        getattr(board, p)
      ...
#

It does still occur for me under 10.0.0-beta.2.

However I have noticed another weird quirk about it. If I run the code with USB_HOST_DATA_MINUS in the exclude list and let it finish, then modify the code to remove USB_HOST_DATA_MINUS from the list and Ctrl-C / Ctrl-D it seems to run without the hard crash and complete successfully including printing some pin pairs that have USB_HOST_DATA_MINUS.

manic glacierBOT
manic glacierBOT
#

Possible this isn't relevant, but just in case... I got a different I2C safe mode thing yesterday on my Fruit Jam rev B (error message about missing pull ups). That one seemed to be caused by leaving my HDMI capture card plugged into the Fruit Jam (I2C EDID EEPROM) without having the capture card plugged into its own USB power source. Apparently the capture card was loading the I2C pins and confusing the CircuitPython core.

Have you checked to see if reproducing your issue has any sensitivit...

#

This did originally occur while the Fruit Jam was connected via HDMI to my capture card (though fully powered and connected to computer), and actually an AHT20 connected via STEMMA cable as well.

I removed the AHT20 before the test on beta-2, and have unplugged the HDMI cable now as well, and confirmed I still the same hard crash with nothing else plugged in to the fruit jam beyond the USB C cable powering it and providing serial console.

#

I was able to reproduce this on my Fruit Jam rev B by running your code above on 10.0.0-beta.2. Serial output made it this far before the board reset and I got a "disk not ejected properly" error from macOS:

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
SCL pin: board.A1        SDA pin: board.A0
SCL pin: board.A1        SDA pin: board.A4
SCL pin: board.A1        SDA pin: board.BUTTON1
SCL pin: board.A1        SDA pin: board.BUTTON2
SCL...
ionic elk
#

I have an update to my rclcpy module that has a lot of divergence between the common-hal and shared-bindings. Common hal has a new registry file that contains a type registry helper, and shared-bindings has a whole new folder for message classes that don't have any common-hal requirements. Should I be putting some of this stuff in shared module, or tweaking circuitpy_defns.mk in some special way?

#

as far as I can tell circuitpy_defns.mk expects exact file parity between common-hal and shared-bindings, which I guess I can fake with a bunch of empty files but it seems a bit silly

manic glacierBOT
tulip sleet
ionic elk
#

There's no implementation in the files, it's just making Python class types

#

To be more specific, I have a new submodule to rclcpy called std_msgs that contains Int32.c, Bool.c, etc, representing ROS message types as micropython classes

#

Well, barely any implementation. All they do is assign variables to the internal object.

tulip sleet
#

This sounds like the same case: shared-bindings/microcontroller/ResetReason.* is just an enum using py/enum.h. There aren't any shared-module/ResetReason.* or common-hal/ResetReason.* files. So you could look to see how ResetReason.c is handled in the make files

ionic elk
#

Ok, I'll check that out, thanks dan!

manic glacierBOT
manic glacierBOT
crimson ferry
#

has anyone seen espressif (S3 specifically) boards locking up, as in CIRCUITPY still accessible, but serial freezes and the board blinks red (one is alpha.7, the others are beta.0) ...no exceptions, no safemode detected

tulip sleet
crimson ferry
#

some were mainly I2C or SPI , others used wifi.monitor ...I'll upgrade, then see if I can narrow it down

tulip sleet
#

but could be a lot of other things

manic glacierBOT
#

The main virtue of keypad is that it does background scanning so you don't have to. Or, are you willing to do the scanning yourself, but you'd like to add events to an EventQueue? We've talked about making it possible to create your own EventQueue objects, but haven't done that yet.

Basically I am asking how to go about making an update to the keypad module/class group that supports AnalogKeys, where a key is defined in the fairly generic way shown in my code snippet above (i.e. a t...

tiny peak
# crimson ferry has anyone seen espressif (S3 specifically) boards locking up, as in CIRCUITPY s...

I've seen some of those symptoms happen before (CIRCUITPY drive still mounted in macOS but serial console is unresponsive). This has definitely happened to me on RP2350 boards when using USB host with devices that send a lot of data (high speed gamepad, MIDI controllers with MPE, etc). I can't remember if I've also seen this on ESP32-S3 in combination with using a MAX3421E USB host FeatherWing, but it's definitely possible. I know I saw some pretty weird glitches with USB host on ESP32-S3 last year, but this year I've been doing RP2350, so my memory is a bit hazy on details.

#

another thing... sometimes I get a kinda similar issue when attempting to sync code to the CIRCUITPY drive while the board is running code that's doing a lot of USB host IO. In that case, my rsync process will hang, the serial console will hang, and the macOS finder will become slow (perhaps with spinning beachball cursor). The CIRCUITPY drive still looks like it's mounted, but it doesn't actually work. In that case, the board will sometimes reset it self eventually, but it can take a while. Usually I just manually reset when that happens.

#

I think that case has to do with macOS recently introducing some weird behaviors when writing to FAT filesystems

#

my impression is that there are probably some places in the CircuitPython core where the TinyUSB USB device implementation can get starved for CPU by other IO handling code in the core.

#

...or at least there seems to be some kind of race condition, interrupt handler priority fight, stack corruption, use after free, or something.

#

like, a time or two I've seen garbage strings get returned if I try to use the adafruit usb host library to check device manufacturer and product strings.

#

since you mention ESP32-S3 specifically, and most the other ESP boards (excepting S2) don't have USB device support, I wonder if maybe there's some kind of race condition / interrupt fight thing going on between TinyUSB and wifi.

crimson ferry
#

I've also seen something similar to the first thing you mentioned... copying to/from CIRCUITPY while (certain?) code is running may cause trouble for macOS Finder, sometimes it recovers, sometimes I get impatient

manic glacierBOT
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

This implements video mode timing changes suggested by @WolfWings in circuitpython issue #10242. Previously, picodvi was set so that 640x480 and 720x400 used refresh rates faster than 60Hz. These changes lower the refresh rate to 60Hz which should hopefully be compatible with a wider range of HDMI devices.

Checks:

  • [x] pre-commit passed
  • [x] tested at 320x240 (640x480) on Fruit Jam rev B with my Samsung TV and it reported 640x480@60Hz. That mode also worked with my picky AverMedia capt...
manic glacierBOT
#

If anybody wants to try testing a CI build with the 60Hz timing changes suggested above, I just submitted a PR implementing those changes: https://github.com/adafruit/circuitpython/pull/10534

In my limited testing (Fruit Jam rev B board), the new timings seem to work nicely.

If you want to test a CI build:

  1. Scroll down to the bottom of the pull request: https://github.com/adafruit/circuitpython/pull/10534 and look under the "All Checks have passed section" (expand it if necessary) for th...
main furnace
#

Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit LED Glasses Driver nRF52840 with nRF52840

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

CircuitPython 9.2.8 on M5Stack Core S3

Code/REPL

import digitalio
import board
import adafruit_sdcard

spi = board.SPI()
cs = digitalio.DigitalInOut(board.SDCARD_CS)
sdcard = adafruit_sdcard.SDCard(spi, cs)

Behavior

Traceback (most recent call last):
  File "", line 1, in 
  File "adafruit_sdcard.py", line 112, in __init__
  File "adafruit_sdcard.py", line 133, in _init_card
OSError: no SD card

##...

#
ionic elk
#

Does Circuitpython diverge from micropython on the creation of class constant types? I'm noticing that the recommendation of usermod:

const mp_obj_type_t vector_type = {
    { &mp_type_type },
    .name = MP_QSTR_vector,
    .print = vector_print,
    .make_new = vector_make_new,
};

does not work

#

I get error: 'mp_obj_type_t' {aka 'const struct _mp_obj_type_t'} has no member named 'print'

#

MP_DEFINE_CONST_OBJ_TYPE appears to be the widely used replacement but I can't find proper documentation for it anywhere, it's got a lot of macro shenanigans going on behind the scenes so I don't like that I'm cargo coding with it

#

MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS is also very common and undocumented, don't really know what it does

stuck elbow
#

I'm trying to build 10.0.0-beta.2 and I'm getting:

In file included from esp-idf/components/esp-tls/esp_tls.h:11,
                 from ./common-hal/socketpool/Socket.h:13,
                 from ../../shared-bindings/socketpool/Socket.h:9,
                 from ../../shared-bindings/socketpool/SocketPool.h:13,
                 from common-hal/socketpool/SocketPool.c:7:
esp-idf/components/esp-tls/esp_tls_errors.h:12:10: fatal error: mbedtls/error.h: No such file or directory
   12 | #include "mbedtls/error.h"
      |          ^~~~~~~~~~~~~~~~~
#

and a whole lot of other missing files, is there an additional step now?

stuck elbow
#

same for beta.1 and master

random junco
stuck elbow
#

doesn't look like it

#

it looks like the entire mbedtls is missing from the esp-idf

manic glacierBOT
#

Adds ROS2 message type support to the rclcpy module. Creating a Publisher now requires a ROS message type - all future messages must adhere to that message type. A small group of simple test messages are available in the std_msgs submodule of rclcpy, including Int32 and Bool. Message type detection is done through a type registry, and the appropriate C level information passed to the Micro-ROS interface. Ideally, future messages and message packages will be supported with an automated class...

ionic elk
#

@tulip sleet ^ feature complete PR of the new ROS2 message system up if I could entice you to look at my stab at a class registry. Still needs a bit of cleanup I'll tackle this weekend.

manic glacierBOT
#

I'm re-opening this because it's still present. I'm using 10.0.0 beta 2. I've updated all python code that's running from the source repos, and re-compiled using the current mpy-cross command line utility. I routinely get:

Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.
Please file an issue with your program at github.com/adafruit/circuitpython/issues.
Press reset to...
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-beta.2-dirty on 2025-08-01; uGame S3 with ESP32S3

Code/REPL

import audiobusio
import array
import audiocore
import board
import math

length = 8000
sine_wave = array.array("h", [0] * length)
for i in range(length):
    sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15))

audio = audiobusio.I2SOut(
    board.AUDIO_BCLK,
    board.AUDIO_LRCLK,
    board.AUDIO_DATA,
)
sample = aud...
manic glacierBOT
manic glacierBOT
#

I tested on three different HDMI monitors, 360x200, 720x400, 640x480, 320x240. Specs from the Dell manuals are included, but I'm not sure how helpful they are.

#

Is that any better or worse than with 10.0.0-beta.2?

With 10.0.0-beta.2:

  • Samsung UN50NU6900 TV, circa 2018: 640x480 and 320x240 work. 360x200 and 720x400 do not. (latter two DID work with this PR).
  • Dell S2421HS monitor: 640x480 and 320x240 work. 360x200 and 720x400 do not. (same as PR)
    *Dell U2412M monitor (has a old-style DVI socket): NO modes work. (same as PR)

So the PR is an improvement on the most flexible monitor.

I am doing this all with request_display_config() fro...

manic glacierBOT
#

So... reading a bit about video modes, and comparing that to your monitor specs, it seems that the sync polarity of the current code might be wrong. Currently it has this:

#define MODE_720_H_SYNC_POLARITY 0
...
#define MODE_720_V_SYNC_POLARITY 0

Based on my reading of your specs, some web searching, and some wild guessing, I think 0 means negative sync, so -/- would be right for 640x480, but not 720x400 (may need -/+). Perhaps if you found the correct value for changing `MODE_...

manic glacierBOT
manic glacierBOT
#

TL;DR: Sync polarity exists almost only from daisy-chaining so many standards in a row over the decades from the first VGA monitors all the way to the DVI standard that still had that vestigal "technically we can run analog too" support, so I admit I left them all at 0.

It's a vestige from the earliest analog CRT days, it was a way to encode 2 extra bits of data for the lowest of the low-end monitors that had dedicated circuits to handle each video mode they supported, the proverbial 'I pl...

manic glacierBOT
manic glacierBOT
#

Thank you for this analyze.
I had the same problem on another board (cardputer) with code I was copy/pasting, and there was a displayio.release_displays() that I did not notice.
@FoamyGuy troubleshooting could be in a FAQ, that is what saved me.

Maybe in guide that use displayio.release_displays() could first check that board.DISPLAY does not exist?
Maybe exactly the same code can work with or without build in display?

manic glacierBOT
#

I have one monitor (my most flexible one) that likes 720x400 via EDID and that is at 70 Hz. I would suggest leaving that resolution at 70 Hz. My Adafruit HDMI capture dongle amazingly likes the existing 720x400 also.

Nearly all EDIDs, if they support 640x480, want 60 Hz. My "likes a lot" monitor will take 640x480 at 72 and 75Hz also but a vast majority do not. This has made finding a small (3.5") HDMI panel for a cyberdeck near impossible, finding one that will display >70Hz when the "stan...

manic glacierBOT
#

@samblenny @RetiredWizard @danh To test this PR how do I get a UF2?

To find the artifacts, click on one of the builds, above (after opening up the collapsed list), then click "Summary" at the top of the left sidebar and look for "Artifacts" on the page. Here is a direct link: https://github.com/adafruit/circuitpython/actions/runs/16670995112/artifacts/3665739340. You'll then need to unzip it.

manic glacierBOT
manic glacierBOT
#

If you're talking about the Lilygo repository those examples are Arduino, not CircuitPython. You'll probably want to use one of the Lilygo support forums for help with those.

If you want to use CircuitPython the first thing you'll need to do is flash the device with CircuitPython. That can be done from the circuitpython.org website. Click on Downloads, search for T-Deck and then use of the "Open Installer" buttons.

If you have any questions on using the installer or running CircuitPython c...

manic glacierBOT
#

@samblenny @RetiredWizard @danh To test this PR how do I get a UF2?

To find the artifacts, click on one of the builds, above (after opening up the collapsed list), then click "Summary" at the top of the left sidebar and look for "Artifacts" on the page. Here is a direct link: https://github.com/adafruit/circuitpython/actions/runs/16670995112/artifacts/3665739340. You'll then need to unzip it.

Ok, downloaded to a fresh Rev D FJ, libraries added, code runs 640x480 on the Adafruit ...

manic glacierBOT
manic glacierBOT
#

720x400 @60Hz works on my workhorse do anything display even though the EDID says it wants 70 Hz
and works on the Adafruit capture dongle (EDID of dongle just tested lists 640x480 @60 and 800x600 @60, no 7420x400 modes but does list 1400x1050 and 1440x900 both @60Hz.

I think for changing the two supported resolutions to 60 Hz increases compatibility.

Note to @dhalbert - I do get memory allocation errors likely related to a PR you were recently fixing, throwing an error allocating 0 byt...

#

@WolfWings thanks. I did some testing with the altered CPU speeds. 126_000_000 works with beta.2 at 640x480 on the U2412M old DVI monitor. This monitor may be from 2017 or so. 126_000_000 does not work with the PR build.

141_500_000 unfortunately is not a valid CPU frequency. The closest valid ones are 141_000_000 and 141_600_000. Neither works with the U2412M at 720x400 with either build, though, which is too bad.

This is the datasheet for the video chip used for the U2412M.
...

#

3. We don't have any test results demonstrating that changes in this PR would cause problems for displays that previously worked before the changes

What i just posted as https://github.com/adafruit/circuitpython/pull/10534#issuecomment-3146717975 shows a regression in the PR build if I adjust the CPU frequencies. Maybe that makes sense, because the changes in the PR were assuming 125 MHz.

#

I can see where Adafruit Support gets some angry customer or two saying they needed some specific overclock but X or Y failed to work at "their" frequency.

Yeah, my hope for this PR is that it can get merged for 10.0.0 to improve the out of box experience for people getting new Fruit Jam boards. I'm hoping this will let people run more of the sample code with the displays they have and cut down on the need for display-related support requests.

It would definitely be nice to support ev...

manic glacierBOT
#

Latest tests, and with some interesting results that may be helpful:

https://code.circuitpython.org/ just blinks leds over and over with the
spinning python wheel for infinity still (without and with a battery)

*With Thonny on the beta firmware for the V1 (without a battery): *

ets Jul 29 2019 12:21:46

rs����
Device is busy or does not respond. Your options:

  • wait until it completes current work;
  • use Ctrl+C to interrupt current work;
  • reset the device and try agai...
#

The V2 firmware did not work with or without a battery and just does that reset over and over again but can display on the serial output like I posted before.

The V2 firmware is for a board with a different amount of flash and PSRAM. It is not suitable for your board.

Your "clone" board is somewhat different than the HUZZAH32. Not much, but somewhat, as I mentioned above. I was not able to reproduce what you saw on the HUZZAH32. But I will try a bit more. We can't really say that similar ...

#

Thanks Dan, Makes sense.

I've got an S3 with native usb on order already from Adafruit, so if you
would like me to mail this to you to fiddle around with, let me know. I
know it's not a high priority, but if it's something you would like to look
into more I am happy to donate this board to the cause. It has already
served its initial purpose to help me dive into the world of circuit python
and I already love it way better than arduino code and compiling.

You can email me directly t...

manic glacierBOT
#

@WolfWings thanks. I did some testing with the altered CPU speeds. 126_000_000 works with beta.2 at 640x480 on the U2412M old DVI monitor. This monitor may be from 2017 or so. 126_000_000 does not work with the PR build.

The last bit is expected, as with the PR build you'd be trying to get it to sync on a 50.4Hz refresh rate which is too low for most monitors to accept, though a lot of TVs happily will. Changing the CPU speed is the way to force the 640x480 bitstream as close as poss...

#
  1. We don't have any test results demonstrating that changes in this PR would cause problems for displays that previously worked before the changes

What i just posted as #10534 (comment) shows a regression in the PR build if I adjust the CPU frequencies. Maybe that makes sense, because the changes in the PR were assuming 125 MHz.

Minor correction, the changes in the PR are assuming 150Mhz, the stock ...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b
Board ID:adafruit_fruit_jam
UID:5A5DC2FB5BCDD764

Code/REPL

# SPDX-FileCopyrightText: Copyright (c) 2024 ladyada for Adafruit Industries
#
# SPDX-License-Identifier: MIT

import board
import pulseio
import adafruit_irremote

# IR receiver setup
ir_receiver = pulseio.PulseIn(board.IR, maxlen=120, idle_state=True)
decoder = adafruit_irremote....
manic glacierBOT
#

I was able to reproduce this on one of the new Fruit Jam rev D production boards with 10.0.0-beta.2 using simpler code:

import board
import pulseio
pulses = pulseio.PulseIn(board.IR, maxlen=200, idle_state=True)
print("Listening for pulses...")
while True:
    if len(pulses) > 0:
        print(pulses.popleft())

When I press buttons on an IR remote, I see the red LED blink, but no pulses are detected.

To convince yourself that the code should work, try this variation (board.BUTTON1...

manic glacierBOT
#

It's a local server. I wrote a test case that makes 10 HTTPS POST requests per second, and right now it's ticking past 9,000 with no errors.

The application has two other components. It has a ST7789 display that it writes data to, and a TMP102 I2C sensor that it reads once per second.

@dhalbert Is there any way that I can debug where in my main code set the hard fault is happening? I have a Pico debugger if that's useful.

CircuitPython core code crashed hard. Whoops!
Hard fault: memory...
manic glacierBOT
#

You could set a breakpoint on reset_into_safe_mode(), and then look at the stack backtrace. It would be good to compile in debug mode so you can get more info. But sometimes that eliminates a bug because the code or timing is different.

I would say use your original program, but just speed up the POSTing to be every time you read the temperature sensor. If you can then get it to fail, then comment out the display code and see what happens, and if that doesn't cause the problem to go away, ...

manic glacierBOT
#

CircuitPython version and board name

version:

Adafruit CircuitPython 10.0.0-beta.2-dirty on 2025-08-05; Firebeetle 2 ESP32-P4 Dev Board with ESP32P4


board name:
DFRobot’s Firebeetle 2 ESP32-P4 Dev Board ([https://www.dfrobot.com/product-2915.html](https://www.dfrobot.com/product-2915.html))

Code/REPL

import time
for i in range(1,10000):
    print(i)
    time.sleep(1)

Behavior

After power-cycling or replugging the USB-C cable, the connection rand...

manic glacierBOT
#

mpconfigboard.mk:

USB_VID = 0x303A
USB_PID = 0x1001
USB_PRODUCT = "Firebeetle 2 ESP32-P4 Dev Board"
USB_MANUFACTURER = "DFRobot"

IDF_TARGET = esp32p4

CIRCUITPY_ESP_FLASH_SIZE = 16MB
CIRCUITPY_ESP_FLASH_MODE = qio
CIRCUITPY_ESP_FLASH_FREQ = 80m

CIRCUITPY_ESP_PSRAM_SIZE = 32MB
CIRCUITPY_ESP_PSRAM_MODE = hpi
CIRCUITPY_ESP_PSRAM_FREQ = 200m

DEBUG = 1
ENABLE_JTAG = 1

JTAG port output:


<= [2025-08-05 16:08:57.359]: ESP-ROM:esp32p4-eco2-20240710
Build:Jul 10 2024
rst:0x17 (CHIP_US...
fleet hollow
#

@lone axle Thanks for the recent color palette PR merge in Fruit-Jam-OS! I was looking deeper into the code and just now noticed the implementation of a launcher.conf.json file to turn mouse support on and store favorite apps. Instead of environment variables for the color palette, should they instead be moved over there? And are there any plans for documentation of the implementation of that file in the future?

lone axle
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The USB_HOST_5V_POWER pin mentioned in this issue (RP2550 GPIO11) is wired up to a MOSFET that can switch the power output on the VBUS net. Looks like you could use it to switch power on and off to devices on the USB host ports.

If you have more general support questions about using Fruit Jam pins, some good options for getting support are:

  1. Adafruit Discord's help-with-circuitpython channel
  2. Adafruit forum
  3. Check the board, schematic, or pinout documents at https://github.com/adafruit...
manic glacierBOT
#

Looking at the schematic from https://github.com/adafruit/Adafruit-Fruit-Jam-PCB, I'm wondering if this is an E9 erratum thing since the output of the IRM-H6XXT receiver module appears to be routed through a 10K resistor. I'm far from an expert on such things, but by my reading of Dan's description at https://github.com/raspberrypi/pico-feedback/issues/401, it sounds like maybe this would meet the right conditions? I could be totally wrong about that.

manic glacierBOT
#

@samblenny,

Thank you for pointing out R32 - 10k ohm. In reading the documentation for the IR Receiver the 10k resistor should be going from the output of the receiver to 3.3 volts not the GPIO pin and the Red LED. There is a good chance the IR Receiver will work if R32 is replaced by a Zero ohm resistor. As it is the output of the IR Receiver is fighting with the 2.2k resistor and Red LED to get to the GPIO pin. The GPIO pin will always see a high, which it does.

If R32 is replaced wit...

#

Have you tried using board.A0? On my board, the top plate silkscreen label for the analog port has two lines. The bottom line with "JST-PH" is identifying the connector type. Do you see the top line with "A0" which is identifying the pin?

There is already a board.A0 defined:

Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b
>>> import board
>>> hasattr(board, 'A0')
True
manic glacierBOT
lone sandalBOT
lone sandalBOT
manic glacierBOT
#

这是意料之中的。ESP32-P4 相当新。请确保使用 make DEBUG=1 进行构建。这样,CP 运行时 IDF 日志记录将保持开启状态。您显示的日志仅出现在引导加载程序中。

make BOARD=firebeetle2_esp32p4 clean
make BOARD=firebeetle2_esp32p4 DEBUG=1 V=9
make BOARD=firebeetle2_esp32p4 DEBUG=1 PORT=/dev/cu.usbmodem14201 flash

However, no additional logs appear, whether in the serial port output of JTAG or in the REPL output of CircuitPython.
When the REPL of CircuitPython is disconnected, and there is no additional log output from JTAG, it indicates that the deve...

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-31; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM

Code/REPL

import digitalio
import board

try:
  i2c_power = digitalio.DigitalInOut(board.I2C_POWER)
  i2c_power.direction = digitalio.Direction.OUTPUT
  i2c_power.value = False
  time.sleep(0.1)
  i2c_power.deinit()
except Exception as e:
  log(f"Failure turning off I2C power: {e}", level="ERROR")

Behavior

I get the ...

ionic elk
#

@tulip sleet As I work on refactoring out some of the old usermod stuff I was using, should I remove or refactor the _print functions I made based on the old usermod class docs? Are they superseded by any circuitpython automated stuff? They don't seem super common in shared-bindings

#

stuff like

static void bool_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
    (void)kind;
    rclcpy_std_msgs_bool_obj_t *self = MP_OBJ_TO_PTR(self_in);
    mp_print_str(print, "Bool(data=");
tulip sleet
#

ag -Q '_print(' |more will show more.

manic glacierBOT
#

Summary

Add os.urandom() support to the analog port. Users can now generate random numbers utilizing the TRNG (true random number generator) hardware on the analog port.

The following code generates multiple random numbers and prints them in hex:

import os
print(os.urandom(4).hex())
print(os.urandom(3).hex())
print(os.urandom(2).hex())
print(os.urandom(1).hex())

An example of the expected output is:

bb4f0ebb
8b2dd8
918b
ac

Testing

After I fin...

tiny peak
#

Question for people who work on the CircuitPython core and built-in frozen modules: What's your preferred IDE or editor to use? I'm getting semi serious about starting a quest to troubleshoot various USB host glitches that have been bugging me. I'm thinking it would be easier if I had more editor support for navigating between related code compared to what I usually use (BBEdit or vim).

#

I'm specifically curious about editing tools that help with type checking, static analysis, and navigating between definitions of and references to variables, functions, classes, etc.

#

Bonus points for tools that might help to identify common C problems like failure to guard against null pointers, possible buffer overflows, use after free, and so on.

manic glacierBOT
tulip sleet
tiny peak
#

oh... interesting. I tend to be pretty primitive about it and use stuff that works over ssh. Have actually used emacs some in the past, but hadn't heard of TAGS files or ag, so I'll put those on the list of stuff to read about. Thanks!

tulip sleet
#

Jeff Epler has used some code-analysis tools to catch various code erros

#

there is also TAGS support in vim

#

read about etags

#

besides ag, there is also rg, pretty similar

#

ag is aka silversearch

tiny peak
#

yeah, my goto is grep -ir '...' * from the shell

#

it's a little on the primitive side

tulip sleet
#

ag and rg are extremely fast, much faster than grep -r

tiny peak
#

okay, cool I'll read about those

tulip sleet
#
halbert@cod:~/repos/circuitpython$ time ag foobar >/dev/null

real    0m2.276s
user    0m3.764s
sys    0m5.750s
tiny peak
#

thanks

slender iron
#

I'm using zed now to get LLM powered autocomplete. I don't do much code navigation with it though. The main thing you should get for USB host debugging is a USB sniffer. That way you can see all of the packets from an agnostic source.

#
tulip sleet
#

I have successfully made traces with the Cynthion

#

The Beagle only puts out a proprietary format and .csv. Scott wrote a converter from the .csv dump to .pcapng. The Packetry software for the Cynthion generates .pcap directly

manic glacierBOT
#

I want to make the USB host implementation more useable for game and synth projects. I'm posting this issue in the hope of getting feedback and core dev buy-in for my list of stuff I'm hoping to fix:

  • [ ] Unreliable Unplug Event Detection: There's currently no good way to detect an unplugged USB device (some exceptions resulting from an unplug look the same as other types of timeouts). Desktop PyUSB handles this by setting usb.core.USBError.errno and usb.core.USBTimeoutError.errno.
    ...
full plume
manic glacierBOT
full plume
#

Since my primary dev system is currently a Windows system, I'm running CircuitPython builds under WSL. That works fine - VSCode even has a specific mode for "WSL based" workspaces.

#

The one squishy bit I haven't gotten fully working yet is running the firmware reliably / easily in debug over USB.

#

I've done a bit and I think it's plausible (maybe someone already has it working?) but I haven't seriously needed it yet.

tiny peak
manic glacierBOT
tiny peak
full plume
# tiny peak That sounds interesting. I hear it also supports ripgrep, cscope and other stuff...

I hadn't heard of ripgrep or cscope. Honestly though, unless you're already used to them you probably wont' need them if you're using VSCode. Getting VSCoder "set up properly" is partly about using the right extensions, but mostly about configuring your workspace so it knows where to find and how to "process" your source. For example, include paths and relavent conditional compilation macros for C/C++, and interpreter version / venv / library path for python. Once that's set up properly, you can simply CTRL-RightClick on just about anything and it will take you right to the declaration/definition.

tiny peak
#

that sounds cool. I'm particularly curious about static analysis stuff because some of the bugs I've seen while using the USB host API smell like some of the stereotypical memory corruption bugs that commonly happen in C.

#

...random garbage or all zeros in places that should have a string or an int, and so on.

full plume
#

VSCode also has recursive directory regex search/replace built in (i.e. while there is a ripgrep extension available, it already supports very similar functionality). IIRC the regex syntax is mostly compatible with python's re expression format. The only quirk that comes up frequently is you need to use $1 and $1 for the replace expression instead of 'using \1 and \2 like python'

full plume
# tiny peak that sounds cool. I'm particularly curious about static analysis stuff because s...

Haven't stressed the memory related static analysis bits for C code much so I can't say how comprehensive it will be. Almost all my serious embedded code has been in C++ for a long time, and I'm quite careful with memory - almost everything is reference counted and/or RAII wrapped. Doesn't mean I never have memory corruption issues, but when they occasionally come up it's almost always because of order-of-initialization problems with "global" / singleton variables or access from multiple threads without proper concurrency management (or bugs in other libraries my projects depend on)

slender iron
manic glacierBOT
#

@ladyada,

I have found what I think is R32. It is right next to the IR Receiver and measures 99.9k. I have a hot plate so if I can get the new resistor I can try replacing it myself. If I was to ask for a replacement Fruit Jam, I would wait until the rush dies down.

How would I find out what the new R32 value is?

If I get a replacement R32:
Because I have in-tension tremors, I would need to take a shot of Scotch about 30 minutes before I start work.
Yes alcohol calms in-tension tremors....

manic glacierBOT
#

@dhalbert

I did get a hard-crash using a simplified program:

Request counter=15110
Exception: Repeated socket failures
Request counter=15120
...
Request counter=20870
Exception: [Errno 116] ETIMEDOUT
Request counter=20880
...
Request counter=21260
Request counter=21270
                                 Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction err...
manic glacierBOT
manic glacierBOT
#

I took the code, and commented out the SSL bits and changed the URL to non-SSL. The TCP/IP stack is just rubbish, and this proves it. Here's the output:

192.168.168.126 | code.py | 10.0.0-beta.2Request counter=10wrValue);
Request counter=20
Request counter=30
Request counter=40
Request counter=50
Request counter=60
Request counter=70
Request counter=80
Request counter=90
Request counter=100
Request counter=110
Request counter=120
Request counter=130
Request counter=140
Request counter=15...
tulip sleet
manic glacierBOT
#

I stripped out the SSL connection but it still crashes with the simplified code. So either the TCP stack is unstable, or just the whole of circuitpython is unstable.

Request counter=47980
Request counter=47990
                                     Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.
Please file an issue with your program at github.com/a...
manic glacierBOT
#

I found the issue.

I had another local function referencing the pin during initialization, probably one minute before the device went to sleep. It works now when I removed that.

Is it so that you always need to deinit() a pin after usage, even if you are only using it temporarily in a local function without maintaining it in a global variable?

import digitalio
import board

# Function 1
def i2c_function_1():
 try:
  i2c_power = digitalio.DigitalInOut(board.I2C_POWER)
  i2c_power....
lone sandalBOT
manic glacierBOT
#

So either the TCP stack is unstable, or just the whole of circuitpython is unstable.

The structure of the code is that the wifi API's use https://github.com/georgerobotics/cyw43-driver underneath, to talk to CYW43 radio module. That uses lwip. Since you ruled out TLS, we don't have to look at mbedTLS, which is also used.

So it looks like it takes a few tens of thousands of calls on average to hit the bug. Is there a high variance in the number of calls? Did you add the gc.collect() ca...

#

Is it so that you always need to deinit() a pin after usage, even if you are only using it temporarily in a local function without maintaining it in a global variable?

If you're really done with it, then you should deinit it. Internally there is storage and state to make the pin work, and there are hardware settings. So create the DigitalInOut object once and pass it around. It doesn't have to be literally global, but it needs to be shared.

manic glacierBOT
orchid basinBOT
manic glacierBOT
#

I know it has been a while, but I was experiencing a similar issue this morning. Circuitpython 10.0.0-beta2 on the esp32-s3 with 2MB PSRAM. Switching to vfs.open fixed the issue for me, but only in conjunction with removing the storage.mount(vfs, '/sd') call. Leaving in storage.mount(vfs, '/sd') works fine when the board is powered independently, but when connecting to my computer this crashes CircuitPython. Looks to me @raquo was right about "bad things" on April 2nd, this may be creat...

manic glacierBOT
slender iron
#

@tulip sleet I'm going to switch epd to a struct so I can add partial commands

manic glacierBOT
#

There's currently no good way to detect an unplugged USB device using the usb.core.Device API. Unplugging will occasionally raise an immediate usb.core.USBError, but often it just results in a delayed usb.core.USBTimeoutError when you next try to poll the USB device. There's nothing about such USBTimeoutError objects to distinguish them from other timeouts that happen in the normal course of polling some USB devices (e.g. USB receivers for wireless gamepads).

Desktop PyUSB handles un...

#

Currently (10.0.0-beta.2) the usb.core.Device API sometimes returns null values (vid/pid of 0) or strings with random garbage when you try to access the .idVendor, .idProduct, .serial_number, .product, and .manufacturer properties of usb.core.Device.

I know this is very vague, but I haven't figured out how to reproduce it consistently. I've taken to using my own USB device descriptor parser as a workaround, so I haven't researched it carefully yet.

I'm posting this issue at ta...

#

Currently (10.0.0-beta.2 on Fruit Jam), when reading MIDI messages by USB Host from USB MIDI controllers, note on or note off messages sometimes mysteriously go missing. This also happens for other message types, but note on/off is the most problematic. By "go missing", I mean that the relevant data never shows up as the result of a call to usb.core.Device.read().

I know this is very vague, but I haven't figured out how to reproduce it consistently. My Playground guide at https://adafruit-...

#

Currently (10.0.0-beta.2 on Fruit Jam), it seems like polling for USB host device input events with usb.core.Device.read() uses a lot of CPU time compared to reading GPIO pins or I2C. I know this is vague. All I have at this point is anecdotal observations that USB polling in combination with picodvi and/or synthio appears to load down the RP2350 CPU (slow display updates, dropped notes, etc). For example, last year (around 9.1.4), when foamyguy ported my [Pumpkin Toss](https://adafruit-pla...

manic glacierBOT
#

I have been unable to reproduce this on 10.0.0-beta.2, on a Feather ESP32-S2. I was doing HTTP (not HTTPS) POST's to httpbin.org, and then doing HTTP GET's to a local server. I'm powering it with a power-only USB cable. I don't see stray directory entries. I sped up the sleep a lot so it's waking up after 5 seconds. I believe you saw this, but I'm not sure how to reproduce. This could be some kind of brownout issue with the flash, since there's otherwise no writing of the flash going on. The ...

manic glacierBOT
manic glacierBOT
#

I had a lot of problems with memory consumption with TLS. If I tried to do two different SSL sites, it was pretty much game over, out of memory. I spent a lot of time trying to work around that. I ended up making my system a proxy for the other system to work around it.

Here's the non-ssl code:

import adafruit_requests
import json
import socketpool
import ssl
import time
import wifi
import gc

ssid="mhsoftware"
psk="WonderNet"
while True:
    try:
        res = wifi.radio.connect...
#

I spent a lot of time troubleshooting memory problems with SSL. On a pico w, I could make SSL work with one certificate in my application, but if I tried to use two, I ran out of memory immediately. My "fix" was eventually to have my site grab data from the 2nd site and serve it. The GC stuff is left over from that.

import adafruit_requests
import json
import socketpool
import ssl
import time
import wifi
import gc

ssid="myssid"
psk="mypass"
while True:
    try:
        res = wifi....
manic glacierBOT
manic glacierBOT
#

Updating to the current TinyUSB version would include the commits for these PR's, which might improve the reliability of descriptor parsing:

also, this one may help with improving behavior when a USB device is disconnected:

manic glacierBOT
#

This code illustrates the issue:

import time
import supervisor
import os

import adafruit_connection_manager
import board
import busio
from adafruit_esp32spi import adafruit_esp32spi
from displayio import Bitmap, TileGrid, Palette, Group
from digitalio import DigitalInOut
import adafruit_requests

BG_COLOR = 0x0000ff

display = supervisor.runtime.display

bg_bmp = Bitmap(display.width//4, display.height//4, 1)
bg_palette = Palette(1)
bg_palette[0] = BG_COLOR
bg_tg = TileGrid(bg_bmp, pixel...
manic glacierBOT
#

@tannewt When you have a moment I'm curious if you that thoughts on what could be causing this. I thought I recalled at one point printing causing slower refreshes and wasn't sure if that was resolved but I've eliminated all prints from the test script to rule that out, and confirmed that the display goes dark during when the request is happening by watching the server log to know its timing.

The output changing to dark interrupts the chroma key background color used by the product pick over...

manic glacierBOT
manic glacierBOT
#

Thanks, two things.

  1. I2S is misspelled IS2 on some pins.
  2. Could you put blank lines before and after each multi-line set of lines with the same pin number? This makes it clearer which pin names are aliases. For example, do:
    { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO6) },

    { MP_ROM_QSTR(MP_QSTR_PORTB_IN), MP_ROM_PTR(&pin_GPIO8) },
    { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) },
    { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO8) },

    { MP_ROM...
manic glacierBOT
#

I updated to Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-31; Adafruit Feather ESP32S2 with ESP32S2 and started up the reproducer script again today and had this corruption happen again.

<img width="154" height="64" alt="Image" src="https://github.com/user-attachments/assets/6aebcc87-b15c-49be-92a1-d8e40f426958" />

It was running for 2-3 hours powered by a USB C cable connected to a wall adapter before it crashed and then had the corrupted file on the drive when I plugged it in to a c...

slender iron
#

@tulip sleet I'm just about to get on my laptop

slender iron
#

@tulip sleet can chat now

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

What are the errno's that pyusb uses?

This is the script I wrote last year when I was trying out PyUSB on Debian: samblenny/usbgamepad/usbgamepad.py. The start_xpad() and find_and_connect() functions have the interesting try/except blocks. Summary:

  • usb.core.USBTimeoutError.errno == 75 during read() is a normal timeout where a retry usually works
  • usb.core.USBTimeoutError != 75 during read() may happen for an ...
tiny peak
#

@tulip sleet For bumping a submodule commit version (e.g. TinyUSB), are any CircuitPython-specific magic incantations needed with make or scripts or something, or does it just work the normal way?

tulip sleet
#

just cd into the submodule, do a git pull or git fetch, and checkout the commit you want. then cd back up and commit the change

#

If you think that's the "normal" way

tiny peak
#

awesome. thanks. I know some of the submodule stuff is a bit unusual.

tulip sleet
#

we use --filter=blob:none, but that's just to save time and space, and doesn't affect the commits

tiny peak
#

when you mentioned testing the new TinyUSB version, were you expecting that would be done internally at Adafruit?

#

I can poke at it on my Fruit Jam and such, but that's far from comprehensive compared to all the boards that use TinyUSB

manic glacierBOT
#

OK, I figured that since my Fruit Jam was broke I couldn't break it more.
So with great care I removed the 10k SMT resistor, R32 and replaced it with a 150 ohm 1/8 watt common resistor.
I bent and cut the wire leads so the lead tips were the same spacing as R32's.
With all the concentration and fine mussel control I could muster, I soldered the 150 ohm resistor in place.

It works great!
A simple IR receiver code.py shows the correct IR codes in REPL.
The RED LED flashes whenever a 38kHz IR ...

#

This is the latest upstream TinyUSB commit. There were many changes in the past the 3 months since the last submodule update. In particular, there were some fixes for descriptor parsing and better stability when devices are unplugged. See issue https://github.com/adafruit/circuitpython/issues/10556.

Checks:

  • [x] pre-commit passed (all checks were skipped because only submodule commit was changed)
  • [x] Build with make -j BOARD=adafruit_fruit_jam worked fine
  • [x] Firmware build seeme...
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

@samblenny Some of the larger language builds in particular boards are too big, For instance, de_DE for feather_m0_express is too big by 12 bytes. By comparison, the most recent PR merge (#10550) of that build had 236 bytes of room remaining.

I will look for some modules that we might turn off. For instance, on feather_m0_express, codeop, maybe fontio, and/oor maybe one of the displayio bus support modules could be turned off. I'll look at this more later. But you could go ahea...

manic glacierBOT
zinc walrus
#

I'm planning on migrating from Windows to Debian soon, and in preparation I've been implementing new workflows in a Debian WSL install. Since so many distros are based on Debian, I reasoned that I should probably start there too.

The Building CircuitPython learn guide recommends an Ubuntu environment, but several of the devs here use Arch and others. I'm aware of some differences (flatpaks, etc), but are there any pitfalls preventing me from using Debian as my base? I'm not quite smart enough to build CircPy yet, but I'm steadily learning how so that I can experiment with the Zephyr port.

@slender iron built me a Zephyr test binary a few months ago for an nRF5340 Audio DK, but no matter what I tried I couldn't flash it. The Audio DK is amazing hardware, but Zephyr/NCS is so tedious when rapid prototyping that I'm desperate for a higher-level language, and CircuitPython would be an absolute dream. @tiny peak's playground writeups have also been inspiring and informative.

Are there any devs here who might provide wisdom and insight on my journey? I have plenty of CLI experience (I grew up on Unix and CP/M), but this is a very deep rabbit hole, and I could use some guidance.

tulip sleet
# zinc walrus I'm planning on migrating from Windows to Debian soon, and in preparation I've b...

We recommend Ubuntu because it's very common, packages are kept up to date, there is a robust PPA system, etc. Recommending a particular distribution makes it easier to duplicate an issue or provide support.
But the differences between distributions are pretty small, and most packages are available everywhere. I don't think you'd have much if any trouble using Arch instead of Ubuntu, or Debian instead. So pick the one that's appealing.

zinc walrus
#

Thanks, @tulip sleet. I always appreciate your input.

tulip sleet
#

You're welcome!

manic glacierBOT
tiny peak
# zinc walrus I'm planning on migrating from Windows to Debian soon, and in preparation I've b...

I've used Debian for CircuitPython and Zephyr, and it's mostly fine. You'll occassionally run into stuff with udev rules and group membership where you don't have the permissions you need to access a hardware device. Once in a while something might come up where you have the wrong version of some library, or if you try to use a system python package instead of the latest thing from PyPi. I've found instructions for Ubuntu mostly work. The differences between Debian and Ubuntu are pretty small. Take what I say with a grain of salt though because I've been doing Linux stuff for over 20 years, so I probably don't even notice some of the stuff that I do to work around any glitches in instructions.

manic glacierBOT
zinc walrus
manic glacierBOT
#

I am thinking specifically of the USB issues that you mentioned.

oh... that would be kind of a major research project. I'm planning to do that work, but I expect it will take a while. As it stands, I don't have good reproducers for most of the stuff I mentioned in those other "USB Host: *" issues. I've just adopted workarounds to dodge around weirdness that I stumbled on last year when I was starting all the USB host gamepad stuff.

tulip sleet
#

uninstall modemmanager if it is installed. It can grab serial ports

zinc walrus
manic glacierBOT
tiny peak
#

@zinc walrus One thing to keep in mind about Debian is that the Bookworm to Trixie major version update is about to happen (Trixie release is tomorrow I think?)

zinc walrus
tiny peak
#

Dunno... I expect that there will be version bumps on lots of tools and libraries. Might affect CircuitPython build tools, compiler toolchains, etc. in a meaningful way, or it might not. Hard to say.

#

If you start on Bookworm, stuff will probably work fine, but you'll be missing out on lots of version updates on other stuff which you might enjoy having access to.

zinc walrus
zinc walrus
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b

Code/REPL

# SPDX-FileCopyrightText: Copyright (c) 2025 Tim C for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2025 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT
#
import gc

from terminalio import Terminal
import displayio 
from lvfontio import OnDiskFont
from adafruit_fruitjam.peripherals import reque...
tiny peak
#

I always make sure to uninstall avahid, cups, libreoffice, and tools that do automatic disk access (indexers, thumbnailers, etc). General idea is to reduce the number of open ports and stuff that messes with files on mounted drives.

tulip sleet
#

I use cinnamon, and keep a rather short bottom panel so I maximize screen space

tiny peak
#

Figuring out how to configure your editor(s) to avoid pooping temporary files all over the place can be really helpful for CircuitPython. I prefer to edit on my hard drive and then rsync files to CIRCUITPY (followed by a sync to flush the cache quickly)

tulip sleet
#

one problem I haven't solved, and don't know where to lay the blame, is that the inter-application clipboard doesn't seem to get filled properly unless I copy something twice. E.g. copying a URL from the browser to discord requires ctrl-c ctrl-c ctrl-v

#

I use middle button click to send the current selection somewhere else a lot.

zinc walrus
#

Very interesting information, @tiny peak and @tulip sleet. I'm still command-line only since I'm using WSL, but as I plan my move to a bare metal install, I'm beginning to consider desktops. Thanks so much for the recommendations and details.

tiny peak
#

something to keep in mind if you want a softer start... ssh works great for a lot of stuff

#

I usually use a Mac for my daily driver productivity apps that I don't want to have to burn time tinkering with. Then, I've got a few linux boxes and an Ethernet LAN on my desk, so I can ssh or VNC out to Debian. Or, for stuff that needs GPU acceleration (e.g. Blender), I can just switch my monitor over to a different input source.

#

That way, if you have a dev environment install go really sideways, it doesn't take out your whole setup

tulip sleet
#

i use nomachine (free version) to remote-desktop to mac and windows from Linux

zinc walrus
#

Yes, VS Code on Windows essentially uses SSH to "remote" access the WSL virtual machine, so I'm already comfortable with the concept, but I only have one PC to deal with at the moment.

tiny peak
#

FWIW, picking up some old cheap stuff off ebay has really improved my dev setup. Dell P series monitors are great. Old intel mac minis are great (but go for the higher spec ones).

tulip sleet
#

I buy from https://www.dellrefurbished.com/, but make sure you have a coupon (30-50% off) or buy a "Hot Deal". I have bought maybe a dozen desktops and laptops from there, all were fine. They are off-lease, and come with proper Windows licenses (unlike some other refurbs I've encountered).

tiny peak
#

+1 for off-lease Dell stuff

zinc walrus
#

Well, I'm not exactly swimming in developer money, but I scrounge what I can.

tiny peak
#

great thing about linux is it will run on some seriously garbage computers (going by modern specs)

tulip sleet
#

the mix on dellrefurbished has really leaned toward laptops these days; they are seriously cheap and plentiful.

manic glacierBOT
#

@samblenny,

My math for choosing 150 ohms is as follows.
Under normal conditions the GPIO port will be an input and float and the math below is insignificant..
The GPIO port can source 20ma (.020 amps) at about 3 volts. 3V / 0.02A = 150 ohms. IF the GPIO port is 'True' and not floating when the IR Receiver gets a 38kHz IR signal nothing gets over stressed with 150 ohms.
IR Signals have less than a 35% duty cycle over all. [Zero=25%, One=17%, Start=50%, Stop=0%]
The Red LED has a 2.2k...

full plume
# zinc walrus I'm planning on migrating from Windows to Debian soon, and in preparation I've b...

FWIW, my primary desktop environment is Windows 11 but I regularly use the "default" (Ubuntu) WSL2 to build CircuitPython images. Most of the Linux PCs I've set up over the past few years have been Ubuntu - I haven't done much with Debian lately (other than using OctoPi for my print farm). If you're not able to get CircuitPython to build under Debian WSL2, maybe there's a Debian vs Ubuntu difference although that feels like a stretch. Keeping USB happy under WSL is a pain, but that shouldn't affect builds...???

#

How far have you gotten / what are your roadblocks building CircuitPython?

#

One specific recommendation for using the WSL is to stay in the "local WSL file system" for your builds (i.e. something like ~/git/circuitpython instead of /mnt/c/Users/jbrel/git/circuitpython). I initially tried that latter, using WSL to build in the directories I had already checked out on a normal Windows drive. It was ridiculously slow and temperamental. After cloning the circuitpython repo directly into the local WSL file system, builds in the new repo ran an order of magnitude faster.

full plume
#

just learned something about Discord : I like embedding (hopefully helpful) relevant links in Discord messages. It's easy using [description](link) Markdown syntax, for example : [Markdown](https://en.wikipedia.org/wiki/Markdown). But that typically appends an embedded window showing the linked page when displaying the message, which sometimes feels like unnecessary clutter, Turns out that wrapping a link in angle brackets (<http://...>) disables that but keeps the link itself in the message text. So the above link to Markdown was written [Markdown](<https://en.wikipedia.org/wiki/Markdown>), so there shouldn't be any extra window displayed after this...

digital maple
#

Hi! 👋 I’m working on adding support for a new board to CircuitPython, and I’m about to draft a PR. I’m a bit unsure about which branch I should use as the base, should I be branching off main/master, or is there another branch I should target for new board additions? Thanks in advance!

digital maple
#

Got it, thanks! I’ll branch off main then.

manic glacierBOT
#

This is a generalization of #10520, and supersedes it.

This program will hang and then hard crash on ESP32-S2 and ESP-S3, in somewhat different ways (see below).

creating either an I2C or SPI object and then locking it causes the issue . Both use an xSemaphoreCreateMutex(). The try_lock() is necessary: it does an xSemaphoreTake() on the mutex, and then holds the lock for the rest of the program.

(I suggest you import this program manually, instead of using code.py, so you can...

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b

Code/REPL

import displayio
import gc
import time
import usb
from usb.core import USBError, USBTimeoutError


def test_descriptor_parsing_read_gamepad():
    # Check USB device descriptors, then read from gamepad if found.
    # This one is designed to trigger bugs where an in progress USB transaction
    # fights with other CircuitPython t...
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b

Code/REPL

import displayio
import gc
import usb
from usb.core import USBError, USBTimeoutError


def test_unplug_during_find():
    # This tests how repeated calls to usb.core.find() behave in the context of
    # unplugging a USB device. Initially, before a device is plugged in for the
    # first time, the generator produces no iterator ...
manic glacierBOT
#

Originally, I encountered this problem last year on 9.1.something, or perhaps 9.2.something, using a Feather TFT ESP32-S3 with a MAX3421E USB host FeatherWing. At that point I got started on doing my own descriptor parsing, so it's been a while since I've tried accessing Device.manufacturer, Device.product, and so on.

Today I got out my pile of USB test devices and tried to write a reproducer for this on 10.0.0-beta.2 with a Fruit Jam rev D board. So far I haven't been able to reproduce ...

manic glacierBOT
#

From an API usage standpoint, it would be great if an unplug event could:

  1. Mark any objects associated with that device as invalid (or some functional approximation of that)
  2. Automagically deinit things as needed
  3. Cause a usb.core.USBError (not a timeout!) to be raised for any subsequent attempt to access resources related to the unplugged device using find(), read(), or whatever.
manic glacierBOT
main furnace
#

AirLift can't do web workflow. Change my mind.

manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-beta.2-3-gf86bf4c085 on 2025-08-04; Adafruit Fruit Jam with rp2350b

Code/REPL

# SPDX-FileCopyrightText: 2025 Cooper Dalrymple (@relic-se)
#
# SPDX-License-Identifier: GPLv3
import asyncio
import board
from displayio import Group, Bitmap, Palette, TileGrid
import supervisor
from vectorio import Rectangle

from adafruit_fruitjam.peripherals import request_display_config
from neopixel import Neo...
candid sun
#

<@&356864093652516868> We'll have our weekly meeting in about 90 minutes from now in this text channel and in the circuitpython voice channel. Please take the time to add your notes in advance to the document: https://docs.google.com/document/d/11KpdjrQUXbQ_-uasV4gLlZIPz3q-nfP7A2c9isIOVvg/edit?tab=t.0 -- I look forward to everyone's updates!

manic glacierBOT
main furnace
#

Open Installer is great but it seems to always install the English firmware.

manic glacierBOT
manic glacierBOT
#

@tannewt On these M0 Express boards that are overflowing, we enable epaperdisplay, fourwire, i2cdisplaybus, and paralleldisplaybus. Are there any of these that you would say are impractical on a SAMD21 due to memory requirements or even pin requirements? fourwire and i2cdisplaybus I'd assume we'd keep, but I'm not sure about the others.

I'm not sure you can disable any of these without removing functionality. They all have enough pins for parallel. I can take a look to see wh...

devout jolt
slender iron
devout jolt
lone axle
#
Instructables

Custom Raspberry Pi Music Player Powered by Raspberry Pi, Fueled by Imagination: What if you wanted to build a music player—something portable, housed in an old CD player? You gut a dead boombox, keep only the speakers, and rebuild everything else from scratch. With a Raspberry Pi, an audio DAC, some wrecking tools, and a whole …