#circuitpython-dev

1 messages · Page 91 of 1

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

first of all thanks for rapid response @dhalbert
you suggestion work fine

Goal

Disable SPIM3 on a custom nRF52840 board and reclaim the 8 KB SPIM3_RAM reservation so that APP_RAM increases from 192 KB → 200 KB (more Python heap).

Environment

  • Repo: adafruit/circuitpython (current main)
  • Port: ports/nordic
  • Board: sensera2 (custom)
  • Bootloader: Adafruit nRF52 Bootloader on Raytac MDBT50Q (copied UF2 to MDBT50QBOOT)
  • Build host: Linux (Ubuntu-like)

...

vernal sage
#

Just a heads up I think I had the build_memory_info.py wrong for the PSRAM for the C61, should be 32MB and not the 2MB for the board. The C5 branch has it correctly for that variant

tulip sleet
slender iron
tulip sleet
#

trouble was if you set the blockdev write operation to MP_OBJ_NULL, nobody is going to be able to write it.

#

I'll get Tim to review.

slender iron
#

I can look later today too

manic glacierBOT
#

allow phase and polarity to be changed after the SPIDevice has been created.

Something like this is required for the latest approach taken in: https://github.com/adafruit/Adafruit_CircuitPython_SPA06_003/pull/1

If this causes builds to overflow, the added code could be shrunk a little by making a single configure() function that accepts both phase and polarity instead of two separate properties.

fluid hull
#

I have been meaning to ask this for a while, with regards to bluetooth LE in CircuitPython, I am trying to set some very specific advertising data directly with a byte array and am having the hardest time converting some code that worked fine in arduino using the bluefruit library. Both cases are on an nRF52840 Express Feather.

On the circuitpython side, the low level _BLEIO API mentions anything over 31 bytes automatically becomes extended advertising and the high level adafruit_ble library just says 31 bytes max on advertising data. The trouble I have is that I need to advertise a Complete local name (0x09), a Shortened local name (0x08), a 0x01 flag of 0x06, a tx power level (0x0A), A connection interval range(0x12) and The part that I cannot figure out how to do in circuit python at all a custom complete list of 128bit service class UUIDs (0x07) that is 16 bytes long. for a total of 52 bytes.
I cant even figure out how to set the 0x07 via the library.

On the arduino bluefruit library I was able to set everyting at once win a byte array and used Bluefruit.Advertising.setData(ADV_DATA, sizeof(ADV_DATA)) to set the most of this all at once.
I was still hitting the 31byte size limit so I was able to half bake my solution by excluding the full name

#

for setting the 0x07 I figure I need to use somthing in the adafruit_ble.advertising.standard portion of the libray but I am starting to get lost in the docs

manic glacierBOT
#
  • Fixes #10657.

#10648 mistakenly prevented USB writes all the time. Fixing it was more complicated than one might think

  • The old way of doing self->blockdev.writeblocks[0] = MP_OBJ_NULL; turns off write for everyone, and is not a good way of setting read-only for host but not CircuitPython or vice-versa. So use the blockdev MP_BLOCKDEV_FLAGs exclusively. via filesystem_is_writable_by_python() and ``filesystem_is_writable_by_usb().
  • The above change caused boot_out.txt not to...
fluid hull
#

^ @lone axle or @tulip sleet I'm pretty sure I'm stuck without either of you. In short, is there any way I can set a specific 16 byte (in byte array) advertising packet component of type 0x07 with some equivalent command to arduino bluefruit's Bluefruit.Advertising.setData() command

tulip sleet
fluid hull
#

appreciate it, i just wanted to post the short version since I managed to think out my problem by explaining it the long way first 😅
I have actually been stuck on this for years but only now am trying to do it all in circuitpython, and Ideally get the full deal 51 bytes of advertisement out at once.

tulip sleet
#

BLE extended advertising

manic glacierBOT
#

Since you can call spi_device.spi.configure() yourself already, is that good enough?

This doesn't seem to be possible currently:

Traceback (most recent call last):
  File "code.py", line 65, in <module>
  File "/lib/adafruit_spa06_003.py", line 393, in __init__
  File "/lib/adafruit_spa06_003.py", line 453, in _configure_spi_device
AttributeError: 'SPIDevice' object has no attribute 'spi'

But making spi_device.spi property available would solve my problem as well since ...

#

But making spi_device.spi property available would solve my problem as well since I could then call configure() on it.

That property is available in the Python version, so I mistakenly thought it was already available in the C version too.

Maybe the phase and polarity should not be available as non-underscore names in the Python library.

I am inclined to say that is the easiest choice. Otherwise we are just reflecting all the SPI properties in SPIDevice.

manic glacierBOT
#

Not true with the properties because when entering the context spi.configure() is called. Exposing spi doesn't really help you because spidevice will call configure() again. We could change make the accessor do it but that doesn't make much sense to me either because other non-registered devices lose the auto-configure.

I think the properties are the right way to go because spidevice can still manage the configure.

slender iron
#

@lone axle @tulip sleet does it make more sense to add factory class functions? SPA06_003.overI2C() and SPA06_003.overSPI() that inits the device and then calls the constructor?

#

waiting for the spidevice accessors to land in the core is gonna be a pain

tulip sleet
#

is it an issue you might want to use an existing SPI?

lone axle
#

those functions would accept the bus right? either I2C or SPI, and cs object for the SPI one?

tulip sleet
#

i am afk in 10 mins

slender iron
#

but only have the relevant kwargs and defaults

#

So, for SPI you'd still pass in the bus and cs but not the polarity and phase

lone axle
#

Okay, yeah I think that sounds good.

tulip sleet
#

and the SPIDevice would be available as an attribute? Or used automatically (you don't need to handle it yourself)?

#

(I am not following the register stuff)

lone axle
#

My understanding is SPIDevice would get created inside of overSPI() and then passed to the constructor. In the constructor it will create the register_accessor from it which will then use the spi_device automatically internally. The user won't have to handle it at all. The object would technically still be available at something like spa.register_accessor.device but I can't think of a reason any code outside the driver would really need to access it.

slender iron
slender iron
#

I think I fixed the C6 on idf 5.5.1

#

just pushed to my branch and will double check it next thursday when I'm back. 👋

manic glacierBOT
#

CircuitPython version and board name

circuitpython-stubs 10.0.0 on macos 26.

Code/REPL

N/A

Behavior

N/A

Description

Just updated to python 3.14 and got the following error:

❯ uv run circuitpython_setboard feather_m4_can

Traceback (most recent call last):
  File ".venv/bin/circuitpython_setboard", line 4, in 
    from circuitpython_setboard import set_board
  File ".venv/lib/python3.14/site-packages/circuitpython_setboard/__init__.py", l...
manic glacierBOT
manic glacierBOT
#

from @bablokb:

I usually loop on display.busy, but it turns out that there are displays where you cannot trust the busy-pin.

Fixing this in the alarm-module wont help in my use-case. I would prefer to have an option that makes display.refresh() synchronous.

@bablokb What else could display.refresh() do to check that the refresh is not yet done, if the busy pin is not reliable? Is it not reliable because the refresh may write multiple times to the display?

nimble sparrow
#

Just trying to figure out if it's something silly in user code...

tulip sleet
nimble sparrow
#

I am

#

As I say just making sure I'm not doing anything funky

tulip sleet
#

See test program inhttps://discord.com/channels/327254708534116352/1424778936914673766

lone axle
#

Just noticed the search on the downloads page seems to associate a weirdly large amount of boards with the string fruit j. Adding an a does narrow the list substantially as does searching jam without fruit.

#

I would have thought it was finding "adafruit" somewhere on the ones it's returning but many are 3rd party and don't seem to mention that in any relevant fields, though I'm not certain what all it searches.

manic glacierBOT
#

Problems with the busy-pin have been observed with some of the Pimoroni Inky-Impression displays. These displays are made for the Pi, but also work with any MCU (they basically use SPI). The only thing you can do here is wait.

The Pimoroni Inky-Frames have a different problem: here the busy pin is attached to a 74HC165D shift-register (parallel in, serial out). CircuitPython core cannot handle this case, but you can loop from the python-code. The core could only wait.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
tulip sleet
#

@lone axle I will do a 10.0.1 release today to fix a regression (can't write to /sd from the host via USB). Above PR (circuitpy_setboard 10661) is not vital, but I'll include it if you have time to review. Anything else you might want in 10.0.1 (any frozen libraries that were updated)?

lone axle
tulip sleet
#

happy to include that too

lone axle
#

I don't think any frozen libraries have been updated.

manic glacierBOT
turbid radish
tulip sleet
turbid radish
#

Yes, if I change the "bytearray(response[5])" to response[5] the qr code works. That bug is easy. It's the opaqueness of PyPortal that somehow changed after the guide came out

#

The JSON fields are not being printed out anymore, just 50 characters of the JSON text

tulip sleet
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 10.0.1
orchid basinBOT
fiery pecan
fiery pecan
tulip sleet
#

@turbid radish updated PyPortal version:

fiery pecan
tulip sleet
#

thanks - I thought I had deleted the comment but I forgot to save the change. Revised version

turbid radish
#

Thanks folks!

manic glacierBOT
#

Forgive me if this is a silly question, but does this enable USB Host support, or does it still require the usb_host module?

This PR is about adding better support for USB serial devices when they are connected to the USB host port of a CircuitPython board with USB host capability. The existing way of doing USB host stuff is to use the usb module, which mostly follows the PyUSB API. There are also some higher ...

manic glacierBOT
#

Somewhere between 9.2.4 and 9.2.5 some 32GB SD cards started failing with OSError: can't set 512 block size. I can reproduce this with a Micro Center card I have on PyPortal.

Test program:

import board
import sdcardio
import storage
import time

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

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

count = 0
while True:
    print("sleep 1", count)
    count +=...
tulip sleet
manic glacierBOT
#

Thank you for the response! I've asked on the Discord and hopefully I'll get a response. I won't derail the thread here, but essentially I'm trying to use a Seeed XIAO ESP32S3 as a USB host to connect to a device that uses serial communication. And I'm having a horrible time trying to figure out how to do it (every time I try to do usb.core.find(find_all=True), I get RuntimeError: No usb host port initialized).

Something like you've proposed here would probably make my life much easie...

lone sandalBOT
manic glacierBOT
nimble sparrow
#

Is there much interest in an audiomp3-style static module supporting tracker audio (mod/xm/it/s3m)?

#

Having gone through the pain of integrating libxmp manually for a separate non-MP/CP esp32 project it turns out taking that and mashing it through Cursor to convert it to a shared module is actually pretty successful. I'm half way through reviewing the code for anything dumb.

manic glacierBOT
#

I'm using a Seeed Studio XIAO NRF52840 SENSE board that has a LSM6DS IMU on-board.

This IMU is powered from a GPIO pin on the NRF52840 MCU.

I'd like to have the IMU be able to wake the board from deep-sleep using an alarm.pin.PinAlarm.

It works OK for waking from light sleep, but the GPIOs are turned off during deep sleep.

It appears that it is possible to maintain GPIO states (and also to wake from pin changes) during sleep states in this MCU.

orchid basinBOT
#

adafruit_connection_manager also has this problem on https://circuitpython.org/board/pyportal_titano/

I started looking into this and found the code responsible for the URL is here: https://github.com/adafruit/circuitpython-org/blob/e82ee56d3f7eee57b046f10c35d2e6a6306e9d61/_includes/download/board.html#L186

We might need to have a manual entry for the docs link instead of trying to automatically generate it from the library name. I don't think a "one size fits all" algorithm is going to be ...

manic glacierBOT
orchid basinBOT
manic glacierBOT
#

LAST_SWCORE_PWRUP does not seem reliable even without any debugprobe attached. It always reads 2 (which is pwrup1 according to the docs), but I am only testing with a single GPIO and I am using pwrup0 which should turn up as 1.

Also, after a chip reset I see a 1 instead of the documented 0.

Hi, I am currently implementing the P1.x low power modes from scratch in RISC-V assembly, and am only using the RP2350 datasheet to write this program. I came across this confusion at fir...

manic glacierBOT
#

Yes, I totally misunderstood the docs regarding LAST_SWCORE_PWRUP.

My work on this has stalled recently due to other things (and because I was out of ideas), but I will revisit it and check if I do the correct things you are pointing out. From my guts feeling, it still does not explain the random behavior I can see: instant wake up after going to low-power. This happens a few ms after low-power is reached. Ok, this sounds like a wake up from an alarm that wasn't cleared, but the random beh...

manic glacierBOT
manic glacierBOT
#

I haven't re-tested smaller cards on a SAMD board like the PyPortal, but there's something definitely wrong on SAMD in particular.

One other difference between alpha.6 and alpha.7 is that we switched from gcc 13 to gcc 14 in #10386. It's possible this is a compiler problem, or perhaps a missing volatile or similar that only caused a problem due to the compiler switch.

manic glacierBOT
#

Support for M5Stack Tab5 board

Tab5 is a highly expandable, portable smart-IoT terminal development device for developers, integrating a dual-core architecture and rich hardware resources. The main controller adopts the ESP32-P4 SoC based on the RISC-V architecture, with 16MB Flash and 32MB PSRAM. The wireless module uses the ESP32-C6-MINI-1U, supporting Wi-Fi 6. Its antenna system can freely switch between the built-in 3D antenna and an external MMCX...

orchid basinBOT
manic glacierBOT
manic glacierBOT
#

I know it's a bit of a long shot but is there any chance yous still have the Feather RP2350 FW where CIRCUITPY_DISPLAY_LIMIT is >1?

I believe Scott was targeting 10.x to implement multi-display support using better memory management. I started work on an updated version back in April but quickly realized I was going to need so much hand holding it would have been easier for Scott to do it himself. I'm not 100% sure what state this firmware is in but I was able to get four Fourwire display...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Note to future me: Running status is a MIDI feature where a message can omit the status byte when it would be the same as the status byte of the the previous message. From what I read, early MIDI devices with DIN-5 connections sometimes used this to save bandwidth, but it's perhaps less common for it to be implemented by newer devices that use USB.

I'm pretty sure that my Fruit Jam MIDI tester and synth code didn't consider the possibility of receiving running status messages, and I'm unsure...

manic glacierBOT
manic glacierBOT
#

I'm on a very reproducible situation where I get messages with running status through BLE, and actual midi library cannot handle it transparently. For example I sent a group of CC [BA, 63, 6A, BA, 62, 6B, BA, 6A, 00, BA, 6B, 65, BA, 63, 7F, BA, 62, 7F] [FA]
What I receive is BA 63 6A -- 62 6B -- 6A 00 -- 6B 65 -- 63 7F -- 62 7F FA (-- is where status are omitted).
Should this be on another issue then ?

manic glacierBOT
#

That does sound like a somewhat different situation since you're using BLE not USB host, but I'm glad you mentioned it here. I'd overlooked running status when reading the specs, and I wouldn't be surprised if that turns out to be the root cause for this issue. When you say "actual midi library", if you mean you're using Adafruit_CircuitPython_MIDI, then that repo might be a better place to report your problem.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

After modifying my Fruit Jam portable MIDI synth code and some more careful spec reading:

  1. USB MIDI packets should be 32-bits, always including a CIN field for status. So, running status shouldn't be a problem here.
  2. I can eliminate the dropped & stuck notes by increasing the usb.core.Device.read() timeout. I had been using short timeouts like 3 ms. When I up that to 50 ms or more, the dropped/stuck notes problem goes away, and I can't hear any adverse affect on synthio synthesis or...
tiny peak
#

FYI for folks interested in USB MIDI & synthio (cc @devout jolt and @fleet hollow ), I came up with an interesting result today while trying to see if MIDI running status was responsible for the dropped & stuck notes issue with USB host MIDI. Seems like the actual problem was me using an overly short timeout for usb.core.Device.read(). After I upped the timeout to at least 50 ms, I wasn't able to get any more dropped or stuck notes by bashing on my test keyboard. See https://github.com/adafruit/circuitpython/issues/10554#issuecomment-3399500236

#

originally I had been using a 3 ms timeout because I was reusing code for polling gamepads and HID keyboards (which often give USBTimeoutError) in combination with a displayio animation loop that I was trying to run at a realatively high FPS.

#

By my ear, using a USB MIDI polling loop with blocking reads on a 50 ms timeout sounds fine. I didn't notice any issues with latency or synthio glitching. Seems like all the background task stuff works fine while read is blocked, apparently?

#

I suppose using longer timeouts might get you into trouble if you wanted to run a sequencer track alongside of live MIDI input, but otherwise it seems pretty okay.

#

I'm trying to figure out if it makes sense to just use longer timeouts, perhaps with a documentation change to that effect... or, if maybe there's a need for better MIDI read support in the core.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#
  • Fixes #10663

(There may be other issues fixed by this; I need to check.)

Refactoring and additions done in #9385 and https://github.com/adafruit/samd-peripherals/pull/46 to add SAMD51 SPITarget had a bug involving parsing a struct by value. It mostly worked but caused timing problems. My original debugging on this found that adding a short delay fixed the problem (after a Heisenbug print statement made it going away), but I needed to dig deeper as to why.

The main fix is in http...

manic glacierBOT
#

If CIRCUITPY_SDCARD_USB is enabled on atmel-samd boards, it causes a USB disconnect a few seconds after an SD card is mounted and presented via the second LUN.

This is a bug discovered during #10645, so USB SD card presentation was turned off for atmel-samd.

#10668 seems to fix this problem, so after that is merged, I'll make a separate PR to turn CIRCUITPY_SDCARD_USB back on for atmel-samd.

manic glacierBOT
manic glacierBOT
#

I refactored the common-hal/canio/can.c to alloy for use of both CAN controllers in the ESP32C6.

Having purchased the "TOUCH" version of waveshare_esp32_c6 with LCD, I also had to create this new board that uses way different pinouts.

Only tested without filters as I am using it as a CAN-to-CAN bridge.
Listener.c DOES need to be modified to select the proper &TWAI if filters are to be used ( MATCH )

manic glacierBOT
manic glacierBOT
#

Yes, both sides are M4 running PR artifact. I don't see a difference in behavior, there are patterns to the data, it's not fully random, but I can't discern the pattern. But neither the controller nor target receive what was ostensibly sent.

Target code is like the last comment in 10504, but I added an explicit delay between write and read, and even with BUFLEN = 2 I can't get good data either way.

<details>
<summary>controller code.py.</summary>

import time
import board
...
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.1 on 2025-10-09; Adafruit MatrixPortal S3 with ESP32S3

Code/REPL

import board
import digitalio
import displayio
import terminalio
import framebufferio
import rgbmatrix
import supervisor
import gifio
import adafruit_ticks

base_width = 64
base_height = 64
bit_depth = 1
chain_across = 1
tile_down = 1
    
serpentine = True

width = base_width * chain_across
height = base_height * tile_down

displ...
manic glacierBOT
#

Originally posted on the Adafruit Circuit Python forum, reposting here for the Silabs team.

After some time away from CP I am now trying again with a new development. While I wait for my custom board to come back from fabrication I am starting to get code going with the MGM240P.

First issue...the internal pull-ups or pull-downs don't seem to work. I am using CP 10.0.1. My code is...

Configure temperature sensor alert GPIO (PB1) as an input, with a pull-up

temp_alert = digitalio.Digital...

manic glacierBOT
quartz folio
#

@lone axle Thanks for your repsponse to my feature request a few wekes ago to enhance the .json description in the library bundles. I submitted a PR and just wanted you to know that you can find me here if you want to chat about it. https://github.com/adafruit/circuitpython-build-tools/pull/131

GitHub

Adds the description field from the pypi pyproject.toml metadata to the bundle&#39;s json description for each library. If the description is not present, the field will be populated with the ...

manic glacierBOT
#

This doesn't actually have anything to do with gifio. I was able to recreate the issue by simply reading a binary file and sending output to the matrix panel.

I'm thinking the problem is either related to file I/O or rgbmatrix/framebufferio.

I first created a binary test file:

a = open('test.dat','wb')
for i in range(100000):
    byt = i % 256
    x = a.write(byt.to_bytes(1))
a.close()

And then used the following test program:

import board
import digitalio
import displayio
i...
#

I can confirm this issue on CircuitPython 10.0.1 on the ESP32-S3 N16. This connection failure occurs (or a subsequent unrecoverable internal error) when trying to connect to a BLE MIDI peripheral.

Since most MIDI devices use a RANDOM_PRIVATE_RESOLVABLE address, this bug effectively prevents reliable BLE MIDI client functionality on the ESP32-S3.

Did anybody have any progress or workarounds? Highly appreciated, thank you! :)

lone axle
slender iron
#

@lone axle @tulip sleet at my laptop now. need anything from me urgently? I'm just getting going

tulip sleet
#

nothing urgent ; I have a couple of PR's (one is in samd-peripherals)

lone axle
#

Nothing urgent for me either. Spa06 SPI is ready for another look by you I think, but not urgent

slender iron
#

will try to breeze through my email

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.1 on 2025-10-09; Raspberry Pi Pico W with rp2040

Code/REPL

# code.py

import mount_sdcard, basic_wifi_test

******************************************

# mount_sdcard.py
# 08/10/2025

import board, busio, sdcardio, storage, sys

sck = board.GP18
si = board.GP19
so = board.GP16
cs = board.GP17

#  SPI setup for SD card
spi = busio.SPI(sck, si, so)
sdcard = sdcardio.SDCard(spi, cs)
vfs = storage....
manic glacierBOT
#

CircuitPython version and board name

Feather Reverse TFT ESP32-S3 v10.0.1

Code/REPL

none

Behavior

Opening editor and connecting via USB to see if BLE mode is on from REPL header, but similarly if too long it disappears offscreen.

Description

If BLE mode is on / header text is too long then abbreviate sections? Take last 2 segments of ip, and middle truncate device id for BLE: Circ..984C, could even abbreciate wifi and BLE to `W: 1.259 | B: ~9...

#

CircuitPython version and board name

Adafruit CircuitPython 10.0.1 on 2025-10-09; Adafruit Camera with ESP32S3

Code/REPL

import os
import time
import ssl
import binascii
import digitalio
import adafruit_pycamera
import board
import wifi
import socketpool
import adafruit_requests
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError

aio_username = os.getenv("ADAFRUIT_AIO_USERNAME")
aio_key = os.getenv("ADAFRUIT_AIO_KEY")

print(f"Connecting to...
slender iron
#

@tulip sleet want to get your fix in, make 10.0.2, branch 10.0.x, merge idf 5.5.1 and release 10.1.0-beta.1?

#

(assuming the idf 5.5.1 review goes ok)

tulip sleet
#

C6 is fine now?

manic glacierBOT
slender iron
#

I'm not sure about other stuff for 10.1. Maybe dsi displays? Rynn is up now so I'm off

manic glacierBOT
tiny peak
#

Anybody have thoughts on how (if?) it might make sense to go about porting CircuitPython to the UNO Q? The board is set up so the Dragonwing MPU runs Linux and has the direct connection to the USB-C port (including display output if you use a USB-C dock with PD and HDMI). The STM32U585 MCU is wired up to the Arduino header GPIO but not the USB port. It's apparently meant to be programmed over SWD from Linux on the Dragonwing. It also has UART and SPI channels to the Dragonwing. Presumably those are used to implement the Arduino App Lab bridge RPC functionality.

#

I wonder if it might make sense to run Blinka on the Dragonwing using a newly written Arduino sketch for GPIO access?

manic glacierBOT
#

I did some version testing on this, with a somewhat reduced version of the given test program. Sometimes just doing a reset, as opposed to a power cycle, will not produce the USB disconnect. So I always unplugged and plugged in the board to test.

9.2.9 does not have the problem.
10.0.0-alpha.5 caused a safe mode on boot up three or four times in a row.
10.0.0-alpha.6 does not have the problem.
10.0.0-alpha.7 usually disconnects, and so do other versions past that one.

A settings.toml with...

manic glacierBOT
manic glacierBOT
tulip sleet
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 10.0.2
orchid basinBOT
devout jolt
devout jolt
# tiny peak I'm trying to figure out if it makes sense to just use longer timeouts, perhaps ...

I've been pondering if there's a way to add a "MIDI driver" to the core, because responding to MIDI clock in a timely fashion is basically impossible in the interpreter and it's easy for DAWs like Ableton to spew so many MIDI CCs as to flood the input read buffer. Plus it'd be nice to have a fast place in the core for the state machine needed for reconstructing MIDI mesages (e.g. handling running status, sysex, per-message variable-length reads, etc) and maybe message filtering to reduce interpreter code load

slender iron
slender iron
tulip sleet
#

@slender iron I made a 10.0.2 but all the espressif builds failed when fetching requirements (cryptography in particular but that may just be the first one). Only difference I can see is that Python 3.13.8 was the version used. The last release used 3.13.7. There was an emergency fix for a particular decorator thing and 3.13.9 was released a few days ago, but not sure it is related.

#

I can't find other people who have suffered from this problem yet.

slender iron
#

hrmm. I had to cap the cryptography version in my idf update

tulip sleet
#

it's saying it can't find a usable cryptography version. I wonder if the GitHub Actions infrastructure has some version skew in it

slender iron
#

it could be that the cache key of deps changed

tulip sleet
#

also 3.13.9 is not going to be in deadsnakes due to some weirdness in how they tagged it

#

I was thinking of clearing the caches

#

we used to have to update the cache key occasionally but I thought we fixed that

slender iron
#

I bet old builds succeeded because they had old cryptography

#

clearing won't help. you need to change requirements-dev.txt

tulip sleet
#

it just says cryptography, with no version restrictions. I think this is an esp-idf-specific requirement

tulip sleet
#

cryptography 46.0.0 came out Sept 16, 46.0.3 was Oct 15

slender iron
#

we don't pick up new versions immediately if we have it cached already

tulip sleet
#

OH

slender iron
#

the idf tools cache must have been evicted

tulip sleet
#

ok, I will make a PR

slender iron
#

the last green build has a cache hit for the idf tools that the failing build misses

#

thanks!

#

another way to fix is to make requirements-dev.txt not update

tulip sleet
#

do it in the other order, since we may need some stuff it installs that is not part of the ESP-IDF-installed Python stuff?

#

I think I will not try that now; could be a rathole

manic glacierBOT
tulip sleet
#

@slender iron I have to go out shopping for a bit

slender iron
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 10.0.3
orchid basinBOT
tiny peak
# devout jolt Interesting, thanks! I forget, is `usb.core.Device.read()` async compatible so ...

The implementation for usb.core.Device.read() does call RUN_BACKGROUND_TASKS() while it's waiting for a response from TinyUSB. I'm not sure if that counts as a yes to your question or not. For example, in game loops where you might want to update the position or sprite of TileGrid tiles at 30 or 60 fps from a python loop, I'm not sure if blocking on a USB read would mess that up or not. Might also be an issue with audio latency if you wanted to make a synth that merged MIDI input with physical keypress input by captouch or buttons.

tiny peak
# devout jolt I've been pondering if there's a way to add a "MIDI driver" to the core, because...

I actually had some sucess with filtering out MIDI clock messages in Python. The trick is to use a bytearray and memoryview with read() inside of a generator function, then yield the memoryview. In the calling loop, if you use byte comparisons to filter realtime messages rather than using layers of OOP stuff with heap allocated objects, it can run pretty fast. I used that approach successfully to take input from my Arturia BeatStep's sequencer.
This is an example of code for the generator: https://github.com/samblenny/fruit-jam-portable-midi-synth/blob/v0.3.0/sb_usb_midi.py#L111-L134
This is an example of code to filter out realtime messages (by way of ignoring their CIN values): https://github.com/samblenny/fruit-jam-portable-midi-synth/blob/v0.3.0/code.py#L156-L231

manic glacierBOT
tulip sleet
manic glacierBOT
#
[adafruit/circuitpython] New branch created: 10.0.x
tulip sleet
#

**All: **there is now a 10.0.x branch, so if you have a bug fix PR, make a PR against 10.0.x. To get this branch into your fork, do git fetch adafruit 10.0.x:10.0.x (assuming adafruit is the name of your remote to adafruit/circuitpython

manic glacierBOT
#

Well I'm embarrassed, it looks like I ran into this last December but forgot about it https://github.com/adafruit/circuitpython/issues/9854. Looking back at the earlier issue I had submitted it appears that supplying WiFi credentials prevents the problem for occurring which I confirmed with my latest test script.

I've confirmed that again but I did notice that when WiFi credentials were provided in settings.toml, after about the time the display would have stopped updating (10-15 seconds) ,...

orchid basinBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.1 on 2025-10-09; Adafruit QT Py ESP32-S3 no psram with ESP32S3

Code/REPL

spi = board.SPI()
i2c = board.STEMMA_I2C()

# Setup SD card
tft_sdcs = board.A3
sdcard = sdcardio.SDCard(spi, tft_sdcs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")

# Set tft pins for QTPy EYESPI BFF on ESP32-S3
tft_cs = board.TX
tft_dc = board.RX
tft_reset = None
tft_backlight = board.A1 # Jumpered EyeSpy BFF L...
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Seeeduino XIAO RP2040 with rp2040
Board ID:seeeduino_xiao_rp2040

Code/REPL

displayio.release_displays()
i2c = busio.I2C(board.D5, board.D4)
# CircuitPython 10: Utilisation de i2cdisplaybus pour créer le bus I2C
display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3C)
# adafruit_displayio_ssd1306
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=SCREEN_W...
tiny peak
#

Back in late August, there was some discussion here about adding an HMAC implementation to CircuitPython, perhaps by getting the MicroPython implementation working or by using HMAC from some of the recent Matter work. Did anything ever get merged from that? Do we have an official HMAC implementation?

tulip sleet
orchid basinBOT
tiny peak
#

Is that something that would make sense to add? If so, any suggestions on where? I'm thinking about HMAC in the context of a current LoRa sensor project (sender authentication & replay protection) and a future TOTP token generator project. It seems like there are other uses.

tulip sleet
tiny peak
#

for HMAC-SHA256 at least, doing the whole thing in Python might be pretty reasonable, so long as there's a SHA256 implementation available in C.

#

If I undersand correctly, the Python part would just need to do a bit of XORing to prepare the inner and outer keys, then a little data plumbing to hash the prepared keys and message or fingerprint

#

Since hashlib.Hash.update() takes a ReadableBuffer, it should probably be pretty efficient to compute the inner fingerprint digest by feeding it the inner key in one update, then add the message in a second update. Similar for the outer hash.

tulip sleet
#

I was more concerned with sha256 support. It's in extmod/modhashlib.c but not turned on, I forget why not (maybe it was size, and may now not be relevant given that we grew the 4MB Espressif builds).

Matter is a kitchen sink of cryptography needs. Some notes I made a while ago:

atter crypto notes:

uses Elliptic curve
NIST P-256 curve (secp256r1) aka prime256v1
uses SPAKE2+

needs DRBG
needs TRNG
needs SHA56 hash as Crypto_Hash
HMAC using Crypto_Hash, i.e., HMAC-SHA256
needs ECDH
uses ADEAD AES-CCM for messages
tiny peak
#

oh, hmm... If there's no hardware accelerated support for SHA256, or at least a C implementation, that would kinda suck

tulip sleet
#

we have a python implementation right now that Brent worked on and is used for something, I forget, maybe MQTT related

#

as mentioned in one of those issues, trying to subset CPython cryptography would be painful -- it's kinda monolithic and complicated

#

the problem I think I was finding with CircuitMatter was less the raw algorithms like SHA256 and elliptic and more all the wrappers like ECDH, SPAKE2+, etc. I didn't try to understand all these, but just tried to find smaller implementations

#

yes, right now, it's very slow in Python

tiny peak
#

Where does work on CircuitMatter stand in the grand scheme of things? Is that something you expect to be working on more soon?

tulip sleet
#

we were pretty interested in it, because there were Matter devices people would want to control from CircuitPython. But it's a lot of code, and there were some issues about using non-certified key pairs or whatever on various platforms. Some allowed that, some didn't. I wrote this down somewhere, but I can't find it right now.

#

Matter has not broken through as ubiquitous in the consumer market (yet).

#

there are devices, but it's been slow going

tiny peak
#

hmm... FWIW, if you want additional help with some of that, it's an area I'm interested in. The two things I care about for my own stuff are IoT/LoRa sensor MAC and replay protection along with HMAC for TOTP tokens

tulip sleet
#

It's beginning to come back to me... We got simple Matter peripherals working, but they were only controllable from certain platforms. I think Apple and maybe Amazon (?) excluded non-"certified" devices, and I forget the certification details.

#

another longer term thought is whether to wait for the zephyr port and see what we can use from that

tiny peak
#

oh... so maybe more of a bureaucratic than technical challenge. sounds like that could potentially be a big hassle.

#

Is the timeline for the Zephyr port still feeling obtainable with the hands available to work on it?

tulip sleet
#

Here is a note I made last January internally while trying to get CircuitMatter running on CircuitPython:

CircuitMatter: got further running on CircuitPython. In the key generation phase there is something that’s recommended to be run at least 10-100k times for cryptographic security, which is completely impractical in CircuitPython (would take >3 hours). Temporarily reduced that to move forward. It may make sense to do key generation to be done on a host computer, and then move the keys over for use on CircuitPython.

tiny peak
#

my impression after poking at Zephyr stuff for a while was that it could end up being a pretty heavy lift to reconcile Zephyr's config-at-compile-time orientation with the CircuitPython way of doing things. Like, doable, but not a small amount of work.

tulip sleet
#

MicroPython is working on pin reuse at runtime, and we brought that up years ago with the Zephyr folks. We think we might be able to just not assign the pins in the device tree, and still be able to use the drivers in some fashion.

#

Matter chose some crypto thing that is flawed if you don't take extra special precautions (the 10-100k times thing, I think that was). I think when the choice was made the flaw wasn't known.

tiny peak
#

is it flawed to the extent of perhaps slowing adoption?

tulip sleet
#

II think not in general, because the keys are cooked into the device at build time. But I am hazy on this now.

tiny peak
#

okay, well, my takeaway is that I should probably just do my own thing for my immediate HMAC needs. If you find yourselves looking for extra help with Matter stuff or plumbing up better crypto library support to the core, I'm around and interested.

#

It could be entertaining to spend more time on IoT and home automation stuff

tulip sleet
#

The easiest thing might be to get sha256 available for all ports with networking, and then you could find a minimal hmac implementation. I stole one written for MicroPython.

#

we will circle back and reconsider Matter when Scott comes back more full time. Maybe beginning of the year

tiny peak
tulip sleet
#

i spent a little time looking but I don't see discussions.

#

not sure if that is mbedTLS or in pico-sdk

tiny peak
#

okay, well, I'll see what happens as I get to looking at this. I'm trying to run a LoRa thing on battery power. Doesn't need to be high security, but I want at least some minimal half-decent HMAC. If the available hash algorithm implementations are all super slow, I might need to look at this soon. But, I could probably get by with HMAC-SHA1 if that's an option.

tulip sleet
#

Scott may be able to correct my deficient memories on this.

wraith crow
manic glacierBOT
#

I'm trying to reproduce this, and haven't succeeded yet. I don't have a GC9A01A display, but FourWire displays are write-only, so that shouldn't matter. I am using a different BFF with an SD card socket.

The test code is missing all the imports, and also has i2c = board.STEMMA_I2C(). If you remove the i2c line does it make any difference? Could you edit the OP to include exactly the code that is causing the safe mode? Thanks.

manic glacierBOT
#

Yes, sorry. Here is a stripped-down version that goes into safe mode after a couple of reloads (reset, ctrl-D, ctrl-D did it most times for me). Left all library loads in from the original just in case that matters. BMP images also attached.

green_hour_hand_ellipse_600dpi.bmp
[green_minute_hand_ellipse_600dpi.bmp](https://github.com/user-attachments/files/22994061/green_minute_hand_ellipse_600dpi.bm...

tulip sleet
thorny jay
#

The diwali-monday-october-20 is only for shipping? Not for meeting?

tulip sleet
tulip sleet
#

got it. it is a float holiday so there is less staff present

lone axle
#

I'm going to be applying a patch with adabot, and then doing a release for all patched libraries. For anyone with github emails enabled you may see messages for some. I'll do another pass to clean up anything needed afterward as well.

manic glacierBOT
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

The broadcom port runs CircuitPython bare bones on older Raspberry Pi single board computers. The main reason for it was to have HDMI output. Now with RP2 DVI and future DSI support, this is much less valuable.

The broadcom port is unmaintained and lacks a lot of functionality (WiFi and multicore for example). So, we should remove it in CP11.

Maybe in the future Zephyr will support it and we'll inherit support from there.

solar whale
#

👋

tulip sleet
#

<@&356864093652516868> Bi-weekly meeting starting now.

thorny jay
#

Hi

solar whale
#

Sounds good

lone axle
#

Sounds good

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 10.1.0-alpha.0
turbid radish
#

🙂

#

Please use email

lone axle
turbid radish
slender iron
thorny jay
#

TL;DR: Tell your preferred AI about the hardware you have and CP code you want... chances are it will create working code!

#

Thank you Dan.

lone axle
#

Thanks for hosting Dan, have a great week everyone.

wraith crow
#

Thanks 😁

tulip sleet
#

You're welcome, and thanks everyone for attending.

#

@slender iron I'll make a 10.1.0-beta.0 release after I do the post-meeting stuff. is the alpha.0 tag at the 10.0.x branch point?

manic glacierBOT
tulip sleet
#

Here is the notes document for the next CircuitPython (Bi-)Weekly Meeting on Monday, November 3, 2025. 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/1l1zrqcAtX0VFLKH0gB8Cjm_yunue9TulW6c8-hHB6Xc/edit?usp=sharing

manic glacierBOT
tulip sleet
#

@tiny peak it occurred to me that another reason we didn't do sha256 was that the original requirement was on nRF BLE boards for a covid tracking app, so there was no mbedTLS impl to call

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; M5Stack DinMeter with ESP32S3

Code/REPL

import _bleio

from adafruit_ble import BLERadio
from adafruit_ble.attributes import Attribute
from adafruit_ble.advertising import Advertisement
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services import Service
from adafruit_ble.characteristics import Characteristic, ComplexCharacteristi...
manic glacierBOT
#

BLE provides different types of writes (with or without responses as an additional "option"), like normal and extended writes. Normal writes are "immediate" writes whereas extended writes usually carry a longer payload stream and induce one-or-more partial write messages (...PREPARE_WRITE...) concluded with an execute-write message (sort of like a sql-database commit).

At least for the nordic and espressif ports I didn't notice any exposed options relating to these write types. It would ...

tiny peak
# tulip sleet <@1220648290941669377> it occurred to me that another reason we didn't do sha256...

Interesting. I think I saw the PR for that one along with a later issue discussing whether to keep aesio around. I poked at hashlib on the RP2350 and ESP32-S3 Feather boards, which I plan to use for the LoRa sensor thing I'm working on, and they both support sha1. HMAC-SHA1 should be good enough for my current project. I may take a look at SHA256 again after that and before I move on to the TOTP project.

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 10.1.0-beta.0
orchid basinBOT
manic glacierBOT
tulip sleet
serene token
#

Question for CP devs: What was the original intent of adafruit_rgb_display?

I seem to recall reading somewhere that it came from Micropython's module with a similar name, but it feels a bit half baked to me. displayio is a fairly decent high level display library, but there doesn't seem to be any decent low level display library for CircuitPython. rgb_display feels to me like that's what it wanted to be, but it falls rather far short of that. It lacks any kind of buffering options, and it can't load images itself. (It can display PIL format images, but there's no PIL port for CircuitPython, so there's no way of loading images in the correct format.)

I ask, because I recently started working on a project that displayio is not very well suited to, and I have significant experience using real world low level display libraries for video game rendering. I'm seriously considering expanding rgb_display to turn it into more of a full fledged low level display library with buffering capabilities and at least the ability to load PNG images into buffers with the same format as is used by the screen (for fast blitting). If the original intent of adafruit_rgb_display was to become something like this, or if this is even just something that would be accepted if I put in pull requests for it, I'd be substantially more likely to actually do it.

serene token
#

Another question, closely related to this one: I've just found what looks like a massive design flaw in adafruit_rgb_display, that cannot be fixed without potentially breaking compatibility with Micropython. If I was to copy adafruit_rgb_display into an entirely new module, fix the design flaw, potentially reorganize it to make it better suited as a low level display library, and then add the above mentioned things, is that something that might be of interest for adding to the offical Adafruit modules?

#

(Note that I wouldn't be able to do this for all 9 drivers in rgb_display, as I only have one them. I'd only be able to do it for ST7789, but others more familiar with the other 8 could probably fix them fairly easily.)

lone axle
# serene token Question for CP devs: What was the original intent of adafruit_rgb_display? I s...

I cannot speak to the original intent of it, as it came about before I got involved. I first got involved around the time that displayio came out and became the more defacto standard that we use for most stuff.

But I can give you my take on it. I think it likely wasn't intended to be low level specifically to be more performant, but rather it was just made very early on and targeted what were at the time less powerful chips with less RAM. displayio makes a nice API, but is more demanding of the resources on the microcontroller.

Once the displayio ball started rolling it became the thing that we default to using for most projects, though there are a few instances like camera preview and I think gifio maybe? where some things get done outside of displayio in order to speed them up.

adafruit_rgb_display remained fairly primitive because it doesn't really get actively developed nearly as much as the displayio based libraries.

#

@serene token IMO improvements to rgb_display, or splitting to new library if needed with the aim to be higher performance than displayio would be welcome if you're interested in working on that.

New library vs. update existing depends a little on what the issue you found is and what kind of compatibility it breaks and how much existing code would need to be updated.

serene token
#

The issue I found is the rotation thing I posted an issue for on Github. The rotation argument applies to images being rendering to the display, rather than doing hardware rotation in the initialization. Existing code that uses the drawing functions relies on the current behavior, so fixing this would break that code. If this is acceptable, I think I can provide a fix for the ST7789 driver, but I don't have the time to fix the 8 other drivers. I wonder if displayio handles this correctly... If it does, I might be able to lift it's initialization code for those drivers and fix all 8 of them...

lone axle
#

as far as I am aware rotation works as expected for all displayio drivers, I have tried on several, but not all of them.

The PIL image thing could be intended for use specifically with Blinka the compatibility layer for linux SBCs. Many Blinka based graphics examples use PIL, I would guess the functions in rgb_display that deal with PIL formats were made for that context rather than CircuitPython on microcontroller.

#

displayio drivers are sort of split between python code and the core implemenation though. I'm not sure how rotation is handled. Porting the displayio rotation handling may involve looking inside the core implementation.

lone axle
#

I think it's fine to break compatibility with that in order to add a more functional rotation capability. We would need to coordinate updating Learn guide code as nesseccary still though if it changes behavior of anything that does use it.

serene token
#

I'll do some digging and see what I can find. I should be able to follow the chain of function calls in displayio to figure out where the rotation stuff is.

I think you are right on the PIL/Blinka thing. The rgb_display Learn guide is pretty Blinka oriented. I'm not going to try to reimplement PIL image loading, but displayio has some image loading code I could probably adapt (that's already in the right format for these displays, unlike PIL). If I do this, I'm going to aim for something similar SDL/Pygame, with surface objects that contain image data with functions for copying and such. I don't actually need to touch image() itself, if the image loading functions create surface objects that are rendered to a buffer surface using internal methods. The only compatibility breaking would be the rotation thing. And honestly, I might even be able to avoid that, but it would be much faster to let the display driver hardware do rotation than to handle it in CP before sending the buffer data to the display.

So I guess I'll start looking into displayio code to see if I can find initialization code for handling rotation for all of the different drivers. I won't be able to test most of the drivers myself, as I don't have all the displays needed to do that, but it's at least a start, and I'd rather not do just half the job (or one ninth, in this case), if I can avoid it.

Thanks for the information. That certainly helps. I'm not 100% sure I'll have time for this, but since I need it for my project, I'm hoping I'll be able to manage it.

slender iron
slender iron
#

I do also intend on implementing displayio on top of LVGL at some point to leverage any hardware accelerators that fancier chips have. this would also allow for lower level primitives outside of displayio too

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; ProS3 with ESP32S3

Code/REPL

import board
import displayio
import paralleldisplaybus
from adafruit_hx8357 import HX8357

displayio.release_displays()

spi = board.SPI()

tft_cs = board.IO12
tft_dc = board.IO13
tft_write = board.IO14
tft_read = board.IO15
tft_reset = board.IO16

display_bus = paralleldisplaybus.ParallelBus(
    data0=board.IO0,
    command=tft_dc,
    chip_selec...
manic glacierBOT
#

I have caused a hang, though not safe mode, in a trimmed down version of the program that just mounts the SD card and initializes the display. I will continue to work on this. Thanks for mentioning that it took several runs to cause. It takes about can take 2-3 runs, with ctrl-D in between to cause the problem.

If I disable the USB MSC presentation of the SD drive, the problem goes away. (I had to fix some problems with the disabling logic to make sure that the disabling was happening prope...

manic glacierBOT
serene token
# slender iron generally displayio drivers don't change madctl to handle rotation. they could f...

Would it be better, then, to not change madctl and to handle rotation in software? I've had some time to think about it, and while this would be more expensive, I think I can do it in a way that isn't massively more expensive than hardware rotation. Doing it this way, I think I could build an API that won't need to change anything at all within the existing code. Instead rotation would be handled as part of the initialization of the rendering buffer/surface, and the code for blitting would rotate during the blit by adjusting the ordering of the for loops.

As far as what I would do in CPython, I'd do it about the same way as I'm already thinking. I don't really design differently for embedded versus other platforms (in Python), except where it is necessary to fit within the limitations imposed by embedded devices. That said, I do design for optimization more than the average programmer, regardless of platform. I have some experience in video game programming starting in the early 1990s, in DOS/QBasic, where memory was limited to 640kB and CPU speed was on par with mid-range microcontrollers today (286 through 486). If the goal is to ensure that it will also work for Blinka, I don't think that will be problem at all. (I'd actually love to implement a lot of what I want to add in C, but I don't have the time for that, and it would be significantly harder to avoid compatibility issues. Maybe at some point in the future, once it's done in pure Python...)

I'm not familiar with LVGL, but a quick look at the Github page suggests it is promising. I didn't see much about lower level stuff, but the hardware acceleration is certainly a big benefit. And if it does provide even some basic low level stuff, it shouldn't be too hard to build something more complete on top of that.

manic glacierBOT
#

I think this is the second time I have found myself tracing back the code to lib/tjpgd/src/tjpgd.c:

		case 0xD9:	/* EOI */
			return JDR_FMT3;	/* Unsuppoted JPEG standard (may be progressive JPEG) */

before realizing that I needed to uncheck the progressive option when creating my JPEG file for CircuitPython.

This PR adds the progressive hint from the core comment to the reported gifio error. It does also increase the message size a little so I considered catching the error i...

manic glacierBOT
#

Just for posterity: Hiding the REPL display output is still possible by hiding the REPL (UI-)elements themselves:

for item in displayio.CIRCUITPYTHON_TERMINAL:
    item.hidden = True

The contained elements are the CP logo, the status line plus the actual REPL content. Put this in boot.py and it'll be a blank screen (except for a short flicker before this code is actually executed).

manic glacierBOT
orchid basinBOT
slender iron
#

I'm not wanting to put a bunch of optimization effort into displayio as-is because LVGL will change it all

manic glacierBOT
#

This reliably goes to safe mode without setting up the display at all. Two important things:

  • use spi = busio.SPI(board.SCK, board.MOSI, board.MISO) instead of the board.SPI() singleton.
  • wait 5 seconds after mounting. This gives enough time for the USB presentation to the host computer to happen.

So I think this has to do with the SPI object management. I discovered this by accident while trying to reproduce the previous test on a Pico W, which doesn't have a board.SPI(), so I had...

manic glacierBOT
#

From: https://forums.adafruit.com/viewtopic.php?p=1070425#p1070425

displayio has a slow performance case where overlapping dirty rectangles cause pixels to be recomputed more than once.

We could do merging or flattening of all the rectangles but that is complicated.

As a quick optimization, we could sum the areas of all of the dirty rectangles. If the number of dirty pixels is more than the screen itself, then it'd be faster to do a full refresh because it only does each pixel once.

manic glacierBOT
manic glacierBOT
tiny peak
#

For the discussion of perhaps speeding up displayio, something that might be worth considering is whether it would be possible to implement a more direct method of mapping from palette colors to buffer data for blitting as an easy performance win. My vague not-too-carefully-researched impression is that there might be a lot of room for optimization there.

tiny peak
#

@tulip sleet continuing the HMAC and hashlib sha-n algorithm discussion from the other day... I wrote what I think is probably a reasonably efficient Python function to do RFC 2104 HMAC using hashlib.new() to get a selectable (string argument) hash algorithm. Code at: https://github.com/samblenny/lora-greenhouse-monitor/blob/v0.1.0/sb_hmac.py. It passes all the RFC 2202 test cases for SHA-1: https://github.com/samblenny/lora-greenhouse-monitor/blob/v0.1.0/test_sb_hmac.py. Both the ESP32-S3 and RP2350 Feather boards have 'sha1' as their only implemented hash algorithm for hashlib.new(). So, this works for my LoRa thing now, but it would be nice if 'sha256' could be added.

serene token
# slender iron I think we didn't do madctl because we didn't assume that every display had it. ...

That makes sense with madctl. I'll implement rotation in software then. That's a solid reason. If optimization is needed, per-driver optimization can be added later.

As far as modeling after something in CPython, I'm going to try to model it on Pygame. I can't guarantee I'll mirror it exactly, mainly because it doesn't all make sense applied to microcontrollers. I'm also considering adding some features that Pygame doesn't have, if I have time after implementing the important stuff. (I have some experience writing a very basic 3D rendering engine, and I'd like to add a few features from that, but they aren't things I need for my current project, so they are more like stretch goals.) But yeah, doing it in pure Python should make it highly portable, especially if I can avoid having to make alterations to the existing code.

tulip sleet
tiny peak
#

I haven't looked at that at all. I just read the code for hashlib to see how the 'sha1' stuff worked

manic glacierBOT
tulip sleet
#

it does sha1 in Python too, so you could test your existing code against it, which might give a lower bound on the slowdown.

manic glacierBOT
wraith crow
#

@tulip sleet pre-commit is rebuilding circuitpython.pot and dropping two messages. The two messages are no longer used in the 10.0.x modules so that makes sense but the local/circuitpython.pot in the 10.0.x repository is out of date. Should I just go ahead and submit my PR and ignore the fact that it's including the new version of circuitpython.pot?

tulip sleet
#

then when it's checked in the PR build it will not complain.

#

it is running make check-translate to check

#

The PR pre-commit will not fix things for you. You need to do that in your PR.

#

just like it will not fix formatting complaints

wraith crow
#

running pre-commit locally does seem to run the make translate locally but I'll run it again to be sure.. it looks like the circuitpython.pot that I'll be including also drops a couple message changes that are not included in my PR, namely the removal of the runtime.c warning messages and a storage message "filesystem must provide mount method". Should I leave those changes in or manually remove them from the circuitpython.pot I submit?

tulip sleet
#

don't bother to change anything manually. It's computing what should be in there, and if there are no errors when the PR builds, then it should be fine.

manic glacierBOT
main furnace
scenic ibex
#

Anyone have any luck getting pre-commit to work on python3.12/Ubuntu 24.04? I'm having a really tough time despite trying multiple package managers and even creating virtualenvs with 3.10

scenic ibex
#

Let me dig up some logs really quick

#

This is happening even with 3.10, but I was getting some different errors with 3.12, let me grab those too

#

as a note, running on 3.10/ubuntu 22.04 worked fine

slender iron
#

I'm using python 3.13 on arch and don't have a problem

#

version 4.1.0 of pre-commit

scenic ibex
#

Hmm

#

I did also upgrade all the pip packages according to requirements-dev/doc.txt, and do pre-commit clean between runs

slender iron
#

maybe I have setuptools installed

#

yup, I have setuptools installed via pip

scenic ibex
#

I believe I do also:

pip install setuptools
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: setuptools in /home/username/.local/lib/python3.10/site-packages (80.9.0)```
#

let me try installing it via conda versus pip though...

#

Nope, same issue

tulip sleet
#

you do need to run everything in a venv

scenic ibex
#

Hmmm, okay, maybe my setup is just corrupt or weird or misconfigured then. I'll try to just create a clean venv or something and go from there. Thanks!

tulip sleet
#

python3 -mvenv myvenv
source ~/myvenv/bin/activate

#

should do it, then pip3 install -r requirements-dev.txt

#

I had a similar but not identical problem here about a year ago: <#circuitpython-dev message>. Updating absolutely everything in my venv fixed it.

manic glacierBOT
#

Just FYI. Confirmed that your test code (modified to access CS pin on my EYESPI-BFF/QtPy ESP32-S3 hardware) crashes CircuitPython 10.0.1.

import board
import busio
import sdcardio
import storage

# Sleep a bit so we can see print() output.
time.sleep(2)

#spi = board.SPI()
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)

tft_sdcs = board.A3
sdcard = sdcardio.SDCard(spi, tft_sdcs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
print("SD card mounted")

# Sleep long e...
serene token
# serene token That makes sense with madctl. I'll implement rotation in software then. That's...

Looks like this is going to require significant implementation in C. Using ulab.numpy, I managed to get the data transfer speed from a 2D numpy array to the screen up to...4 to 5 FPS (depending on rotation). The rotation itself isn't super expensive (seems like around 25ms), but the transfer itself seems to taking 180ms to 210ms, for a 320x240 16-bit display (153.6kB framebuffer, for around 850kBps peak transfer speed). With a baud rate of 24,000,000 (can the RP2350 SPI actually go that fast?), I would expect closer to 3MBps, but evidently CircuitPython can't manage that.

tiny peak
#

Looks like this is going to require

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

No, this is neither dormant mode, nor with SRAM retention. These are figures from my powman experiments. On wake up, the system resets so nothing in SRAM is retained.

In dormant-mode with state retention (aka "light-sleep") I am down to 1.9mA. See #10023 for details and a lengthy discussion about why it seems to be better to have no alarm-implementation for the RP2350 rather than to have at least a working implementation.

manic glacierBOT
#

Yes, 1.9mA is the current state of art. Theoretically, powman can also keep SRAM state but that would only help if you can continue where you left of. And I have not seen any working code that does this.

For real low power usage you either need a mcu that is optimized for that purpose, or use some external circuitry. But that would also not keep state.

#

@bablokb Oh, okay. So 1.9mA is the absolute lowest power sleep state the RP2350 can reach with SRAM retention? Shoot, I need my system way lower than that. Looks like I need to look for a different microcontroller. Thanks

Actually ~210uA is the lowest the RP2350 can go with 256kB of SRAM retained (SRAM power domain 1, specifically), specifically using low power mode "P1.6" as i mentioned above.

(note, this is using low power mode P1.6, ie not the RP2350's "S...

manic glacierBOT
#

Yes, 1.9mA is the current state of art. Theoretically, powman can also keep SRAM state but that would only help if you can continue where you left of. And I have not seen any working code that does this.

For real low power usage you either need a mcu that is optimized for that purpose, or use some external circuitry. But that would also not keep state.

Interestingly, one RISC-V assembly program I have been recently experimenting with, is the possibility of allowing the system to simpl...

#

There has been some work done on this, e.g. here: https://github.com/mamba2410/rp2350-powman-sleep, see also https://forums.raspberrypi.com/viewtopic.php?t=384176#p2297511

But this does not sound as if it were really usable ("I managed to get this working, mostly!").

Anyhow, before investigating this, I will first try to make the system enter sleep correctly for gpio-wakeups.

Thanks for linking the page! This is fascinating work, I was not aware this already existed! Hopefully ev...

manic glacierBOT
manic glacierBOT
manic glacierBOT
digital shoreBOT
#
adafruit
Owner

.adafruit

Members

39,040

Roles

37

Category Channels

8

Text Channels

65

Voice Channels

7

Threads

16

Boost Count

16 Boosts (Tier 3)

manic glacierBOT
#

@dwrrehman 188 µA sounds much better. In my case I don’t need the CPU to continue where it left off. I just need to keep an API key in SRAM retained. If I don’t need the CPU to resume its previous state, could allowing it to start from reset (or something along those lines) reduce the power consumption even further?

It seems allowing the CPU to start from reset will give you equivalent low power consumption, 188uA, (low power mode P1.5/P1.6, where 1 bank of ...

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit-Qualia-S3-RGB666 with ESP32S3

Code/REPL

import board
import displayio 
import time

from adafruit_display_shapes.line import Line 
import dotclockframebuffer #type:ignore
from framebufferio import FramebufferDisplay #type:ignore

displayio.release_displays()

# Init code copied from https://learn.adafruit.com/adafruit-qualia-esp32-s3-for-rgb666-displays/qualia-rgb666-w...
orchid basinBOT
#

CX (including C6) doesn't have native USB so it won't show as a CIRCUITPY drive.

Right, but I think he's suggesting using the serial method we use for boards without native USB even on boards with native USB.

Yeah that's the one.
I thought I vaguely remembered being able to do it in the past (but must have been native devices as you say Scott), and merged that with wanting to do it for some of the usb-serial boards I was using (to make it easier to test the wifi workflow).
That comb...

upper radish
#

Look, ma - no hardware! Work continues on the CircuitPython web assembly (wasm) port to further integrate the supervisor and hal with the JavaScript runtime via Emscripten. Now one step closer to being able to write and run your CircuitPython board's code.py in the browser, without a CircuitPython board. blinka_cooking

manic glacierBOT
#

Thanks for the tips, I FINALLY GOT IT WORKING!!! The program continues to work with the next function where it went into sleep mode with full SRAM saving.
But there's some magic! The do_sleep and exit_sleep functions are placed in memory, and exit_sleep is modified with attribute((naked)), so that it can make an unconditional jump to another part of the program without breaking the stack.
do_sleep remembers the return address and the stack size allocated for it
app_loop optimaze O0

...
manic glacierBOT
#

Add new board: Waveshare ESP32-S3 Touch LCD 2.8

Tested

  • Display works as intended from boot
  • QMI8658C IMU verified using the community qmi8658.py driver (pin aliases OK)
  • CST328 touch controller tested with a custom driver (datasheet-based)
  • MicroSD card verified with correct pin aliases
  • LCD and button aliases verified
  • SPI, I2C, I2S, and UART aliases confirmed working

Not tested

  • Battery...
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; M5Stack Cardputer with ESP32S3
Board ID:m5stack_cardputer
Cardputer ADV

Code/REPL

from adafruit_tca8418 import TCA8418
import board
import busio
import time
import cardputer_keyboard

cardputer_keyboard.detach_serial()
cardputer_keyboard.KEYBOARD.deinit()

i2c = busio.I2C(board.KB_A_1, board.KB_A_0)

tca = TCA8418(i2c)

# set up all R0-R4 pins and C0-C3 pins as keypads
KEYPADPI...
orchid basinBOT
orchid basinBOT
orchid basinBOT
turbid radish
manic glacierBOT
onyx hinge
#

This might be of interest in CircuitPython. The VESA video standard includes a series of formulas called GTF (generalized timing formula) which can be used to set the details of a video mode. adafruit pico-mac uses a version of hstx code nabbed from CircuitPython but I added gtf video mode support: https://github.com/adafruit/pico-mac/pull/10 so e.g., it can do 800x480@60Hz, 1280x720@50Hz, etc., as the underlying video signal resolution.

However, in a "the tail that wags the dog" way, the video generation + USB host support ends up dictating almost all of the other timing details of the fruit jam, leaving you with just 4 core CPU speeds (132 / 176 / 264MHz) to choose from.

Anyway, if someone was motivated I think it would be possible to adapt this back into CircuitPython but it'd be a fair bit of work.

https://social.afront.org/@stylus/115436062532613028

GitHub

Tested at 800x480 and 1280x720 (HD!) using https://www.adafruit.com/product/1667 as the display.
This increases the overvoltage from 1.15V to 1.20V and changes the PSRAM timing slightly, which made...

I wanted pico mac to be able to run at the top resolution that the RP2350 can handle reliably: 1280x720@50Hz HD. Oh, and the emulated mac is running with 4MB of RAM.

behold! it superficially works.

while I was getting ready to push this to my forks of pico-mac & umac I got a crash in the debugger that may just be due to extensive overclocking? I dunno yet. so, sadly, you can't grab & try it yet.

I'm off to do some IRL stuff but I hope to get this pushed soon.

@adafruit
#retrocomputing #fruitjam #mac #macintosh #macclassic

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit CircuitPlayground Express with samd21g18

Code/REPL

# SPDX-FileCopyrightText: 2025 Tom Hoffman
# SPDX-License-Identifier: MIT

# Modular Playground CircuitPython Euclidian Sequencer

DEV_MODE = True

# We use the gc library to check and manage available RAM during development
if DEV_MODE:
    import gc
    gc.collect()
    print("Starting free bytes (after gc) = " + str...
manic glacierBOT
#

Since 9.something, we removed a memory allocation scheme that tended to reduce fragmentation. I think that may be what you are running into here.

You might try doing some pre-allocation. For instance, this loop is appending to a list:

        for i in range(self.steps):
            # adding 0.0001 to correct for imprecise math in CircuitPython.
            current = math.floor((i * slope) + 0.001) 
            result.append(current != previous)
            previous = current
        se...
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3-1-g92170768f6 on 2025-10-22; Adafruit Fruit Jam with rp2350b

Code/REPL

import math
import supervisor
from adafruit_fruitjam.peripherals import Peripherals
from adafruit_fruitjam.peripherals import request_display_config
import array
import audiocore
import time
import displayio
from adafruit_display_shapes.circle import Circle

def play_tone(frequency, duration, volume=0.5):
    """Play a ton...
manic glacierBOT
#

I'm using displayio with small OLED displays, e.g. a SSD1306 based one with 64 x 32 px.
Example code:

import displayio
displayio.release_displays()
import board, busio
i2c = busio.I2C(board.GP3, board.GP2) # SCL, SDA
from i2cdisplaybus import I2CDisplayBus
display_bus = I2CDisplayBus(i2c, device_address=0x3C)
import adafruit_displayio_ssd1306
adafruit_displayio_ssd1306.SSD1306(display_bus, width=64, height=32)
print("0123456789")

The display shows 3 lines of text, where the first 2 ...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

OK, re-reading the micropython docs, I think what is confusing me is the relatively invisible bottleneck of compilation time memory use. Once the program is compiled and running, I can have 10k bytes free after compilation, but adding one character too many could cause a compilation time error, even if it has little impact on the memory usage by the running program. I'm going to do some experimenting with breaking out mpy libraries.

manic glacierBOT
tulip sleet
#

@slender iron do you have a few minutes to talk about SPI issues? thanks

manic glacierBOT
#

It looks like you're already using some of the Maximising MicroPython Speed tricks, but a couple other things you could try:

  1. Limit the number of names you put in the global scope (i.e. top level code goes in def main(): ..., then have a call to main() be about the only code that runs from outside of a function)
  2. Use # ... style comments rather than '''...''' style heredoc comments because heredoc comments ...
manic glacierBOT
slender iron
manic glacierBOT
#

I did have an SD card inserted but removing it didn't change anything. I also tried running from a power bank, not connected to a host computer and still got the same result. I've tried two displays, one is an old Dell monitor and the second is https://www.adafruit.com/product/2261. Both monitors have been working with multiple Fruit Jam apps like Fruitris, LarsioPaint, etc.. and I haven't noticed similar blanking on recent versions of CP.

wraith crow
slender iron
#

I'd prefer if folks would just create their own terminal

#

though that would only work for their output

wraith crow
#

I though that was what I remember you saying in the past....

slender iron
#

if only I had DSI working then I could use the same setup for testing the terminal 🙂

lone axle
#

That is the closest to an example that I am aware of. iirc I got a snippet for it from deep dive one day and started building IRC app from that but eventually added color support. I should make the plain Terminal version and add it to the docstrings for Terminal class.

manic glacierBOT
manic glacierBOT
#

The documentation that finally got me on the right track was this bit:

When a module is imported, MicroPython compiles the code to bytecode which is then executed by the MicroPython virtual machine (VM). The bytecode is stored in RAM. The compiler itself requires RAM, but this becomes available for use when the compilation has completed.

If a number of modules have already been imported the situation can arise where th...

manic glacierBOT
nimble sparrow
orchid basinBOT
tulip sleet
#

@slender iron Last night I converted espressif SPI to use a finaliser (took about 45 minutes), and ~~it fixed the SD card crashes!~~So I'll spend the time (with LLM help for speed) to make that change for all the ports. EDIT: not so fast: still not working with a release build as opposed to a debug build.

#

I think I will make this PR against main instead of 10.0.x, since it's rather wide ranging

lone axle
#

On the Fruit Jam I think that switching from CircuitPython to something else like apple 2e or 286 emulators, perhaps any arduino/C project? and then back to CircuitPython again results in /saves/ being readonly instead of writeable to CircuitPython. I believe that erase_filesystem() gets it back to working as intended.

Is this worthy of filing an issue about? Or just something that is a fact of life switching between types of firmware on the same device?

tulip sleet
lone axle
#

non-CPy emulators don't use /saves/ as far as I am aware, but I'm not entirely sure what if anything they do with the flash storage so perhaps there is something I'm unaware of.

I think it might be getting corrupted or erased, I believe I had files on it before switching to and then back from the emulators and afterwards it shows no files and gave me fiflesystem readonly error when I tried to write from cpy code.

CPSAVES does not appear when CPy is not running, that is correct.

#

I could do a few more tests to be more sure of the exact behavior if it's something we consider problematic. I noticed once a few weeks back when I did the apple 2e guide, and again just recently after switching back to CPy from the 286 emulator.

On some level though I'm not sure there is much that CPy could do about it if some other program happens to break or erase some or all of the flash. It shouldn't do so without reason, but if it does it's beyond our control it seems to me.

#

maybe just document somewhere what to do if writing to /saves/ reports the filesystem error

tulip sleet
slender iron
nimble sparrow
#

What panel did you test with?

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit Fruit Jam with rp2350b

Code/REPL

# write to a file in saves
with open("/saves/testfile.txt", "w") as f:
    f.write("test content")


# read from a file in saves
# with open("/saves/testfile.txt", "r") as f:
#     print(f.read())

Behavior

After this sequence of events the saves drive ends up in a broken state:

  • Start with CPy loaded and CPSAVES drive workin...
lone axle
#

I am noticing that having escaped newlines in a string in python code inside of a .. code-block:: python in a docstring in the core causes the docs build to fail. i.e.

message = "Hello World\n"

Because in the .rst file that gets generated it seems the newline has been converted to literal in that context rather than staying escaped within the python string inside the generated .rst file it's:

           message = "Hello World
   "

Does anyone know if there is an easy way to fix that or an example of any code blocks in the core that have escaped newlines in them I could look at?

#

double slash is the answer.

message = "Hello World\\n"

should have tried more things before asking

slender iron
#

I have a waveshare bar display I'm going to try next

manic glacierBOT
manic glacierBOT
#

Agreed with this ticket that there should be a neat way of doing this.

Workaround:

display.root_group[1].hidden = True  # logo
display.root_group[2].hidden = True  # status bar
supervisor.reset_terminal(display.width, TERMINAL_HEIGHT)
display.root_group[0].y = 0

Where TERMINAL_HEIGHT is the number that makes supervisor_start_terminal set status_bar->pixel_height to the height of the screen? Needs to be more than display.height but not sure how much.

manic glacierBOT
#
  • Fixes #10680 and perhaps other issues.

This is a multi-part fix for race conditions occurring on VM shutdown when an SD card mounted in user code is exposed via USB MSC. There can be filesystem operations initiated by the host that are in process when code.py ends., which cause crashes or USB disconnects. In the process of debugging this, I found several other things to clean up and add.

SPI resetting when VM shuts down

Previously, many ports had spi_reset() or reset_spi() ...

nimble sparrow
slender iron
nimble sparrow
slender iron
#

@nimble sparrow this is for the EV function board. I have a tab5 too but was going to try and get a waveshare bar display going first

nimble sparrow
#

I'll give it a go, seems like a good test as the ILI9881C has a fair bit of code for it

manic glacierBOT
manic glacierBOT
#

Tested on Metro ESP32-S3, Fruit Jam, Feather nRF52840 with AdaLogger FeatherWing, ESP32-S3 TFT Feather with AdaLogger, PyPortal. All mounted SD card manually except for Fruit Jam. The USB presentation worked and I was able to read files. I could write files when the SD card was mounted readonly=True. No crashes. The display worked fine on the TFT Feather (SPI) and on the PyPortal (not SPI).

Ready for approval to merge.

orchid basinBOT
nimble sparrow
#

@slender iron I'm going badly wrong somewhere even in just getting Tab5 to bring up. I don't suppose you had any tweaks you had to make to the build environment beyond default? Newer esp-idf or anything?

manic glacierBOT
manic glacierBOT
turbid radish
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit-Qualia-S3-RGB666 with ESP32S3

Code/REPL

#
# Qualia ESP32-S3 RGB666 40p TFT JSON test
#
import os
import ipaddress
import ssl
import wifi
import socketpool
import adafruit_requests
import time
import adafruit_connection_manager
import adafruit_ntp
import rtc
import supervisor
import json
import microcontroller
# Display libraries
import displayio
import busio
import boa...
#

I think the I2S_* names are connected to the b2b connector usually, but the MT* pins aren't connected to anything other than the pads on the bottom of the board for both versions. Though, I'm not sure if I'm understanding what you're trying to ask me clearly. Like when you ask if they are connected to anything, do you mean if they are connected to a different part of the board serving a different purpose?

manic glacierBOT
#

@dwrrehman

The status-bit makes me scratch my head... As you wrote

To re-enable a GPIO wakeup on a given pin after a low-power mode GPIO wakeup, I had to write to PWRUP0 twice: once with {STATUS=0b1,ENABLE=0b0}, and then again with {STATUS=0b1,ENABLE=0b1}. I deduced I had to do this, due to the datasheet saying the following under the ENABLE field of the PWRUP0 register:

ENABLE: Set to 1 to enable the wakeup source. Set to 0 to disable the wakeup source and clear a pending wakeup ...

#

I picked up a VL53L4CX recently, but didn't notice the lack of CircuitPython support until after it arrived. I decided to dig into it, to see if I could make it work. As noted above, the VL53L4CD library worked OK, but only up to ~2m.

I noticed a lot of similarity between the ToF sensors, so I decided to try the longer distance VL53L1X (4m) library. The library itself has some checks that prevents it from working out of the box. Fixing the ID/type check made it functional, but only up to...

manic glacierBOT
#

Hi, @bablokb,

Thanks for the question! :) I'll see if I can illuminate whats happening a bit more, if you'd like!

Below I've included the implementation of powman_enable_gpio_wakeup for our reference.

254 | void powman_enable_gpio_wakeup(uint gpio_wakeup_num, uint32_t gpio, bool edge, bool high) {
255 |     invalid_params_if(HARDWARE_POWMAN, gpio_wakeup_num >= count_of(powman_hw->pwrup));
256 | 
257 |     // Need to make sure pad is input enabled
258 |     gpio_set_input_enabled(gp...
manic glacierBOT
#

Thanks, this is very helpful and I really appreciate that you take the time to explain these details.

On the bright side, i have a hunch that it might be due to interactions of some other piece of code with the POWMAN system, for example, generated C code / CPU instructions involved in controlling something else on the RP2350 other than POWMAN's low power mode interface itself, and this seperate system is somehow sending events, IRQs, or something else which is causing the CPU to wake up....

manic glacierBOT
#

One idea which also came to mind, if that indeed may be the case, is to try holding in a "reset" state all peripherals on the RP2350, prior to going to sleep in the low power mode you are using (P1.x). This could in theory be done by writing almost all ones to the RESETS register, found in RESETS_BASE in the RP2350's address map, and described in section 7.5., titled "Subsystem Resets", and the RESETS register is described on page 506. My idea would be that, hypothetically If you were t...

manic glacierBOT
manic glacierBOT
tulip sleet
#

<@&356864093652516868> Here is the notes document for today's CircuitPython Weekly Meeting. Sorry for the delay in posting the link. 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!
https://docs.google.com/document/d/1S9clW6due_EaWHqmgnT70mtlas0AKxHrAGwpB4jYd6Q/edit?usp=sharing

manic glacierBOT
#

I think I solved the problem. I added some delays (mainly to give the system time to flush out trace-messages). CP has two APIs for that: mp_hal_delay_ms() and mp_hal_delay_us(). The former runs additional code, the latter is just a busy-wait. After switching to the latter I don't see the random behavior anymore.

There is still some way to go to make this usable in the context of CP, but at least the basics are working now.

slender iron
manic glacierBOT
tiny peak
#

Am I remembering correctly that Adafruit_CircuitPython_Bundle will pick up new library releases auto-magically if you just wait a day or two?

tulip sleet
tiny peak
#

thanks!

slender iron
manic glacierBOT
#

Adds support for MIPI DSI (Display Serial Interface) displays via a new mipidsi module. This enables high-speed serial communication with DSI displays using differential signaling.

The module provides:

  • Bus class: Manages DSI bus with 1-4 data lanes
  • Display class: Handles display configuration and framebuffer

Module is:

  • Disabled by default globally
  • Enabled only for ESP32-P4 (has hardware MIPI-DSI support)

🤖 Initial code generated with [Claude Code](https://claude.com/claud...

lone axle
#

Last two weeks sorry. I just merged the numbers manually instead of leaving them seperate.

nimble sparrow
slender iron
tulip sleet
#

thanks @lone axle !

nimble sparrow
lone axle
#

Have a great week everyone blinka

wraith crow
#

Thanks everyone

tulip sleet
#

I edited the meeting notes template to say to send meeting items to cpnews@ (and leave out all the other alternatives). I thought I had done that already but I must have just done it in the actual meeting notes last time.

lone axle
#

Here is the notes document for the next CircuitPython Weekly Meeting. It is on 11/17 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/1RWdada5krhZGWCBcpPSpDC7PajNVID8J8i5QZuM4gMk/edit?usp=sharing

nimble sparrow
manic glacierBOT
wraith crow
manic glacierBOT
#

Thanks, this is great. Could you do just one more stylistic thing? Group the pin aliases and surround them with blank lines. This makes it easy to see that there are multiple names for a single pin, and to proofread the list. See https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython/pin-and-device-names#pin-aliases-3169489. So, for example:

    ...

    { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO39) },
    { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO39) },
...
slender iron
manic glacierBOT
manic glacierBOT
#

No luck getting the M5Stack Tab5 going with this yet. The USB C is connected to GPIO24/25 which is connected to the serial/jtag peripheral. The USB A is the high speed OTG. We can switch the USB C to the FS OTG with an eFuse edit but then we cannot access the serial/jtag peripheral for bootloading.

CIRCUITPY_ESP_USB_SERIAL_JTAG doesn't enable it for some reason either. More debugging will be needed for this.

nimble sparrow
manic glacierBOT
#

Sorry for the late reply, and thank you for the follow-up.

Yes, I did review the Python-only approach using rp2pio and adafruit_pioasm, and it’s definitely viable for lower-throughput or less timing-sensitive devices.
However, for WIZnet Ethernet chips, I found that a native PIO_SPI layer offers practical advantages that go beyond interpreter overhead:

The design closely follows the Raspberry Pi SDK’s PIO SPI implementation used for the CYW43 Wi-Fi chip, which is already validated and ...

#

Thanks again for the thoughtful feedback. I wanted to clarify why I proposed a native PIO SPI implementation and ask whether you’d consider accepting it (or advising on the right shape for it).

The design closely follows the Raspberry Pi SDK’s PIO SPI used by the CYW43 Wi-Fi driver, combining PIO state machines with DMA-backed transfers. This architecture is already validated for continuous, high-speed register access on RP2040 and gives deterministic inter-byte timing that WIZnet parts ar...

serene token
#

Semi-random questions about Fruit Jam OS:

First, is fruit_jam_ja.zip Javanese or Japanese? Typically Japanese is jp not ja, but I would expect to see support for Japanese before Javanese. (Though a quick Google shows that Java has a larger population than Japan, so maybe I'm wrong?)

Second, what the heck is fruit_jam_en_x_pirate.zip?

Anyhow, I thought I would ask. I don't see any notes on the various releases saying what their languages are, and the locale codes aren't always consistent...

fiery pecan
fiery pecan
stuck elbow
# serene token Semi-random questions about Fruit Jam OS: First, is `fruit_jam_ja.zip` Javanese...

ISO 639 is a standardized nomenclature used to classify languages. Each language is assigned a two-letter (set 1) and three-letter lowercase abbreviation (sets 2–5). Part 1 of the standard, ISO 639-1 defines the two-letter codes, and Part 3 (2007), ISO 639-3, defines the three-letter codes, aiming to cover all known natural languages, largely ...

#

country codes are different from language codes, because languages are not countries

serene token
serene token
# stuck elbow Javanese is jv, see https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes

Well that is truly odd. For language specifically, I've always ever seen Japanese as jp in filenames. That even includes certain official fonts used by the Japanese government in official documentation. ISO has Japanese listed as ja though, and jv does make more sense for Javanese, so I guess ja must be for Japanese here.

Thanks! I was not aware of the official standard there. I was clearly only aware of what must be an ad hoc language code or maybe the frequent use of country code in places where language code would make more sense.

stuck elbow
lone sandalBOT
serene token
wraith crow
manic glacierBOT
manic glacierBOT
#

Temporary build failures due to

This is a scheduled macos-13 brownout. The macOS-13 based runner images are being deprecated. For more details, see https://github.com/actions/runner-images/issues/13046.
The macOS-13 based runner images are being deprecated, consider switching to macOS-15 (macos-15-intel) or macOS 15 arm64 (macos-latest) instead. For more details see https://github.com/actions/runner-images/issues/13046

so maybe we should update the .github/...

lone axle
#

I noticed that the downloads page lists the latest dev release as CircuitPython 10.1.0-beta.0 and when I download a UF2 its filename contains 10.1.0-beta.0. But inside of boot_out.txt it lists 10.1.0-alpha:

Adafruit CircuitPython 10.1.0-alpha.0 on 2025-10-20; Adafruit QT Py ESP32-S3 no psram with ESP32S3
tulip sleet
#
commit 6fe19f77da0537b124b5c5c3a4138e11bcc97306 (tag: 10.1.0-beta.0, tag: 10.1.0-alpha.0)
Merge: 799f13ce6f 8b1fcb444d
Author: Scott Shawcroft <scott@adafruit.com>
Date:   Mon Oct 20 11:00:34 2025 -0700

    Merge pull request #10676 from tannewt/idf5.5.1
    
    Update ESP-IDF to 5.5.1
tulip sleet
#

@slender iron did you omit socket.recv() in SocketPool.Socket to save space and encourage reusing buffers? Wondering if we might add it for completeness (as I look at ESP32SPI).

slender iron
#

@tulip sleet I think we actually want to refcount mipidsi.Bus because multiple displays could use it

tulip sleet
#

is FourWire ref-counted the same way?

#

it relies on SPI underneath, but there's all the copying.

slender iron
#

fourwire takes a CS pin to differentiate

#

it's a bit weird because mipidsi.Display is stored next to the buses because the display is actually FramebufferDisplay

tulip sleet
#

could there be more than one mipidsi.Bus or should it be singleton? I don't know what the hw supports

slender iron
#

most MCUs I see only support one Bus

#

some of the newer Pis with broadcom chips have multiple

#

could statically allocate it

#

probably still want to refcount its use so that it can turn off when not in use

tulip sleet
#

that makes sense

slender iron
#

your finalizer comment made me think about it 🙂

tulip sleet
#

if the pins are dedicated to only DSI then that makes a difference, I guess. If they can be used for something else if it's not running then more regular deinit is useful.

slender iron
#

none of the MCUs I looked at share them with anything else

#

they are 1.2v logic so that may be why

#

(when single ended)

manic glacierBOT
#

Temporary build failures due to

This is a scheduled macos-13 brownout. The macOS-13 based runner images are being deprecated. For more details, see https://github.com/actions/runner-images/issues/13046.
The macOS-13 based runner images are being deprecated, consider switching to macOS-15 (macos-15-intel) or macOS 15 arm64 (macos-latest) instead. For more details see https://github.com/actions/runner-images/issues/13046

so maybe we should update the `.github/.....

manic glacierBOT
#

ehh

fatal error: /Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: mpy-cross/build/mpy-cross and mpy-cross/build-arm64/mpy-cross-arm64 have the same architectures (arm64) and can't be in the same fat output file

Intel macos is only supported for free runners on macos-13. So I think we need to punt on Intel macos mpy-cross now.
See https://github.com/actions/runner-images/discussions/10810

manic glacierBOT
#

I don't know if this is something that should be addressed in this PR or if it's a separate issue but I worked up some code that demonstrates the bottom of the screen refresh issue I'm seeing.

when I run this code.py the program stops at the first input prompt but the MIPI DSI display doesn't show the correct output at the bottom of the screen, then when you press enter, the screen is updated and when it stops at the second input prompt (which inserts a display.refresh() while waiting for...

manic glacierBOT
#

I am already using this display and with this patch I would have to change my application program. No big deal, but I don't think one choice is better than the other, so we could just leave it as it is.

I understand you concern but when i wrote this code

label.Label(terminalio.FONT, text="HELLO WORLD", color=0xffffff)

without this fix it draws the text in white it's so weird.

manic glacierBOT
manic glacierBOT
#

To summarize:

  • Normal build:

    • Log console on the e-ink display : text white on a black background
    • default background: black
    • label.Label(terminalio.FONT, text="Normal"): text white
    • label.Label(terminalio.FONT, text="With 0", color=0x000000): text black
    • label.Label(terminalio.FONT, text="With f", color=0xffffff): text white
    • same with displayio.Palette
  • Build with this PR:

    • Log console on the e-ink display : black text on a white background
    • d...
manic glacierBOT
manic glacierBOT
manic glacierBOT
slender iron
#

@tulip sleet I'm done working for now. I did test the ev display yesterday and it worked. I saw the issue @wraith crow saw too but it can wait.

tulip sleet
manic glacierBOT
#

But In my mind the e-ink default background was white. Is maybe an misconception of my part, as I may be fool as I see almost all example on internet with a white background.

There's no fool here. We're trying to make the background color be consistent across many displays, so that you could port code between display types without changing the colors. (There are other changes you might need to make, such as display size and refresh strategy.)

manic glacierBOT
#

_Originally posted by @RetiredWizard in https://github.com/adafruit/circuitpython/issues/10703#issuecomment-3489121482_

I don't know if this is something that should be addressed in this PR or if it's a separate issue but I worked up some code that demonstrates the bottom of the screen refresh issue I'm seeing.

when I run this code.py the program stops at the first input prompt but the MIPI DSI display doesn't show the correct output at the bottom of the screen, then when y...

manic glacierBOT
manic glacierBOT
wraith crow
#

@lone axle Were the Fruit Jam OS release assets supposed to change to the source files?

#

never mind, I just looked too soon 😁

lone axle
#

It does take a few minutes to generate and upload.

wraith crow
#

Couldn't wait 😂

ebon oracle
#

Hi folks! I'm new to this Discord server but not to MicroPython/CircuitPython.

I'm running into an issue in a library I wrote for inclusion in the Community Bundle,
having set up my repo using the adafruit cookiecutter template.

When I push to Github, the circuitpython-build-bundles step fails because mpy-cross errors out
on syntax pasting adjacent f-strings:

Run circuitpython-build-bundles \
Traceback (most recent call last):
  File "/tmp/tmp5wl87qxs", line 163
SyntaxError: invalid syntax

The syntax it's complaining about is this:

def __repr__(self) -> str:
    return (
        f"Box(x={self.x}, y={self.y}, w={self.w}, h={self.h}, "
        f"score={self.score}, target={self.target})"
    )

However, I just built mpy-cross from the CircuitPython HEAD and it doesn't
complain about this syntax.

I suspect that mpy-cross needs to be updated in the GitHub actions or the bundling script
but I don't know how to do this.

ebon oracle
#

It looks like the mpy-cross the actions are using lives in the circuitpython-build-tools module.

ebon oracle
#

I fixed my code, but maybe the mpy-cross needs to be updated.

tulip sleet
ebon oracle
manic glacierBOT
main furnace
#

Is there a 'hello world' for adding a C module to CircuitPython?

fiery pecan
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 10.1.0-beta.1
orchid basinBOT
nimble sparrow
#

Oops, not sure the Tab5 board was meant to stay in 😩

nimble sparrow
#

Ah, did the issue with serial/JTAG get resolved?

tulip sleet
#

I don't know. We can always take it back out

#

I think you're the only other one with a Tab5. You could try the 10.1-beta.1 build after it finishes

nimble sparrow
#

Yeah I'll give it a go

tulip sleet
brazen loom
#

good morning! quick question. I added a board to the circuitpython repo, it was already merged. When should I do the download page PR for the website?

lone axle
brazen loom
#

awesome! thanks

upper radish
# turbid radish DO let me know when you are looking to release, even for testing. cpnews@adafrui...

I think things are strong enough to consider an experimental release for folks to test. https://github.com/johnnohj/circuitpython/tree/wasm-mk2 I'd love to have some experienced eyes look over the implementation because it's at an unusual point where it could lean harder into true CircuitPython build patterns, or else maintain its middle path. I've tried my best to provide clear documentation, and suggest the best way to try out is using the CircuitPython web-editor fork: https://github.com/johnnohj/web-editor/tree/wasm

This is an unusual port because it requires so much beyond the built files and relies heavily on the JavaScript runtime environment. All help tightening this port up greatly appreciated! blinka_cooking

manic glacierBOT
sly talon
#

Hello. I just picked up a waveshare S3 7"/touch. It's the 'A' rev, so resolution is the same as the 4.3, and the product page only shows the 7 has part while the 4.3 doesn't.

Theres a beta release for the 4.3. Can someone point me to a guide to making board packages, and I'll try my hand at setting up the 7.

#

** 7 has UART, 4.3 doesn't

sly talon
#

OK, I totally misread that, not the 4.3 after all.

fiery pecan
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit Pixel Trinkey M0 with samd21e18
Board ID:adafruit_pixel_trinkey_m0
UID:6A4C909D434C585020312E320C2619FF

Code/REPL

import time
import board
import neopixel
# --- Configuration ---
NUM_LEDS = 160


# Number of LEDs in your external strip
DATA_PIN = board.DATA             # External data pin (D0 pad on Trinkey)
BRIGHTNESS = 0.5                 # Set between 0.0 and 1.0 to...
manic glacierBOT
manic glacierBOT
#

I was thinking about this some more and it occurs to me that some IDE's like MU or Thony attempt to set the clock on the microcontroller. When I connected Thonny to a QT Py M0 I receive the follow message:

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit QT Py M0 with samd21e18
WARNING: Could not determine epoch year (argument num/types mismatch), assuming 1970

If you are using an IDE to connect to the microcontroller, you might try using a simple terminal program like tio if y...

manic glacierBOT
#

Good suggestion, thank you!

Editing in an ordinary file and copying to the USB drive does not exhibit the problem. (Pycharm on Linux, copying code.py to /media/davs2rt/CIRCUITPY/)

I was trying to use Thonny when the problem appeared. Changing sync_time to False helped. The first warning goes away. I also switched to "local_rtc = False". I still get the latter two warnings, but I'm no longer in safe mode and code.py executes on cold boot.

So, I would still describe it as a bug. Thonny ...

sacred blade
#

Hello, i've got an adafruit feather rp2350, but would like to use it with micropython (mostly to use the second core, and native modules).
I've tried to create a new board definition, based on the pico2 but with the correct board definition ("adafruit_feather_rp2350") for pico-sdk.
Build and flash ok, but no usb enumeration on boot ...
What are the main differences between a pico2 and a feather_rp2350 that could cause this to fail ?
I'm thinking mainly about a different flash chip, with different clock or initialisation requirements, but then got confused about boot2 and what is initialising the flash...
I'm going to trace the startup process with swd, but if someone's got a hint, that would be great !

stuck elbow
tulip sleet
jaunty juniper
#

@tulip sleet committed the change to ESP32SPI (also noted the default blocking state is not documented in the core or the library, we could add that at some point)

tulip sleet
#

thanks!

tulip sleet
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit-Qualia-S3-RGB666 with ESP32S3

Code/REPL

#
# Qualia ESP32-S3 RGB666 40p TFT Display Backlight Test
# Borrowed one of the learn guide display examples (color bars display)
#
import time
import displayio
import busio
import board
import dotclockframebuffer
from framebufferio import FramebufferDisplay
import random

print("\nQualia Backlight Test\n")

# 4-inch square RGB-6...
orchid basinBOT
manic glacierBOT
#

On the Qualia board, the display backlight is controlled by a set of jumpers and possible PWM on pin A1, if you solder a jumper closed. See https://learn.adafruit.com/adafruit-qualia-esp32-s3-for-rgb666-displays/pinouts#step-3155525. Also see https://learn.adafruit.com/adafruit-qualia-esp32-s3-for-rgb666-displays/backlight-settings for electrical information.

The actual backlight on/off is controlled in the I/O expander, and supported in the Qualia library. There is a shortage of pins and we...

manic glacierBOT
manic glacierBOT
tulip sleet
#

@lone axle and anyone else:
The adafruit_esp32spi library and a few others have a redundant module naming structure that looks like this:
adafruit_esp32spi/adafruit_esp32spi.py, which means you usually do from adafruit_esp32spi import adafruit_esp32spi.
Do you think it is worth fixing these in the long run, putting all the stuff in adafruit_esp32spi.py into __init__.py? Then you could just do import adafruit_esp32spi. We could make this backward compatible by doing that and then having an adafruit_esp32spi.py that just does from . import *. Eventually we could get rid of the extra layer.
This structure is present in esp32spi, the wiznet library, the mqtt library, and maybe one or two others.

There are also other .py files that have unnecessary prefixes in the library, like adafruit_esp32spi/adafruit_esp32spi_socketpool.py, which could just be adafruit_esp32spi/socketpool.py. Again could be fixed and made backward compatible with a from <something> import *.

Maybe I am just being crabby because I'm C-izing the esp32spi library, and I'm ending up with very long C function names like common_hal_adafruit_esp32spi_adafruit_esp32spi_esp_spicontrol_get_socket(). But I've always found the identical name nesting to be confusing.

lone axle
tulip sleet
#

yep, that was one of the other ones

#

there are a lot of examples to change, unfortunately, for esp32spi code

#

at the very least, we should prevent this from happening in future libraries, but I think these are all historical and people don't generally do that anymore

lone axle
#

That is true, it will be a lot to update. But a fiarly minor change in most cases. Checking on learn guides that have code broken out into non-embedded blocks will take a little time but I think there won't be too many to update.

#

having the backwards compatibility in place for a while gives us time to spread it out a little too. And then we can aim to remove in conjuncunction with some future major release.

tulip sleet
#

a google site search for "adafruit_esp32spi.adafruit_esp32spi" would probably find nearly all

#

in the meantime I will do my C-izing in the collapsed naming scheme

tulip sleet
#

... I did some more reading about this. In larger Python codebases the stuff in __init__.py is largely confined to imports and other housekeeping stuff, and there's usually not real code in it. Of course, most of our libraries are not large codebases at all.
Instead of moving the contents of adafruit_esp32spi.py into __init__.py, we could just put from .adafruit_esp32spi import * in __init__.py. That would reduce the level and still make it backward compatible (forever).

#

There is also a whole thing about "namespace packages", which are packages without __init__.py, and have special rules. MicroPython (and therefore us) do support them, but not split across filesystems.

manic glacierBOT
#

I am running into the same issue with Circuitpython 10.0.1 on an Adafruit ESP32-S3 Reverse TFT-Feather board.

  File "adafruit_ble/__init__.py", line 212, in start_advertising
MemoryError: Nimble out of memory

I think I tracked it down to the BLE workflow. That seems to get started automatically once there's a bonded/paired device - iff I understand that here correctly: https://github.com/adafruit/circuitpython/blob/fa4caf835ff194c7c8ba4dede7caf69e5f011602/supervisor/shared/bluet...

manic glacierBOT
fiery pecan
#

Is the nonintuitive nature of the set pins, □ PIO instruction, when driving the built-in LED, something to be expected? I described my experience here: #help-with-circuitpython message

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

tried to use this to build and after having issue I noticed that this PR is > 2 ys old and still open.
Unfortunately outdated, maybe I raise a PR when fixed.

Just mentioning some: arm toolchan needs v14, xz-utils, some issues in pip install (on wheel and cryptohtaph)

But the idea is worth following. Image will be 3.4G and I dont want to have all toolchain / pip modules breaking my system, no offence,

manic glacierBOT
manic glacierBOT
#

Looks like DotClockFramebuffer needs to take in PWM pin for the backlight. It implements the brightness functions for the FramebufferDisplay but doesn't do anything meaningful for them. I bet I punted on it when I added it.

https://github.com/adafruit/circuitpython/blob/fa4caf835ff194c7c8ba4dede7caf69e5f011602/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c#L296-L302

manic glacierBOT
manic glacierBOT
manic glacierBOT
grizzled dust
#

N00B questions here: Using adafruit_logging module, created a wrapper around it to implement a lightweight RotatingFileHandler (in order to avoid overrunnign the small onboard storage). (Q1): Is this sometihng the project could use/want in the core? Currently, the code is in .py, but I should be able port to C if need be. and I'm comfortable with git branching and pull requests,. However, I've gone through the project and the Contributing.md, but for the life of me cannot figure out where adafruit_logging derives from. It looks like logging comes straight from MicroPython but is then wrapped. (Q2): Suggestions on where to look? I'm sure it's obvious...

lone axle
# grizzled dust N00B questions here: Using adafruit_logging module, created a wrapper around ...

AFAIK adafruit_logging is intended to be an adapted subset of the CPython logging module. If the CPython one has a RotatingFileHandler included I think it'd be fine to include in the circuitpython one as well.

If that is not something that is built-in to the CPython one we'd probably elect to keep it as an example file or elsewhere rather than incorporating it into the library itself.

The code for the circuitpython implementation is here: https://github.com/adafruit/Adafruit_CircuitPython_Logging I don't think it uses the micropython implementation, but I'm not sure. I don't believe that adding that would reqauire any changes in C in the core though because this module is implemented purely in python.

grizzled dust
#

Wow, thank you. And LOOK --> RotatingFileHandler is in there already. I was fed bad info with my web search (which claimed adafruit_logging did not have a RotatingFIleHanddler). Thanks, anyway.

manic glacierBOT
#

CircuitPython version and board name

Custom board with the MGM240PA32VNA

Code/REPL

import time
from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement

# Create BLE radio
ble = BLERadio()

# Set the BLE device name
ble.name = "SimpleBLE"

# Create a basic advertisement packet
advertisement = ProvideServicesAdvertisement()
advertisement.complete_name = ble.name

print("Advertising as:", ble.name)

# Start a...
sacred blade
tulip sleet
#

The pico2 UF2 should sort of work on the Feather RP2350

#

EXCEPT that you may need to set

#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64
#

in the equivalent place

#

and all the USB stuff should be RP2350

sacred blade
#

"The pico2 UF2 should sort of work on the Feather RP2350" -> Yes, that was my hope, but it doesn't. I've tested with #define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64, too.

tulip sleet
#

to confirm, does the CircuitPython Feather RP2350 UF2 work fine on your particular board?

#

I don't know that MicroPython presents a drive. I think not. Does USB serial come up?

sacred blade
tulip sleet
#

MicroPython has been moving away from presenting a FAT MSC drive, and instead uses LittleFS on many boards and requires you to use mpremote and similar to read/write files to the filesystem

#

If the serial port is there, but the drive is not, that's what's going on.

sacred blade
#

Does USB serial come up : no, no usb enumeration after boot

tulip sleet
#

hmmm. I am off for 45 minutes or so, will take a further look later

sacred blade
#

Ok, thanks.

tulip sleet
#

point me to your repo & branch

sacred blade
#

I'm wondering if it's not a difference in the flash setup... with the fact that micropython is using pico-sdk 2.1.x and circuitpython a 2.2.x version, with many changes in rp2350 boot seq...
I'll upload my test on github and give you the link.

tulip sleet
#

I looked at boards/ differences and they look fine to me. Only significant difference is that the PICO2 doesn't define the VID and PID.

#

I looked athe RP2040 vs the PICO and there are similarly very few differences

sacred blade
#

"Build the pico2 and see if that UF2 works on a pico2, if you haven't done that already" -> yes just tested it now. Same repository, BOARD=RPI_PICO2 make -j 10 deploy -> works on a pico2

tulip sleet
#

I can try a build locally

sacred blade
#

make clean is enough or there is a "more clean" option ?

tulip sleet
#

that should be good enough

sacred blade
#

.. but it does'nt change the result.

tulip sleet
#

ok the RPI_PICO2 build works on a real Pico 2 and on the Feather RP2350... Now I'll try the Feather build

tulip sleet
sacred blade
#

did "make clean BOARD=ADAFRUIT_FEATHER_RP2350"

tulip sleet
#

i'm doing your board build, but in the latest micropython

sacred blade
#

Ok. But there is something strange in my board/setup as a Pico2 build (or the official uf2 from micropython) does'nt work on my feather...

tulip sleet
#

@sacred blade still trying things...

#

my guess is that the Pico 2 build is working for my Feather because my board doesn't happen to need the XOSC MULTIPLER 64. That would vary sample to sample. I've tried removing nearly all the pins, removing the PID and VID, and defining the flash size with a constant, as is done in ADAFRUIT_FEATHER_RP2040, none of which work

#

I also shortened the name, which seemed to be truncated in the UF2 file by one character

sacred blade
#

I suspect that the difference is in the flash setup. Circuitpython does some clever thing with a database of flash parameters matched with chip ref (and indeed there is two flash chip listed for the feather, explaining the sample difference, maybe)

#

Micropyhon hopes that pico sdk will do the job, according to the board choosen by set(PICO_BOARD xxxx)

tulip sleet
#

the sample difference for the multiplier is due to variations in the XOSC components. But I think may be the flash too. I am trying a few more things related to that.

#

first I am replacing the pico-sdk .h for the feather with the pico2 one.

#

there is also a difference in the power setup

#

... ok yes, after that replacement it works, so the difference is in the pico-sdk .h file

tulip sleet
#
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
#

is missing from the .h for the feather in the pico-sdk

#

If I add that, it works, so try adding that in mpconfigboard.h

#

sounds like we need a PR

sacred blade
#

Already did, it is in a comment, but i'll try again...

tulip sleet
#

i also made the flash size 4MB, haven't undone that yet

sacred blade
#

Tested with #define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1 -> not working.
But if my feather got the other flash chip ( GD25Q64C ? ), it could explain why the W25Q080 or base pico2 variant is not working ?

tulip sleet
#

mine has a winbond Q64

#

i bet yours does too

#

i'm making one change at a time now

sacred blade
#

Hard to read but with a good magnifier I can confirm that your bet is correct. It's indeed a winbond Q64JVX.

tulip sleet
#

is working for me. I think putting it in mpconfigboard.h is not enough because something else like the stage 2 builder is not looking at that

#

WHY this is necessary I am not sure.

#

I have to stop for a while, but it would be worth looking at what's going on in the bootloader build

sacred blade
#

Ok, thanks a lot for the time taken, it works for me too with #define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1 in the sdk file !

#

Would never have found it...

tulip sleet
#

divide and conquer all the way... what is different? pico-sdk files AND your files

#

eliminate the differences one place then start putting them back

#

i don't know what's different about MicroPython. If bare pico-sdk works without that define, then what's up?! I can believe CIrcuitPython does its own thing.

#

need to test whether a simple pico-sdk project works with that board definition

#

without the extra #define

sacred blade
#

I've got to drop, it's getting late here. Thanks again.

lone sandalBOT
tulip sleet
tulip sleet
orchid basinBOT
manic glacierBOT
lone axle
lone axle
#

Thanks for hosting Dan. Have a great week everyone!

wraith crow
#

Thanks Dan!

tulip sleet
#

thanks everybody!

manic glacierBOT
manic glacierBOT
#

without iter_bmp = IterableBitmap(source_bitmap) and after changing the np.array argument to a placeholder list it does execute without crashing.

It also doesn't crash if I leave iter_bmp = IterableBitmap(source_bitmap) in, but don't pass it as the argument to np.array(). So perhaps this is an issue with the way I set up the interable interface, or the fact that it's being defined at the python layer?

I also narrowed this down a little further by removing Bitmap from the iterable cla...

lone axle
tulip sleet
#

is it still in the bundle?

tulip sleet
#

Here is the notes document for the next CircuitPython (Bi-)Weekly Meeting, on Monday, December 1, 2025. 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/1wqJsxaeDVgu5a84WERN982k61Woc9vpRqD6HiSgmG2w/edit?usp=sharing

manic glacierBOT
lone axle
tulip sleet
lone axle
#

I'll update the readme with a pointer to the other register library and archive.

manic glacierBOT
lone sandalBOT
onyx hinge
#

@tulip sleet some months ago I think we discussed that I want to move my port of the decimal package out of my personal github, and I think we decided to transfer it into the circuitpython org.

if you have a few minutes of time available, I'd like to go ahead and transfer https://github.com/jepler/Jepler_CircuitPython_udecimal into the circuitpython organization; I do not have the permissions necessary to do so. After that I'll make a PR to change its URL in the community bundle [or should it move to the circuitpython.org bundle?]

I've also invited "adafruit-travis" to be an owner of the project so that Adafruit folk can manage it.

GitHub

Reduced version of the decimal library for CircuitPython - jepler/Jepler_CircuitPython_udecimal

tulip sleet
#

let me see who owns some other circuitpython org projects in pypi

#

do you want to replace jepler in the repo and library name?

#

Jepler_CircuitPython_udecimal and jepler_udecimal/

onyx hinge
#

I have some setting in discord that lets me hold shift over a message and get more options; one is a no-confirmation delete button

#

I think it's "advanced > developer mode"

tulip sleet
#

worked for me too!

onyx hinge
#

thank you for working with me on this!

tulip sleet
#

thanks for doing it; all transfers completed, as far as I can tell. I should write up all the ownership and username stuff instead of just remembering it.

#

I transferred the repo to the org. You have to be a member of the org.

#

you could be a member of the org; there are other outside collaborators

onyx hinge
#

that's OK, I don't usually need to do anything in there these days 🙂

orchid basinBOT
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; PCA10059 nRF52840 Dongle with nRF52840

boot_out.txt:
Adafruit CircuitPython 10.0.3 on 2025-10-17; PCA10059 nRF52840 Dongle with nRF52840
Board ID:pca10059
UID:AC2D4B6D80A68DEA
boot.py output:

boot.py:
import storage
import supervisor
storage.disable_usb_drive()
supervisor.runtime.autoreload = True

Code/REPL

x  # Yes - this program makes pca10059 crash!

Behavior

No r...

manic glacierBOT
manic glacierBOT
#

I left boot.py how it was - but here is a sequence with the expected output and a crash:

First start with a well defined filesystem

>>> import storage; storage.erase_filesystem()
-> need powercycle

Copy boot.py via usb mount

$ cat boot.py
import storage
import supervisor
storage.disable_usb_drive()
supervisor.runtime.autoreload = False
$ cp boot.py /media/maerki/CIRCUITPY/

Expected behaviour

Powercycle

>>> x
Traceback (most recent call las...
manic glacierBOT
#

I have a couple of PCA10059's on one. I tried 10.0.3 on one, and could not reproduce your error.

When did you get the PCA10059, and did you flash the UF2 bootloader onto the board? Or did you try loading CircuitPython a different way?

If you flashed the UF2 bootloader a long time ago, I am suspicious that it is out of date. For recent versions of CircuitPython, you really need a newer bootloader to accomodate the larger amount of firmware space that CircuitPython now uses. Normally the UF2...

tulip sleet
#

@slender iron @lone axle would you have time for an ESP32SPI library/native-module discussion today when you are both on? There are some different directions for me to go in here, and i want to bounce some ideas off you. Thanks.

slender iron
#

I'll be on in 15 min or so. Just put rynn down

lone axle
#

Yep, I am available as well.

slender iron
#

Ok, I'm here

manic glacierBOT
#

I just bought a couple of the xiao esp32-s3 sense boards, and have found that Circuitpython does not support the new (OV3660?) camera sensor. The example code on the Seeed Wiki doesn’t work.

My test code just tries to capture a single image:

import os
import espcamera
import board
import sdcardio
import storage
import time
import busio
import errno

sd = None
try:
    sd = sdcardio.SDCard(board.SPI(), board.SDCS)
    vfs = storage.VfsFat(sd)
    storage.mount(vfs, '/sd')
    print...
tulip sleet
#

example in py/modsys.c

manic glacierBOT
manic glacierBOT
#

Hi Dan

Thank you very much for your time and precise responses so far.
I have two dongles, both very new. I always flashed the bootloader using picoprobe and never used something older than 0.9.2. Something is leading us astray...
The second dongle was brand new and below you see what I did do it. Conclusion: Exactly the same error. But rarely 10.0.3 gives a correct stack trace. It has something to do with the boot sequence - there must be some state around in the registers or the filesystem...

tardy plume
#

I need help. I need to create a variant of a new board for circuitpython. It could be called, for example, "NRF52840 _RAW" it would be exactly like https://circuitpython.org/board/ADM_B_NRF52840_1/ but without #define MICROPY_HW_LED_STATUS (&pin_P0_19) I need to use this pin. Can someone help me? I'm not familiar with github and I don't have the necessary tools for compilation, I have more projects where I would use such a clean board. Therefore, it would be very helpful to me if such a board was officially supported and had updated firmware.

The ADM_52840 is a Breakout board to test an NRF52840 module from HolyIOT. Nothing very difficult, apart from the soldering part which requires a stencil in order to solder all the pads of the module. However, since internal pads are routed using vias, it’s possible to solder them all with a good...

tiny peak
manic glacierBOT
manic glacierBOT
#

Hi Dan

$ tio /dev/ttyACM0
Adafruit CircuitPython 10.0.3 on 2025-10-17; PCA10059 nRF52840 Dongle with nRF52840
>>> x
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'x' isn't defined

The crash has gone! And my problem is solved so far. Thank you very much!

Do you want me to investigate why the nrf52840 crashes (sniff at the UART traffic)?

manic glacierBOT
tardy plume
# tardy plume I need help. I need to create a variant of a new board for circuitpython. It cou...

So I tried, after many experiments, I managed to compile the code without that line, but it doesn't work. When I run my code, the board resets and I get the error
and the version from the circuitpython website doesn't work either

PROBLEM IN THONNY'S BACK-END: Exception while handling 'run' (ConnectionError: EOF).
See Thonny's backend.log for more info.
You may need to press "Stop/Restart" or hard-reset your CircuitPython device and try again.

Process ended with exit code 1.
─️
Unable to connect to COM40: port not found
Process ended with exit code 1.
─️
| 10.1.0-beta.1-1-gf15d4b2554-dirty \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/adafruit/circuitpython/issues.
Press reset to exit safe mode.

manic glacierBOT
#

Fix

This PR allows NVM to be bigger than 8kBytes.

Bug

Assume mpconfigboard.h specifies: #define CIRCUITPY_INTERNAL_NVM_SIZE (136*1024).

But len(microcontroller.nvm) will return 8192 as the uint16_t wraps.

# Wrap uint16_t (wrong)
>>> (136*1024)%(2**16)
8192
# No wrap uin32_t (correct, this PR)
>>> (136*1024)%(2**32)
139264

With this PR applied, len(microcontroller.nvm) will return 139264 which is, as expected, 136*1024.

Test

I te...