The improved "issue9705" test would have detected this regression.
#circuitpython-dev
1 messages Ā· Page 83 of 1
Fixed signed-ness bug in State_Machine.c:use_existing_program() where state_machine was unsigned but tested for less than 0. This was causing wrap-around indexing and other incorrect behavior resulting in a hang-up.
Fixed processor-dependent includes that would cause RP2350 builds not to use third PIO.
Fixed hard-crash when de-initing PIO state machine that did not completely init due to exhaustion of PIO state machines.
Fixes #10157.
Thanks for figuring this out!
unsigned i; return (i>=0) doesn't trigger any kind of warning? Oh, it needs -Wtype-limits, enabled by -Wextra, which we don't.
-Werror=type-limits]
244 | if (*sm_out >= 0) {
| ^~
```would have caught it. and there are more interesting diagnostics that stem from adding this flag.
[adafruit/circuitpython] New branch created: issue10175
This fixes an unlikely problem with the USB host implementation on rp2350 that would not have detected failure to allocate a DMA channel.
Together with #10186 this should give a clean build. As such, this PR includes the current version of #10168 changes. If that PR is rebased, this PR should be rebased as well. The change of interest is https://github.com/adafruit/circuitpython/commit/8097e3dde6645ff1ee63c588fa8949e61153aab5
this submodule has a harmless -Wtype-limits diagnostic that I didn't want to go through the trouble of fixing.
it wouldn't hurt to investigate whether this diagnostic can be enabled on other ports.
this submodule has a harmless -Wtype-limits diagnostic that I didn't want to go through the trouble of fixing.
However, WIZnet docs (arguably) show a preferred UART on GP0 and GP1 (peripheral 0),
I looked at that page and could not find something that marked that as preferred (or for the preferred I2C). What am I missing?
In the pinout diagram in the docs, GP0 and GP1 are in a bolder shade of purple than the other UART pins.
I think this is fine for now but a comprehensive fix (#10181) would probably be to add the correct -isystem or -I compiler flags so that the header can be included as hardware/platform_defs.h etc.
assert is fine here since this condition should be logically impossible. Failure to allocate the state machine should have been handled with a user-visible exception above.
If it's something that MIGHT happen and it doesn't just hose the whole microcontroller until reset, it's more usual to throw an exception instead.
[adafruit/circuitpython] New comment on issue #10181: RP2 Port Uses RP2040 Headers for RP2350 Builds
@jepler notes: ...a comprehensive fix (would probably be to add the correct -isystem or -I compiler flags so that the header can be included as hardware/platform_defs.h etc.
Agree completely.
Added note to #10181. Great suggestion!
Only affects DEBUG=1 builds, so no harm. I'll remove it the next time I touch this module.
I am a little reluctant to make default UART, I2C, etc., if there is little to no documentation for that. We didn't do that on the Pi Pico, for instance, though there are defaults (more than one set!). @fasteddy516, how did you decide on those defaults?
I just copied the existing W5100S-EVB-Pico2 then compared with the existing W5500-EVB-Pico. I pulled the MP_QSTR_SDA and MP_QSTR_SCL lines from Commit 40cc500 which maps SDA and SCL to GPIO26 and GPIO27. The GPIO layout for the two boards is identical, so it made sense to keep them the same. I missed the fact that the W5100S-EVB-Pico2 mpconfigboard.h had #define CIRCUITPY_BOARD_I2C_PIN set to GPIO4 and GPIO5. (I also have no idea how the CIRCUITPY_BOARD_I2C defines relate to/dif...
This lets each MCU type get the correct definitions. It also simplifies paths at include sites.
Closes: #10181
@onyx hinge You've ninja'ed me in the best way possible. Thank you for #10188!
It didn't cross my mind to check whether you'd started on it.
Absolutely no problem at all.
It seems that the lists at https://circuitpython.org/contributing did not get generated or included in the page properly, all of them are blank. I don't see any failed actions runs that jump out as responsible though.
I may have done the same thing with the W5100S-EVB-Pico2 since the W5100s and W5500 EVB Pico boards were the only WIZnet definitions at the time.
I misspoke above, I may have been looking at the PR and not the current code. The original Pico1 Wiznet boards do now have all three Singletons defined in pins.c. The UART and SPI pins are called out in mpconfigboard.h, but there are no pin aliases for UART pins GP0 and GP1..
Maybe we decide what's right for this board, then decide how muc...
CIRCUITPY_PYSTACK_SIZE is currently 1536 for all boards except one specialized board. We have seen "pystack exhausted errors on PyPortal projects with this size, such as https://forums.adafruit.com/viewtopic.php?t=217498. I was able to get that NASA image project working by increasing PYSTACK to 2048. Other threads in the forums have increased it to 4k or greater, though they may have not tried to determine the minimum size.
Currently CIRCUITPY_PYSTACK_SIZE can be set in settings.toml,...
I ran a debug build to try to catch the safe mode that will happen sometimes when running a httpserver, but instead it was freezing with this:
that's not much though 𤷠maybe because it's "corrupted"
0x420152e9: range_subscr at ports/espressif/../../py/objrange.c:182
(inlined by) range_subscr at ports/espressif/../../py/objrange.c:162
no, unfortunately. maybe the use of range() could found. It may be being passed a bad object
while entering a weird bug in the micropython issue tracker, I notice their bug form makes you answer "Code of Conduct" with "Yes, I agree". https://github.com/micropython/micropython/issues/17016
If we ignore the existing boards and approach this one fresh, it's a Raspberry Pi Pico 2 (The board pinouts/GPIO/peripheral assignments are identical) with a W5500 ethernet chip hardwired to GP16-GP21. I would suggest:
-
Start with the standard pin config from the existing Pico 2 board.
-
Add the six pin aliases associated with the hardwired W5500 - currently
MOSI,MISO,SCK,W5500_CS,W5500_RSTandW5500_INT. I used these names to match the existing WIZnet boards, but w...
PR #10185 fixes it for me. Tested with a Pico2-W and PCM5102.
Thanks!
How do I go about correcting a pinout pdf?
Was thinking about this some more - maybe 'W5K_' instead of 'ETH_'. That at least keeps them hardware family-specific and helps relate them to the 'adafruit_wiznet5K' driver. Could even update the driver to recognize and auto-assign appropriately named 'W5K' pins if they exist in 'board'.
The latest version of the animation is pushed to https://github.com/FoamyGuy/Adafruit_CircuitPython_FruitJam_Animation
This version uses new sprites with a reduced color palette which has lowered the overall RAM usage. This does seem to have had a positive impact, but hasn't resolved it entirely.
With this version the behavior I see now is: With the animation saved as code.py, the device boots up and runs the animation with the slow / choppy graphics for about 1 minute, and then the next l...
Where is the one in need of correction? for the "pretty pins" document there is typically an SVG source file
thanks for testing @bablokb !
@danh I'm having some difficulties getting a serial console on the debug uart pins of a Metro ESP32-S3. I've soldered headers to DEBUG_RX/TX, connected them to a Pico running debugprobe (just to get the serial port), built with a modified mpconfigboard.h with these lines added:
#define CIRCUITPY_CONSOLE_UART_RX &pin_GPIO44
#define CIRCUITPY_CONSOLE_UART_TX &pin_GPIO43
put the whole thing together with an Adafruit plastic mounting plate #275, and nothing out on uart ā¹ļø
It's for the ESP32-S3 Feather, the GPIO pin numbers are incorrect. I've found the PDF, but can't locate the SVG.
The two places that I know of to look for them are: The PCB repo i.e. https://github.com/adafruit/Adafruit-Feather-ESP32-S3-PCB/ and the "resources" page on the learn guide, which is typically hidden for most users, I'm not sure if you have access to it. There doesn't appear to be an SVG in either place for the Feather S3 though. I'll ask around a bit further to see if it's around anywhere.
@mortal kernel which GPIO pin number is incorrect? If we can't get the SVG source file, I'm imagining the next best option at this point is to modify the biggest raster image and then use that as the new one.
Also is this the pinout that you are meaning?
Are you trying to get ESP_LOGI() printouts, etc.? They should be directed to the Metro Debug header automatically. I haven't had to define the pins to get that to happen.
from the schematic:
I usually use a USB-serial adapter on this, and just connect the TX pin (don't forget ground too)
happens with DEBUG=1 builds
Let me double-check them all and I'll get back to you.
the TX pin is the one closer to the center of the board
Ah ha! I got the pins reversed. It's my morning for pin confusion. š
the pin assignment should happen automatically via CONFIG_CONSOLE_UART_DEFAULT et al in sdkconfig when a debug build is enabled
i'm doing a debug metro s3 build to check the settings...
I've got both my console and IDF debug output with the mpconfigboard.h changes. Very useful to have both. And right there is the answer to #10004, double memory release.
I write TX and RX on the metal case of the module š
BTW, those mounting plates you suggested are THE BOMB.
yes, very convenient for wiring, since the arduino-shaped boards are not breadboardable
A Pico with debugprobe installed makes a fine serial adapter, too.
that i didn't know. I got https://www.adafruit.com/product/70 long ago
lots of variations on that
common_hal_pulseio_pulseout_deinit() lacks a guard against calls where the pulseio_pulseout_obj_t is already deinit'ed. With that fixed, there's a repeating:
E (518334) rmt: rmt_tx_wait_all_done(595): flush timeout
I (518340) gpio: GPIO[46]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (518448) gpio: GPIO[46]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
E (518448) rmt: rmt_tx_wait_all_done(595): flush timeout
I (518452) gpio: GPIO...
The repeating flush timeout message is unrelated to pulseio. It is due to common_hal_neopixel_write() driving the on-board neopixel.
Add guards to common_hal_pulseio_pulsein_deinit() and common_hal_pusleio_pusleout_deinit() to prevent double release of the pulseio_pulse(in|out) object's resources.
Fixed same issue in pulseout.
Resolves #10004.
@tulip sleet need anything from me?
I thought we'd finish the bug triage on the 9.x.x milestone, but doesn't have to be today. I have been doing a little of that myself.
I don't think this is a core issue. Instead, we could add an example that shows how to read the scroll wheel. So, moving to support.
I can do a final review if @relic-se is happy with it. I'd do this on main. My intention is to start getting 10.x betas out soon.
I'd rather change this in 10.x since it will reduce the heap size. (Plus I want us to focus on 10.x)
In that case I will add instructions to various PyPortal projects to increase the pystack.
"Long term" means it isn't a priority for Adafruit-funded. Others are welcome to fix it and we'll review.
You can build CircuitPython with DEBUG=1 on the S3 to output the ESP-IDF logs to the UART. That's where I start usually.
It looks like boards with built-in displays don't like pointer references to the display structures, I was unsuccessful getting a pointer/array combination of variables to work so I think I'll either have to look at the way the boards with builtin displays are accessing the structures or consider leaving the compile time portion of the array in place and just access the dynamically allocated array elements for display indexes > (compile time)CIRCUITPY_DISPLAY_LIMIT.
Fun for another n...
We may want to make this smarter in the future to scale the output values depending on the pixel shader. uint32_t for CC. uint8_t for small palettes and uint16_t for larger ones.
I suspect this is because the table of attributes for board is in ROM IIRC. That means it can't be updated on the fly. I'm not sure what a better approach is.
I ended up dynamically allocating memory for any displays beyond those defined with the compile time parameter and then used some c macros to select either the compile time or dynamic storage based on the display index.
I'm thinking it probably wouldn't be too difficult to move from this version to one that simply allocated the...
Does the Waveshare S3 Geek share the SPI bus between the display and SD card?
Does the Waveshare S3 Geek share the SPI bus between the display and SD card?
It looks like two separate SPI busses...
PR #10158 seems to work on the configuration I've been testing. I plan to test more configurations but after several long nights I needed to step back for a couple days. If anyone is anxious to help out and test the artifacts, that would be great :grin:
https://circuitpython.org/contributing contains blank reports again today.
I think it might be an action on the circuitpython-org repo that updates the live page at circuitpython.org/contributing, but I do think it uses the adabot tool to generate it.
@onyx hinge Maybe the changes I made to PSRAM init in my timing tests will get it working overclocked to 264 MHz.
yeah, not sure which
do you have a link for that?
(I was running 240 MHz, but 264 MHz would still be in range without having to adjust the PSRAM timings again)
Line 100-128 set the burst wrapping and 155-162 adjust the timing. Otherwise, it's Scott's original code.
[...] If anyone is anxious to help out and test the artifacts, that would be great š
This is very cool! I will try some tests on RP2040/RP2350 this afternoon. Thanks!
@onyx hinge The critical setting is MIN_DESELECT. It needs to work out to be > 50ns to allow time for PSRAM refresh between block bursts.
#ifndef RP2350_PSRAM_MIN_DESELECT_FS
#define RP2350_PSRAM_MIN_DESELECT_FS (50000000)
#endif
```I think it's trying to obey that requirement in the code I have
lost my dev environment, and all my notes....so rebuilding on a new box with the goal of getting back to contributing. Are the guides still up to date as far as pylint, black, pre-commit? I'll be using pycharm community so are there any gotcha's to consider in rebuilding? I hear we moved from black to ruff? Thanks in advance - and I'm open to any devs that have helpful suggestions regarding their own dev environments......
@edgy flax https://learn.adafruit.com/building-circuitpython is where I would start, though the instructions tend to become out of date so don't hesitate to ask further questions or drop feedback on the guide pages.
Update TinyUSB and then retest.
Try again after updating ESP-IDF to v5.4.
Retest now that mDNS has been improved.
Raise an exception to note the limitation.
Beware, I just hooked up an I2C display and it's having issues š¦
Espressif: Update to ESP-IDF v5.4
Generated an ELF map for the waveshare_esp32_s3_eth at the documented commit hash with DEBUG=1. In all 3 cases, watchdog is firing on one of the CPUs while the other is looping in a non-code area of flash. Ignoring the top backtrace frame (which is garbage), and manually reconstructing, looping CPU is going into the weeds in either gc_alloc or gc_realloc called from socketpool_socket_recv_into() called from socketpool_socket_accept().
Likely same bug as #9003.
This could be a memory exhaustion issue. In common_hal_socketpool_socket() mp_obj_malloc_with_finaliser() is called to allocate a new socketpool_socket_obj_t, but the return is not tested for NULL.
@dhalbert I tried CircuitPython 9.2.6 (uploaded the .bin file to a Feather v2 through Web ESPTool). Would that include TinyUSB or should I be installing it differently on this board?
The Feather v2 + Max3241 was not able to detect my microSD card.
Adafruit CircuitPython 9.2.6 on 2025-03-23; Adafruit Feather ESP32 V2 with ESP32
Finding devices:
Finding devices:
Finding devices:
Finding devices:
I tried testing with an I2C display (BUSDISPLAY) and a DVI display (FRAMEBUFFERIO). It seemed like the I2C display output was usually getting lost when the DVI was primary, I could get the I2C to display if I did a displayio.release_displays() and then ctrl-D.
The most recent commit attempts to do a better job of determining if one of the display structure elements is being used by an active display although I don't understand the mechanism that sets the object type element so there's pro...
Also tried a Feather ESP32-S2 TFT + MaX3241 with current bootloader 0.21.0 and CircuitPython 9.2.6. It doesn't print finding devices, but the code executes.
Adafruit CircuitPython 9.2.6 on 2025-03-23; Adafruit Feather ESP32-S2 Reverse TFT with ESP32S2
>>>
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
I seem to recall there being something about some kind of extra "plumping" needed in the core for classes to be extendable and get all of the functionality of the parent. I've found this case where I am seeing that a subclass seems to have access to a function but gets the wrong / different result of the base class calling the same function with all other things being equal:
from displayio import TileGrid, Bitmap, Palette
palette = Palette(1)
palette[0] = 0x0
bmp = Bitmap(100, 100, 1)
tg = TileGrid(bitmap=bmp, pixel_shader=palette, tile_width=100, tile_height=100)
print(tg.contains((50, 50, 0)))
class SpecialTileGrid(TileGrid):
def __init__(self, **kwargs):
super().__init__(**kwargs)
special_tile_grid = SpecialTileGrid(bitmap=bmp, pixel_shader=palette, tile_width=100, tile_height=100)
print(special_tile_grid.contains((50, 50, 0)))
# outputs:
# True
# False
Does this indicate that something else needs to be hooked up for contains() to work properly or the same as it does for the base class?
I found it a little hard to find information on that, but I managed to request the "report protocol" from the mouse. Based on the code from the Feather USB Host guide I added the following. You could use wValue=0 to set to boot protocol I believe.
REQDIR_HOSTTODEVICE = 0
REQTYPE_CLASS = 1 << 5
REQREC_INTERFACE = 1 << 0
HID_REQ_SetProtocol = 0x0B
bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_C...
Well.... After banging at the code for a bit I decided to test the I2C display I'm using with the current version (no PR) of CircuitPython and it behaves in almost the same way as the PR so the odd behavior seems to be a quirk of the I2C display or my soldering. I'm using a featherwing doubler with a Feather RP2350 & a FeatherWing OLED.
So now I'm thinking the last commit should be dropped although I don't think it's doing any harm so I'll leave it for now.
I was able to get a Feather RP2350 displaying on a DVI display, an I2C display and an SPI display using CIRCUITPY_DISPLAY_LIMIT=3 in settings.toml.
Tomorrow I'll try setting up multiple displays on an Espressif micro controller .
During my testing I've noticed pressing ctrl-D without performing a displayio.release_displays() seems to cause a Safemode Crash which I need to track down (possibly related to #10084)
thanks for that. I'm rebuilding an environment for circuitpython, not one to compile circuitpython. Sorry for not being clear.
also curiously, https://circuitpython.org/contributing/open-issues lists no open issues. that was a surprise, if it's true.....
@mikeysklar Sorry for the cryptic comment about updating TinyUSB. This was part of an issue triage. We mean that we need to try updating the TinyUSB source code, which has some bug fixes, and then re-test.
Unfortunately there is a bug or some other issue causing those pages not to get generated properly the last few days. It's on my list to dig further into today.
Maybe you are remembering that there are routines added to that include "native" in their name in various places in, say, displayio. Look for that word.
Oooh, that does seem like a good possibility
inside TileGrid shared bindings most properties use displayio_tilegrid_t *self = native_tilegrid(self_in); but contains() is different and doesn't use native
Yep, that was it. Thank you!
for some reason, not using native_tilegrid() was causing the values for self->tile_width and self->tile_height in core code in shared-bindings not to get proper values. Which then made the contains conditions change.
I am now able to test with the recomended #define CIRCUITPY_PSRAM_CHIP_SELECT (&pin_GPIO47) commented out to disable PSRAM with the newer sprites that are smaller than the previous ones. I confirmed with this that it worked:
>>> import gc
>>> gc.mem_free()
138448
I do still see the slower rendering for the first minute or so after a boot up with this build so I think perhaps this rules out the issue being related to storing assets in PSRAM.
@EmergReanimator Thank you for your patience and persistence. I've updated the
.tomlPR, but as I noted there the update does not change thejinja-generatedgenhdr/devices.h.I suspect there's a deeper problem in
atmel-samd-specific flash support code. I will pick this up again later in the week when my hardware order arrives.
// Wait until both the write enable and write in progress bits have cleared.
Why the flash is ready when the WE...
That code bothered me, too. Are you running with this as the only change? Does the CIRCUITPY device mount with a size < 8MB?
If I add time.sleep(60) before the main loop then the first time the animation runs it renders smoothly. I'm not sure what if anything that means, but I had the idea to try it.
Why the flash is ready when the WEL is cleared?
The code is intended to be generic for all of the flash devices CP supports. I suspect it's there for one or more of the other 600+ boards we support. I read it as handling a reset when the flash chip was busy with a lengthy programming operation.
Does the CIRCUITPY device mount with a size < 8MB?
8.4 MiB to be precise.
[11205.487427] usb 2-7.1.2: new full-speed USB device number 28 using xhci_hcd
[11205.573863] usb 2-7.1.2: New USB device found, idVendor=239a, idProduct=80b6, bcdDevice= 1.00
[11205.573873] usb 2-7.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[11205.573878] usb 2-7.1.2: Product: SAM E54 Xplained Pro
[11205.573881] usb 2-7.1.2: Manufacturer: Microchip
[11205.573885] usb 2-7.1.2: SerialNumber: 0A...
That code bothered me, too. Are you running with this as the only change?
That one too.
https://github.com/adafruit/nvm.toml/pull/20/commits/26148d1b00973f49a1d6a843f42f1aea5a43d846
Perfect. I'll PR a more general solution later that includes the nvm.toml update. If I'm not mistaken, you're unblocked for now.
I tried the artifact build on a PyPortal with a 4GB SD card in the slot.
With no code.py I can see some attempt to mount the SD card, but it does not complete. From /var/log/syslog:
2025-03-28T11:00:38.921872-04:00 cod kernel: sd 4:0:0:1: [sdc] 7744512 512-byte logical blocks: (3.97 GB/3.69 GiB)
2025-03-28T11:00:38.923918-04:00 cod kernel: sdc: detected capacity change from 0 to 7744512
But it never shows up in mount or df. This is on Ubuntu 24.04. sdb1 is CIRCUITPY.
...
Some more testing. The detected capacity change shown above is not typical. This is from a cold start, no code.py, PyPortal, with either a 4GB or a 64MB card in the SD slot:
2025-03-28T11:36:40.581905-04:00 cod kernel: scsi 4:0:0:0: Direct-Access Adafruit PyPortal 1.0 PQ: 0 ANSI: 2
2025-03-28T11:36:40.581939-04:00 cod kernel: scsi 4:0:0:1: Direct-Access Adafruit PyPortal 1.0 PQ: 0 ANSI: 2
2025-03-28T11:36:40.582861-04:00 cod kernel: sd 4:0:0:0: Attached scs...
I tested this with the EYESPI connector and a ili9341 instead of HDMI and I see the same behavior, 1 minute of slower choppy rendering, then smooth from that point onward until press reset button.
@gamblor21 It just occurred to me that mix hasn't been implemented within this effect. I think that needs to be added before considering a merge into main.
For this effect, I think the following mix graph is applicable (red=dry, blue=wet). Since you're already blending in the dry voice as the "1st" voice, a direct linear mix with sample_word (aka dry) should be all that is needed to achieve this (no additional mixdown required either).
![406611767-778a2132-a267-4d98-aaeb-d64628771c4...
This is possibly not a core issue at all, or is something related to time keeping if so I believe.
It seems in the first few test runs at least that using:
time.monotonic()
instead of
adafruit_ticks.ticks_ms() / 1000
In the animation code makes this issue go away.
The rest of the code was written using seconds units so it was dividing the ticks_ms() value from adafruit_ticks to get to seconds. Maybe the division slows it down for the first minute for some reason? Or maybe ...
What do you use ticks for ? Ticks should only be compared to each other with ticks_diff/ticks_less etc.
You shouldn't divide ticks, only a ticks difference computed with ticks_diff.
They start with a high value so that it wraps around to 0 at the 65th second.
It was used to compare to each other, but not with ticks_diff and ticks_less. For example:
get timestamp:
https://github.com/FoamyGuy/Adafruit_CircuitPython_FruitJam_Animation/blob/main/code.py#L148
use it to get elapsed time and progress:
https://github.com/FoamyGuy/Adafruit_CircuitPython_FruitJam_Animation/blob/6ff0ca103be5dde37df80325045901a25e2a213d/code.py#L162-L163
which then go on to control where stuff moves to, or when it other things will occur.
I tested several more times on HDMI with 9.2.6, main, and 9.2.x UF2s from the S3 page, and all have run well and rendered smoothly.
It sounds like I was just misusing ticks_ms(). It wrapping around at the 65th second meant that my mis-use was more problematic during that window of time than after it wrapped. time.monotonic() seems to work fine so I'll stick with that for now.
With some debug tracing added and using the test server from #9428, I'm seeing socketpool_socket_accept() getting invoked almost continuously, each time allocating another socketpool_socket_obj_t. This is due to polling from adafruit_httpserver/server.py at line 503. Although not an error, it's definitely putting memory management through its paces. I suspect it's related. Set up now to trap an allocation failure and running...
I'd still be curious if you think allocating the memory in the main.c program is appropriate š
Ya, it is fine.
Thanks for the testing! I'll get back to this next week.
Tested successfully on Fruit Jam with the Set card game that I am working on, as well as this more simple reproducer code:
from displayio import TileGrid, Bitmap, Palette
palette = Palette(1)
palette[0] = 0x0
bmp = Bitmap(100, 100, 1)
tg = TileGrid(bitmap=bmp, pixel_shader=palette, tile_width=100, tile_height=100)
print(tg.contains((50, 50, 0)))
class SpecialTileGrid(TileGrid):
def __init__(self, **kwargs):
super().__init__(**kwargs)
special_tile_grid = Spec...
- Fixes #10138
This removes the ability to use the old displayio bus bindings, and also removes CIRCUITPY_9_10_WARNINGS and the associated warnings.
@tannewt It was my understanding it's OK to remove these warnings now, because they were meant to be present in 9.x.x (though we messed up on that a bit). If this is wrong, I can restore them.
There are no more uses of the old bindings in the library bundle.
Tested on a PyPortal Titano with the NASA image project.
Yup! We just want the warnings in 9.x.
Tomorrow I'll try setting up multiple displays on an Espressif micro controller .
I've been keeping an eye on this thread and your PR for the past few weeks. Thanks so much for your efforts! I've dug out the old T-Keyboard-S3, so if you're looking for some more Espressif testing, let me know.
Can reproduce, but did not trap on NULL allocation. I'm starting to suspect that this issue, plus #9003, #9428, #9460, and #9173 are all the same memory management bug masquerading as a networking issue.
Looks great! Tested locally and the code looks great. Thanks for simplifying some of the CSS.
Bumps json from 2.10.1 to 2.10.2.
Release notes
Sourced from json's releases.
v2.10.2
What's Changed
Fix a potential crash in the C extension parser.
Raise a ParserError on all incomplete unicode escape sequence. This was the behavior until 2.10.0 unadvertently changed it.
Ensure document snippets that are included in parser errors don't include truncated multibyte characters.
Ensure parser error snippets are valid UTF-8.
Fix JSON::GeneratorError#detailed_me...
#9173 is the only one that does not use httpserver / accept.
Occurred to me that the observation I made about blocking versus non-blocking may just be a matter of time. Non-blocking hammers on the accept call, but blocking may eventually crash too though in orders of magnitude more time.
mp_hal_delay_ms() starts out by calculating end_tick by converting port_get_raw_ticks() to ms, but adjusts remaining ticks using port_get_raw_ticks() without conversion.
https://github.com/adafruit/circuitpython/issues/9173 is the only one that does not use httpserver / accept.
Right. #9173 could be a different issue.
Update from 550 to 600 microcontrollers.
Many microcontrollers are on multiple boards.
@relic-se I started to work on this, but I'm unfamiliar with the code. Re the struct biquad_filter_state and the associated routines in synthio/Biquad.h: should these be moved to BlockBiquad, or are they completely unnecessary? The are used in audiofilters/Filter.c, synthio/Note.c etc.
Also, is the AnyBiquad type now unneeded? Are they going to be a BlockBiquad? Should we consider renaming BlockBiquad to just Biquad, deprecating BlockBiquad, and removing the old name in CPy...
Perfect. I'll PR a more general solution later that includes the
nvm.tomlupdate. If I'm not mistaken, you're unblocked for now.
Yes, you can say so. @eightycc Thanks for you eager support!
Just for your information:
I am maintaining NXP port of the CPY. It was a while since NXP-fork was synchronised with upstream - CPY V8.0;
I was going to updated NXP port fork to 9.x; But first I tried the same54_xplained board before adding NXP port to 9.x.
3. Leave out the default UART and SPI definitions - as @dhalbert pointed out, they're not defined for the Pico 2, which this board is based on.
I agree with this and the other points. Could you make those changes and regularize the other related boards if needed? Thanks. Also I like the W5K_ prefix.
@eightycc I was going to do this and then saw you already did! It just needs a merge conflict fixed.
I would also like to get the Module Support Matrix to include an annotation that describes which _bleio is actually supported. This PR will make that easier: we can add entries to ADDITIONAL_MODULES in docs/shared_bindings_matrix.py like:
"_bleio (native)": "CIRCUITPY_BLEIO_NATIVE",
"_bleio (HCI co-processor)": "CIRCUITPY_BLEIO_HCI",
I also had another thoug...
This is ready for review @tulip sleet. Should be quick
Like Barliman Butterbur in LOTR, I completely forgot about this one. One thing drives out another! I'll pick it up again, if you'd like.
I had some time to try this today. My results:
- CIRCUITPY_DISPLAY_LIMIT=2 works great
- CIRCUITPY_DISPLAY_LIMIT=3 works but Ctrl-C-ing and restarting a program results in a
ValueError: GP17 in use, as if I wasn't callingdisplayio.release_displays()(Perhaps it's only releasing N-1 displays?) - CIRCUITPY_DISPLAY_LIMIT=4 works but the system seems very slow now. Display updates are slow, REPL is slow, USB negotiation is slow
- With 3 or more displays, CircuitPython would occasionally cra...
For sure, I'll make those changes. I can regularize the other related boards in a separate pull request unless you prefer it all in one.
I can regularize the other related boards in a separate pull request unless you prefer it all in one.
Either way is fine.
but adjusts remaining ticks using
port_get_raw_ticks()without conversion.
Does this mean it's literally losing track of time?
(fwiw: Revisiting this thread led me to imagine potential build flags for fuzzy logic. I'm too new to the project to know, but I have to think it's been discussed somewhere)
I'll need to do some more digging, but I am definitely in favor of renaming BlockBiquad to Biquad. And you are correct on AnyBiquad which is just an amalgamation of the old and new classes.
I'd be happy to work on the PR here! I'll see if I can get something drafted this weekend.
I've been keeping an eye on this thread and your PR for the past few weeks. Thanks so much for your efforts! I've dug out the old T-Keyboard-S3, so if you're looking for some more Espressif testing, let me know.
I was thinking that I would follow this PR up with a settings.toml parameter that allowed the sharing of DC/RST pins, something like CIRCUITPY_FOURWIRE_SHAREPINS. But since that's not available yet, If...
Should be good to go for this board now. It's effectively the same as a Pico 2, but with the added W5K_ pin aliases. Built for and tested on a W5500-EVB-Pico2 board with code that utilizes the WIZnet ethernet chip and all runs fine.
Thanks! - one thing re default and STEMMA I2C
[adafruit/circuitpython] New review comment on pull request #10179: Add WIZnet W5500-EVB-Pico2 board
I don't see default I2C pins marked on the board.
Looking at https://docs.wiznet.io/Product/iEthernet/W5500/w5500-evb-pico2.
[adafruit/circuitpython] New review comment on pull request #10179: Add WIZnet W5500-EVB-Pico2 board
I don't see a STEMMA/QT connector.
One more thing: it looks like some changes in pins.c caused there to be lines containing only spaces. That was caught by pre-commit. See the failed pre-commit job above.
I was thinking that I would follow this PR up with a settings.toml parameter that allowed the sharing of DC/RST pins, something like CIRCUITPY_FOURWIRE_SHAREPINS.
This is another one I need to follow-up on. I vaguely recall that there were some FourWire changes since I last tested.
Edit: Oh wait, the T-Keyboard-S3 doesn't have an official CP build yet....
That was something I was working on initially, but chose not to merge in the board definitions until we could get the all of the dis...
Adding a reverb effect for audio effects. This is still draft.
- This may not be the final location for the effect (
audiodelays) - Mix is not in its final form was just there to test
- There is almost no testing done so far.
[adafruit/circuitpython] New review comment on pull request #10179: Add WIZnet W5500-EVB-Pico2 board
That was part of "1. Start with the standard pin config from the existing Pico 2 board". It's part of the Pico 2 (ports/raspberrypi/boards/raspberry_pi_pico2) definition, as is the STEMMA line in pins.c.
It seemed a bit odd, but I was trying to treat this like the Raspberry Pi Pico 2 as much as possible.
[adafruit/circuitpython] New review comment on pull request #10179: Add WIZnet W5500-EVB-Pico2 board
OK, I guess the STEMMA pins must be from https://www.adafruit.com/product/5967 and similar
[adafruit/circuitpython] New review comment on pull request #10179: Add WIZnet W5500-EVB-Pico2 board
The reason we didn't do defaults is because, at least for Pico, MicroPython and the SDK sometimes differed on defaults. See https://github.com/adafruit/circuitpython/issues/4121 and https://github.com/adafruit/circuitpython/issues/5041. But now that they have designated pins in the pinout diagram, maybe we should reconsider. It would still be better if they put it on the silk. We've tended to say it needs to be on the silk or on a specific connector.
I'll merge this for now, thanks!, and w...
I had to use the hack from @rgrizzell to allow sharing of the DC pins but here is 6 displays off an ESP32-S3 Feather :grin:
Simple CircuitPython timer:
:grin:
Hey, thanks for adding AUDIOIO to the Espressif port :)
Was there a reason this was only added by default for ESP32 and ESP32S2 and no ESP32S3?
Shouldn't it be available to all Espressif MCUs?
The ESP32-S3 doesn't have a DAC ā¹ļø
The ESP32-S3 doesn't have a DAC ā¹ļø
So AUDIOIO doesn't also handle PWM output via the same library? I thought it did.
Only option for the S3 is PWM output for analog beeps and boops, or audiobusio for I2S ?
audiopwmio is still to be implemented.
audiopwmiois still to be implemented.
Ok, good to know, thanks for the prompt replies Dan :)
mp_hal_delay_ms()starts out by calculatingend_tickby convertingport_get_raw_ticks()to ms, but adjusts remaining ticks usingport_get_raw_ticks()without conversion.
I only see the delay being converted from ms to ticks. The rest is all done in ticks.
https://github.com/adafruit/circuitpython/blob/25216c88c7083fba1162946e4a5c1271f4bf5714/supervisor/shared/tick.c#L102
The issue is not with floats, it's because the actual sleep time is in milliseconds, and there's 1024 ticks i...
CircuitPython version and board name
Adafruit CircuitPython 9.2.6 on 2025-03-23; Adafruit Feather ESP32S2 with ESP32S2
Specifically ESP32S2 w/ BME280 sensor and 2.13" HD Tri-Color eInk display attached. However, these devices are not interacted with when triggering the fault
Code/REPL
#!/usr/bin/env python3
import wifi
import mdns
import alarm
import time
import os
ssid = os.getenv("WIFI_SSID")
password = os.getenv("WIFI_PASSWORD")
wifi.radio.connect(ss...
I believe the ctrl-D safemode crash has been resolved thanks to a planning comment by tannewt :grin:
I left the shared SPI pin hack in this version to help with testing but will pull them out before the final version.
I haven't been able to get set_primary_display (supervisor.runtime.display=display) to work yet and I suspect the logic for setting/determining the "primary_display_number" isn't working either. But that's another nights problem....
The contributing pages on circuitpython.org are fixed now and contain their links out to Github.
Ohai, anyone know what is up with this error I'm getting in my local circuitpython fork ?
I am not working at all in that folder, never modified it, and there are no actual changes to be staged.
I tried discarding the changes, deleting the folder completely and rebasing, nothing works, this message keeps coming back.
if go into it and git status, does it list something ?
ok that doesn't ring a bell, what's the diff ? could it be a permission issue ?
there are a whole bunch of changes in diff
if I git submodule update from an empty sdk directory I get f6c93ee too with no changes (I usually leave the submodule directories empty for ports I don't build for)
I left the shared SPI pin (actually only the DC pin) hack in this version to help with testing but will pull them out before the final version. If anyone needs to share the RST pin to test, let me know....
DC and RST pins are shared across the 4 displays on the T-Keyboard-S3. The stock firmware that ships with it configures the `T...
I'm not sure if leaving the hack will cause regressions elsewhere in CircuitPython, but I would like to have that included in this PR.
I believe Scott was worried that allowing the pins to be shared would not let people know if they chose pins being used for other functions. If/when this PR gets merged, I plan to submit a second one that would enable the sharing of the pins by setting a second settings.toml parameter. That way the user protection Scott was looking for would be in place b...
I think this is mostly working except for the "Set Primary Display" (supervisor.runtime.display=display) but either I misunderstand what that function does or it's also not working on current builds for anything but dvi displays. In 9.2.x or my artifacts, If I try to set the primary display manually the display is not identified as active and the following somewhat misleading message is displayed
TypeError: Display must be of type AnyDisplay or None, not ILI9341
Based on my reading o...
CIRCUITPY_DISPLAY_LIMIT=3 works but Ctrl-C-ing and restarting a program results in a
ValueError: GP17 in use, as if I wasn't callingdisplayio.release_displays()(Perhaps it's only releasing N-1 displays?)
I haven't seen this in my testing, I'll try and reproduce your setup and see if I can make it happen.
*Hopefully the hard faults you were seeing are fixed, I haven't seen any since my last commit.....
I believe Scott was worried that allowing the pins to be shared would not let people know if they chose pins being used for other functions.
For the user protection side of things, I agree with this so long as it doesn't limit board design.
There aren't many examples of multiple displays, and there's even fewer examples of shared DC and RST pins.
My guess is that while it works, it's sub-optimal. But... it might also be that creators haven't ported CircuitPython to their multi-disp...
- Added the rest of the board pin definitions from the pinout
- Did peripheral pins cleanup for the stm32H750 chip
- Added SDMMC peripheral and started work on sdioio module support
- CIRCUITPY_DISPLAY_LIMIT=3 works but Ctrl-C-ing and restarting a program results in a
ValueError: GP17 in use, as if I wasn't callingdisplayio.release_displays()(Perhaps it's only releasing N-1 displays?)
I haven't been able to reproduce this with three displays (all the I2C I have :grin:). I'm assuming you have the program in code.py and you are just pressing ctrl-D to restart after Ctrl-C-ing?
This regularizes the 3 existing WIZnet board definitions as requested by @dhalbert in PR #10179. Firmware for all boards builds successfully, and was tested on the corresponding board using this HTTP Server + Websocket script which utilizes the new W5K_ pin aliases. Please note the following:
- The RP2040-based boards have
#pragma oncedeclarations in both.hfiles. The RP2350 board does not. I ...
CircuitPython version and board name
Adafruit CircuitPython 9.2.6 on 2025-03-23; Raspberry Pi Pico 2 with rp2350a
Adafruit CircuitPython 9.2.6 on 2025-03-23; Raspberry Pi Pico with rp2040
Code/REPL
"""
filter Q over 1.41 causes glitches in the filter at certain frequency
"""
import time, board, synthio, audiobusio, audiomixer
SAMPLE_RATE = 44100
BUFFER_SIZE = 2048
i2s_bck_pin = board.GP20
i2s_lck_pin = board.GP21
i2s_dat_pin = board.GP22
audio = audiobusi...
- CIRCUITPY_DISPLAY_LIMIT=3 works but Ctrl-C-ing and restarting a program results in a
ValueError: GP17 in use, as if I wasn't callingdisplayio.release_displays()(Perhaps it's only releasing N-1 displays?)I haven't been able to reproduce this with three displays (all the I2C I have š). I'm assuming you have the program in code.py and you are just pressing ctrl-D to restart after Ctrl-C-ing?
Yes, I had it as code.py and was just Ctrl-C-ing then Ctrl-D-ing.
But I just trie...
@tulip sleet While playing around with pico-mac, I built a Pico SDK board header for Adafruit Metro RP2350. Is there a preferred process for sending these upstream?
I left WEL bit out and kept the BUSY polling and now it works correctly.
I have to revise my statement: the reading seems to work correctly.
Not able to store anything or modify the FAT filesystem in any way.
@mortal kernel https://github.com/raspberrypi/pico-sdk/pull/2363 dan's PR is in draft mode, I don't know the deets (but hopefully it's written there)
GitHub
Fixes Add Adafruit Fruit Jam boardĀ #2362.
Add Adafruit Fruit Jam "Mini RP2350 Computer" board. https://www.adafruit.com/product/6200. Description:
RP2350B dual 150MHz Cortex M33...
@danh I've gotten my head scrambled re: HSTX signal polarity in the pico sdk PR #2363. If you've got a FruitJam schematic handy, it's probably worth giving it look.
I checked the pins against the schematic, and also copied from the Metro, if I remember right, which itself was derived from the original HSTX Feather. And they work as currently assigned. So I think it's OK.
It's fine to submit a PR from us to upstream. Maybe first submit a PR to our fork, and then you or I can submit a PR upstream. That makes it clear it's coming from us.
@danh The adafruit/pico-sdk fork is slightly out of date. It's at 2.1.0, current is 2.1.1. CP uses upstream raspberrypi/pico-sdk at 2.1.1. I'm not sure how the Adafruit fork gets used.
@tulip sleet fwiw I am using your PR branch for pico-mac and haven't noticed any problems
we only use our fork when we have a required fix that's not in upstream yet. So go ahead and bring it up to date.
do you mean the draft PR in pico-sdk?
I will leave it draft until Limor has tested completely.
yes
- name: get pico-sdk
run: git clone --depth=1 -b adafruit-fruit-jam https://github.com/adafruit/pico-sdk ../pico-sdk
thanks - that makes me think it will be fine as is once we know it's really final. I was churning it too much in advance
CircuitPython version and board name
Circuit 9.2.6
Code/REPL
import board
import analogbufio
import array
length = 1000
mybuffer = array.array("H", [0x0000] * length)
rate = 500000
adcbuf = analogbufio.BufferedIn(board.A0, sample_rate=rate)
adcbuf.readinto(mybuffer)
adcbuf.deinit()
for i in range(length):
print(i, mybuffer[i])
Behavior
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Trace...
Thanks - I saw that forum post this morning and am working on a fix. It's due to not treating the RP2350B pins properly.
Random GitHub tidbit: when typing markdown to GitHub, you can use ctrl-E to wrap selected text in backticks. If nothing is selected, it will insert an empty pair of backticks you can type into.
-
Fixes #10201.
-
Fix
analogbufio.BufferedInpin validation on RP2350B. -
Use
pico-sdk-suppliedADC_BASE_PINinstead of figuring it the base pin ourselves. -
Disallow using
board.A3(GPIO29) on Pico W and Pico 2 W foranalogbufio.BufferedIn, and document that. GPIO29 pin has a voltage divider attached to monitor VSYS, and is also shared with SPI SCK connected to the radio module.AnalogInspecial-casesA3to make it available, but that was complicated, and I think the use c...
CircuitPython version and board name
Adafruit CircuitPython 9.2.6 on 2025-03-23; Raspberry Pi Pico 2 with rp2350a
Code/REPL
import time, board, audiobusio, synthio, audiofilters
audio = audiobusio.I2SOut(bit_clock=board.GP20, word_select=board.GP21, data=board.GP22)
synth = synthio.Synthesizer(channel_count=1, sample_rate=44100)
effect = audiofilters.Filter(buffer_size=1024, channel_count=1, sample_rate=44100, mix=1.0)
effect.filter = synth.low_pass_filter(...
This makes the LED properly blink green on script end and red on error (yellow and blue are unchanged).
May be of interest to @bwshockley who contributed the board.
Note that this does not impact user code at all, which still needs to use pixel_order:
pixel = neopixel.NeoPixel(board.NEOPIXEL, 1, pixel_order="RGB")
This also affects Pimoroni Pico Plus 2W. Not sure whether that's important to mention. Overall all it looks good as is.
Suggest using CYW43_DEFAULT_PIN_WL_CLOCK instead of hard-coded pin number.
[In #10156 I tried to fix some spurious reformatting of .py code in the mimxrt1011/sdk when pre-commit was run. It didn't actually work. This should fix that.
- Fix some strange indentation in
.pre-commit-config-yaml. - Remove some incorrect settings
- Format only C code using
tools/codeformat.py. Use the ruff pre-commit actions to format Python. - Make the
exclude:settings easier to read, and remove unneeded excludes.
Are the failing writes from code running within CP, or to the mounted MSC filesystem, or both? What is the behavior you're seeing when you try to write?
I noticed that the adafruit_cst8xx library doesn't a have a release, even though it has version tags and is in the Adafruit Bundle. https://github.com/Neradoc/Adafruit_CircuitPython_CST8XX
This also affects Pimoroni Pico Plus 2W. Not sure whether that's important to mention. Overall all it looks good as is.
Thanks - I didn't know that pin was defined. I've used it, and made the checking code depend on that definition better. Also I generalized the "Limitation:" note to cover more boards.
@lone axle see message above this is replying to
How does getting a PID and VID for custom RP2040 boards work? Since it uses CDC, wouldn't that come under RPI's 0x2E8A:0x000A address? I got everything working for my custom board and this is the last thing I need to PR it in!
Edit: the form has been filled and we are just waiting for a reply, but until then, what do we do?
Please add support for raw f-strings.
>>> import glob
Traceback (most recent call last):
File "", line 1, in
File "/lib/glob.py", line 319
SyntaxError: raw f-strings are not supported
It looks like MicroPython did this last year, and it didn't even make the code bigger. https://github.com/micropython/micropython/pull/15218
I'll try to apply this patch myself and see if it works, but I might be way out of my depth here.
Are the failing writes from code running within CP, or to the mounted MSC filesystem, or both? What is the behavior you're seeing when you try to write?
Sorry, forgot to note it in my previous comment.
There is still an issue in external flash code. It does not work well with SST26VF064B.
But do work correctly with N25Q256A.
I have my older SAME54 Xplained board with N25Q256A flash back. The filesystem works properly with the same binary on that board.
I see releases listed here https://github.com/adafruit/Adafruit_CircuitPython_CST8XX/releases they seem to look normal to me. Was there some issue installing it from the bundle or circup or anything?
oh I must have been looking at my fork at 3 AM when I should have been in bed š¤¦
sorry for the ping
No worries
If itās open source
If it isnāt open source, you can purchase a vendor ID from USB IF for like $5k
That renews annually
It will be open source in the future but not now, and we don't intend on mass manufacturing or selling it so 5k/yr is nonsensical
When itās open source, you can request a VID/PID from the above. You can often test locally with a dummy VID/PID
Is there an issue with using the 0x2e8a:0x000a address for the rp2040 cdc devices?
no, as long as you have the permission from the Raspberry Pi Foundation to use their VID
They do give out a limited number of PID if requested
Not sure the criteria for that
000A is like a generic "I'm using the SDK" PID ?
but if it's not unique vid/pid combination, you won't get the board definition merged in the circuitpython repository
yep Circuitpython requires unique VID/PID (although they can be shared between variants sometimes for simplicity)
Lolā¦
We did register for a PID in the list but while that application is being processed, can we not use 0x000A for circuit python
Alright, thanks for the info
It seems like there isn't a doc for todays meeting. I'm going to create and pin one.
Here is the notes document for today's CircuitPython Weekly Meeting. 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/1ivqAyDSbfqrDEdh5DtdmgPa8ZEVbA5e5PxGpttQjnyg/edit?usp=sharing
Google Docs
CircuitPython Weekly Meeting for March 31, 2025 Here is the notes document for next Mondayās CircuitPython Weekly Meeting. 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 a...
It might be nice if this page https://learn.adafruit.com/welcome-to-adafruit-io/circuitpython-and-adafruit-io has the settings.toml setup required for using adafruit.io.
I'm currently working on removing synthio.Biquad and replacing it with synthio.BlockBiquad in 10.x. I'm considering merging the biquad_filter_state struct in with the synthio_biquad struct for simpler management (and minimal flash savings), but doing so would make sharing a single Biquad object with multiple audiosample entities have unintended consequences because they'd be sharing the same filter state. Is that acceptable or should I continue managing those two objects separately?
I encountered build problems with the espressif port this morning. It looks like ESP-IDF's tools include overcomplicated fragile Python dependency check scripts. Is this related?
$ make -j6 BOARD=lilygo_tdeck
- Verbosity options: any combination of "steps commands rules", as `make V=...` or env var BUILD_VERBOSE
-- Building ESP-IDF components for target esp32s3
-- Checking Python dependencies...
The following Python requirements are not satisfied:
Requirement 'setuptools<71.0.1,>=21' was...
The split ortho keyboard picture on the new circuitpython.org is broken - should I file an issue in GitHub or is someone internal at Adafruit already aware do you think?
Do we have any places where we would reference two Biquad objects at the same time? I think if we document it there wouldn't be a problem. If we can detect a duel use (no clue if that is possible) that would be nice too. Does this basically mean 1 filter to one audio sample use?
I'm not super familiar with it but can try to deep dive into it more if you need, but I'd trust your judgement on it.
I think I might walk back on this. I could definitely see where you'd want to use a single Biquad for all of your synthio.Note objects. If the biquad_filter_state is attached to each note, there won't be any conflicts and the filter shouldn't have to recalculate for each object (I'll have to dive deeper into common_hal_synthio_biquad_tick to make sure that's the case).
@AbortRetryFail There are known python package version conflicts between CircuitPython and ESP-IDF. In a nutshell, you'll need to run esp-idf/install.sh a second time after you've pip'ed the CircuitPython dependencies. Here's my recipe for building Espressif: https://gist.github.com/eightycc/197a12ffb747e21aa72bdedb2cade818
<@&356864093652516868> The weekly meeting will occur here on discord at the usual time today 11am US Pacific / 2pm US Eastern. That is just under 2 hours from now. Add your notes and hug reports to the doc https://docs.google.com/document/d/1ivqAyDSbfqrDEdh5DtdmgPa8ZEVbA5e5PxGpttQjnyg/edit?usp=sharing We look forward to hearing from everyone.
Google Docs
CircuitPython Weekly Meeting for March 31, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you canāt make the meeting and would st...
@onyx hinge I would suggest that you add a comment to your Circuit Playground note about making a Random Number Generator, that any transistor that has been operated in base-emitter avalanche mode should not be used as a regular transistor afterwards. Operation in base-emitter avalanche causes the gain of the transistor to drop permanently, and it may no longer meet specifications. The circuit works as you describe, but the transistor in avalanche changes permanently. You can search the internet for something like "Current gain degradation induced by emitter-base avalanche breakdown in silicon transistors."
@lunar crown an interesting point I was unaware of.
I'm getting a 500 error trying to edit the note otherwise I'd be sure to add this info
@onyx hinge š
File an issue, thanks
I'd say let Brent know about that.
Mostly for the smallest of screen sizes. Fixes some image resolution issues as well.
I don't think it makes sense to factor all of this out. Instead, board_init could call sdram_init and just pass in the structs with the config. I'd only add stuff here that is applicable across boards and ports.
Thanks for continuing work on this! One bigish suggestion around the settings.
Based on my reading of the code, I'm assuming the "primary display" mechanism was meant to allow any of the possibly multiple displays to be designated as "primary" and survive VM restarts.
I don't think this has been fully implemented. My intent was to work on this next year probably. (Though who knows what will be a priority then.)
Thank you for reporting this.
This appears to be fixed naturally (rebuilds on code push), but I know the root cause and have pushed a potential fix. Caching issue on the Learn API, I believe.
Today we talked about this in the internal meeting. We want to start with one board (S3 feather w/4MB probably) to ensure we have the instructions correct for doing all of them.
Discover how to harness AI to program microcontrollers in this hands-on guide featuring the ESP32C6 and SSD1306 OLED display. This video walks you through the entire setup process, from installing CircuitPython to displaying the time and date on an OLED screen. Explore the features and capabilities of AI-powered coding as the host uses tools lik...
MIT OpenCourseWare
This subject is aimed at students with little to no programming experience. It aims to provide students with an understanding of the role computation can play in solving problems. It also aims to help students, regardless of their major, feel justifiably confident in their ability to write simple programs that allow them to accomplish useful goa...
Please subscribe for free
Have a great week, everyone! Thank you, Tim.
@lone axle don't forget to convert the raw markdown to formatted text in the notes: copy a section, and then paste over it with right-click "Paste as markdown". Then you can download the formatted it as markdown. No other fixups needed
explained in the third paragraph at the top
Thanks for the hug report @slender iron ! š
Still plenty of work to do on the Daisy, I enabled the audiopwmio module, and playing audio crash-resets the board ...
Fun times ahead, lol
I'm sure you'll figure it out
@slender iron for when you get into the editor stuff: Jeff forked a library that provides a subset of Curses, and the editor itself and got them both working under CircuitPython (originally made for CPython). The first paragraph on the overview page https://learn.adafruit.com/circuitpython-text-editor-on-the-go links to the prior work. The main thing that I added to it at the time was a visible cursor. But it's done in a "cheaty" way by having a Label containing a single character put on top of the rest of the editor. TilePaletteMapper should provide an easier way to make the cursor visible without the need for that extra layered object.
I'll definitely check in with you before I do any of this stuff. I also want to come up with a way to bundle multiple programs into one zip
so we can have a games collection
and an editor
and switcher
I've been really tempted to add support for the TPM to the default terminal
@slender iron Thinking we might make a 10.0.0-alpha.1 very soon, so we can get 10.0.0-something into circuitpython.org and then figure out the bootloader stuff, etc. I can merge from 9.2.x once more before I do that.
Not sure I would even announce this yet, but we could use a visible placeholder besides the alpha.0 tag
Hey, I'm a beginner and would love to work on this! Can you guide me?"
ok, I think it's fine to do this transition during the alpha phase
we can switch to beta once we settle down the partition scheme for all boards. Could do ESP-IDF v5.4 in alpha too.
speaking of partitions and 5.4, BLE is still broken on C3 right ?
in 5.3.2 yes
Here is the notes document for next Mondayās CircuitPython Weekly Meeting. 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/1YPAPoECwKzqUCmavSv04hAZjQAgRlVLxPIYjfHTctbE/edit?usp=sharing
Google Docs
CircuitPython Weekly Meeting for April 7, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you canāt make the meeting and would st...
Thank you for reporting this. Looks like a bug with the new design. I'll have a fix out for this shortly.
I had to tweak their patch a bit, but it builds and seems to work OK on my LILYGO T-Deck.
We periodically merge from upstream and will be including that change the next time, so if you submit a PR, try to make it as similar as possible, and let us know what you had to tweak
Well, I tried to attach the patch here but Github just says "failed to upload"
Doing it the hard way with the whole fork and PR song and dance.
I don't think this has been fully implemented.
Okay with that in mind I took another look at the code and I think the immediate issue is that the display type is not being set when a display structure element is allocated (Except in the case of a picodvi_autoconstruct). I could update the display_allocate module to set the field based on a passed in argument but that would touch a lot of files.
I'm thinking perhaps it would be better to merge this as is first and get the primary displ...
CircuitPython version and board name
Adafruit CircuitPython 9.2.6 on 2025-03-23; Adafruit Metro RP2350 with rp2350b
Code/REPL
import audiobusio
import audiocore
import board
import adafruit_tlv320
i2c = board.I2C()
dac = adafruit_tlv320.TLV320DAC3100(i2c)
dac.configure_clocks(sample_rate=44100, bit_depth=16)
dac.speaker_output = True
dac.speaker_volume = -10 # dB
audio = audiobusio.I2SOut(board.D9, board.D10, board.D11)
with open("StreetChicken.wav", "rb") ...
taking out the wiring finally let it get out of safe mode, closing..
@RetiredWizard I think your crash may be due to sdioio. I don't think it is designed for native use. I'm adding checks to prevent it from showing over USB MSC.
I'm testing with automounted sdcardio which is allocated outside the VM and has a native API to use from USB MSC.
I donāt remember, but I think not. Was I supposed to? Out on a walk. Iāll get back to you.
I suspect the pyportal library was doing it for you
np, i'm around for two more hours
Yeah, maybe so. I was using the NASA image program.
If I don't run any program at all, then I see the second drive show up in /var/log/syslog as /dev/sdc, but nothing is mounted, which makes sense because it wasn't mounted manually, right?
@slender iron this hangs after the second or third print(), with the pyportal artifact from the PR:
import board
import busio
import sdcardio
import storage
import time
spi = board.SPI()
cs = board.SD_CS
sdcard = sdcardio.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
while True:
print(time.time())
time.sleep(1)
and eventually disconnects
the output on the display is essentially the same
@tulip sleet I'm not going to make it work on pyportal
Due to health concerns, I regret to inform you that I must step down from my role as the current pt_BR translator for CircuitPython.
I want to sincerely thank you for the opportunity to contribute to this wonderful project.
Wishing the team continued success with CircuitPython!
well, this is so simple it should work on the pyportal too.
I tried with a sd card that works on rp2 and it doesn't on pyportal
I'm doing this for rp2 first and foremost
we can always expand it later
@wtuemura I am sorry to hear that, and hope your health issues are temporary. Thank you so much for all your work. You have been one of our most reliable and quick translators. We very much appreciate the time you have spent on this translation!
pyportal shares the clock line with the ESP32 and I'm worried that it can mess up the SD card
Ok, I've made the MSC LUN -> filesystem checks stricter. Only sdcardio that is not allocated to the VM heap will be exposed my USB MSC. This basically requires the automounting definitions for the board. I've added them to Metro RP2350 in addition to Fruit Jam. Other ports/boards will be need to be added as they can be tested.
I tested on the PyPortal briefly but had issues with sdcardio that I didn't want to debug. The same card works on RP2350. PyPortal shares the clock line between th...
The mac was my old 2019 Macbook Pro running 15.0.1.
updating it now
This allows the native terminal to use fonts that are too large for RAM. They may be too large if the language has many characters or emoji are supported as well.
This PR also improves TileGrid so it can support 16 bit values when needed.
@slender iron on fruit jam will the SD card be shared with the C6 or anything else?
@slender iron ok! works on Win 11 and on macOS 15.3.2 on an M1 Mac Mini.
If I wanted to have the sd card be r/w to the host computer, could I remount it? It is readonly now.
the second arg is readonly=True. It works when put in boot.py. Doesn't work from the REPL (not surprising since it doesn't redo the USB enumeration), though it doesn't give an error in the REPL.
I'd expect it to work from the repl if the drive is ejected from the host
I can look at that more tomorrow. seems like it should raise an exception if it thinks it won't work
Tested with a Metro RP2350 on Ubuntu 24.04, Windows 11, and macOS 15.3.2.
All work!
The SD card is normally read-only to the host computer.
If I put import storage; storage.remount("/sd", readonly=True) in boot.py, it becomes R/W to the host. Doing that after USB enumeration, say in the REPL, does not change the host view of the drive, but does not give an error.
- Maybe raise an error if
storage.remount()is attempted after USB starts? - Document the feature, maybe after this ...
Images automagically compressed by Calibre's image-actions āØ
Compression reduced images by 59.7%, saving 5.60 MB.
| Filename | Before | After | Improvement |
|---|---|---|---|
| assets/images/boards/large/adafruit_fruit_jam.jpg | 115.43 KB | 52.81 KB | -54.3% |
| assets/images/boards/large/adafruit_metro_rp2350.jpg | 147.77 KB | 71.16 KB | -51.8% |
| assets/images/boards/large/daisy_s... |
As observed earlier, each time socketpool_socket_accept() is invoked it allocates a new socketpool_socket_obj_t. Due to the way split heap memory management is implemented in gc_alloc(), these small memory allocations (12, 24, or 36 bytes) cause gc_collect() to be invoked often: once every ~700 memory allocations.
This looks good. I did not test, but of course you did. The logic makes sense to me.
I see the zephyr has lvgl support, https://github.com/zephyrproject-rtos/lvgl. In the long run might we rely on that upstream code? I did not look at its functionality in detail.
This forum post https://forums.adafruit.com/viewtopic.php?p=1051479#p1051479 reports an exception raised by the code from this learn guide: https://learn.adafruit.com/infinite-text-adventure/overview.
The code is attempting to create a Terminal instance with height 1 https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/CircuitPython_Zorque_Text_Game_openai/code.py#L106-L111
The current validation of width and height >=2 was added here: https://github.com/adafruit/circu...
I'm going to close this and make it against 9.2.x instead.
This forum post https://forums.adafruit.com/viewtopic.php?p=1051479#p1051479 reports an exception raised by the code from this learn guide: https://learn.adafruit.com/infinite-text-adventure/overview.
The code is attempting to create a Terminal instance with height 1 https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/CircuitPython_Zorque_Text_Game_openai/code.py#L106-L111
The current validation of width and height >=2 was added here: https://github.com/adafruit/circu...
Adds support for Blues Cygnet Feather STM32L433CC.
Changes:
- Adds board files for STM32L433
- The STM32L433 requires a different TinyUSB driver as well as a different USB ISR (as the L433 doesn't support USB OTG)
- The enable/disable interrupts code appeared to be failing and disabling all interrupts after a certain period. Rewritten to attempt to resolve this issue
In the long run might we rely on that upstream code?
Yup, I think so. We'll likely need to redo the API then though. We'll see.
Thanks! Please rename the board folder to blues_cygnet or something similar that includes the company name as well as the board name.
Filename should probably be pwmio.py
Hey, I'm a beginner and would love to work on this! Can you guide me?"
I'd suggest joining the #circuitpython-dev channel on the Discord. There we can direct you to an issue to work on.
Totally fine to do a follow up. Is this ready for another review?
Looks good! Thank you!
After a fruitful chat with @dhalbert getting some traction on debug. Found multi-heap integrity testing code in IDF: heap_caps_check_integrity_all(). Added calls to this in port_malloc(), port_free(), and port_realloc(). After about 1/2 hour running simple server from #9428 I'm getting this:
Core 1 register dump:
PC : 0x4039367a PS : 0x00040036 A0 : 0x00000000 A1 : 0x3fcaeb10
A2 : 0xffffffff A3 : 0x00000000 A4 : 0x00000001 A5 : 0x3...
Re 1: all .h should have #pragma once.
Fixes https://github.com/adafruit/circuitpython/issues/10061
- Replace the deprecated
synthio.Biquadwithsynthio.BlockBiquad(now namedsynthio.Biquad) - Remove
synthio.Synthesizer.low_pass_filter,synthio.Synthesizer.high_pass_filter, andsynthio.Synthesizer.band_pass_filter - Remove
synthio.AnyBiquadfrom documentation - Coefficients from
biquad_filter_statehave been moved intosynthio_biquad(biquad_filter_stateis still used for input and output state)
These...
This will use the default SPI pins chosen in mpconfigboard.h. But the documentation says:
W5500-EVB-Pico2 pinout is directly connected to the GPIO of RP2350 as shown in the picture above. It has the same pinout as the Raspberry Pi Pico2 board. However, GPIO16, GPIO17, GPIO18, GPIO19, GPIO20, GPIO21 are connected to W5500 inside the board. These pins enable SPI communication with W5500 to use Ethernet function. If you are u...
As far as I can see this board does not have a STEMMA/QT connector.
No STEMMA/QT connector, is there?
There is not a STEMMA_I2C connector that I see, so it should be called just board.I2C().
@lone axle have time today to talk about fruit jam?
Yes, I am eating lunch in a moment and then need to check into one thing afterward. But can any time the rest of the day after that. Starting maybe 1hr or so from now
that'll be lunch for me. maybe 2 hours from now?
Yep, that works.
I assumed this should be left in for all of these boards based on your comment in https://github.com/adafruit/circuitpython/pull/10179 regarding keeping these as close as possible to their official RPi Pico counterparts. (All of these WIZnet boards are variations on the "It's a Raspberry Pi Pico with a WIZnet W5K chip" theme.)
This looks good to me but I'd appreciate testing and/or a look-over by a synthio user as well. Thanks.
Given that we are going to start doing 10.0.0 alphas and betas, would you like this to be against 9.2.x or could it be against main? I don't know how painful this would be to rebase to main. Closing the PR and opening a new one against main seems to work better than changing the base of an active PR.
My preference would be to have this on main. It is a new feature. 9.2.x should only be new board defs and bug fixes.
I keep forgetting this board is the same shape and layout as a Pi Pico, but with extra length. So it would fit on a Pi Cowbell (https://www.adafruit.com/product/5200), which has a STEMMA connector.
This I think is still a valid concern, given the documentation.
That's fair. I came at it from the opposite direction, figuring the WIZnet chip is the only hardwired SPI peripheral on the board, so odds are pretty high that it's the SPI peripheral you're looking for.
As a general rule, if a CircuitPython board has hardwired peripherals that don't have baked-in support (i.e. you have to install a driver in the lib folder and point it at the right peripheral/pins), do we avoid making those the board defaults to ensure users intentionally select the ...
How about board.W5K_SPI() to match the W5K_ individual pins? Still works with the default SPI pins from mpconfigboard.h but prevents accidental use for general SPI purposes?
As a general rule, if a CircuitPython board has hardwired peripherals that don't have baked-in support (i.e. you have to install a driver in the
libfolder and point it at the right peripheral/pins), do we avoid making those the board defaults to ensure users intentionally select the hardwired device?
Not necessarily. There are plenty of boards with displays on the default SPI bus. But this is the first recommendation I've seen to avoid the "default" bus because it's connected to an on...
I've added more documentation. I think it may have worked for you but you didn't realize. It takes a few seconds for CP to "eject" and then make the drive available again.
I'll make this change, then make sure the new board in PR https://github.com/adafruit/circuitpython/pull/10179 matches what we've done here.
In the case of CIRCUITPY, storage.remount() can only be done in safemode.py or boot.py. Is that also true for CPSAVES and SD?
Totally agree, I think10.x felt further away when I opened this. I'm not going to attempt the git re-basing black magic :laughing:
I'll go ahead and close this and re-open a new one against main.
In the case of
CIRCUITPY,storage.remount()can only be done insafemode.pyorboot.py. Is that also true forCPSAVESandSD?
It is not strictly true for CIRCUITPY. If you can eject CIRCUITPY from your host OS (like Linux can), then you can remount it. What happens is that the USB writable check grabs a lock on the underlying block device. On Linux, this happens before you actually "mount" the drive. It is only released on eject. boot.py runs before this so it always works....
Automated website update for release 9.2.7 by Blinka.
@lone axle I'm around whenever you are free
Set the maximum supported number of displayio displays. This value overrides the CIRCUITPY_DISPLAY_LIMIT compile-time flag.
Resubmitting earlier PR #10158 now against main rather than 9.x.x. This PR addresses #1760 but I think there are probably follow-up PRs needed before that issue can be considered closed.
I am good to go any time.
https://blog.adafruit.com/2025/04/01/circuitpython-9-2-7-released/
Highlights: bug fixes.
@tulip sleet did you push 10.0.0-alpha.0 to the adafruit repo?
yes, it is the commit after the 9.2.x branch
I will make a 10.0.0-alpha.1 after a couple more PR's on main
we may actually need 10 tags after every 9.2.x branch merge
I'm not seeing 10.0.0-alpha.0 in my tags after make fetch-tags
ah, I do see it
with rg
10 doesn't alphabetize as nicely š
I think our version computation is filtering it out too
I think I'll add --first-parent too
that way only tags on the main branch will be considered
This is on the merge commit that merged in the one that alpha.0 is on
--first-parent ignores it
(and will ignore 9.2.7)
The old glob assumed one digit before the ".". Now pick anything that doesn't start with "v" and is on the main branch. These are always merge commits. Code merged in is on the second parent.
:+1:
I was a a little worried this might match too much, but we've been pretty careful to only make tags with version numbers.
@lone axle The animation is definitely slower with group scale=2
I think it'd be ok if we center it and scale=1 though
I'll make this change, then make sure the new board in PR #10179 matches what we've done here.
Do you mean you might make further commits in this PR? Or should I go ahead and merge this?
All good to merge as far as I'm concerned, thanks!
I believe should be good to merge now, thanks!
Heh, whoops š
@slender iron in addition to not looping, it might be nice to ultimately let the user break out with a key press.
ya, makes sense
I'll try to test it out soon. Did any existing learn guides about synthio refer to these? I think some did.
@lone axle can you send me sized group when you have a chance?
thanks!
it (and/or GridLayout) may get wonky when used with scales other than 1, I don't think I've tested much.
@slender iron here is all of the icons as well. You may have made placeholders already, if not these may help
@gamblor21 It just occurred to me that
mixhasn't been implemented within this effect. I think that needs to be added before considering a merge into main.
@relic-se Added it in, I think matches what you were suggesting. I tried it and seems to work as expected.
CircuitPython 9.2.7 looks good.
Feather ESP32-S2 Rev TFT + MAX3241 FW detected a microSD without issue.
Adafruit CircuitPython 9.2.7 on 2025-04-01; Adafruit Feather ESP32-S2 Reverse TFT with ESP32S2
[...]
code.py output:
Finding devices:
0781:cfcb: SanDisk SDDR-B531
No luck on the Feather v2.
š192.168.0.139 | BLE:Off | Done | 9.2.7\]0;š192.168.0.139 | BLE:Off | REPL | 9.2.7\
Adafruit CircuitPython 9.2.7 on 2025-04-01; Adafruit Feather ESP32 V2 with ESP32
Finding devices:
Finding devices:
Finding devices:
Finding devices:
Finding devices:
@tulip sleet @slender iron For Espressif debugging, I'm looking for tips re: setting up and using coredump to uart.
I'll need to test it, but should we plan on this addition for 9.2.x or 10.x? @tannewt
should we start the CP10 bundle ? (in the bundle releases and circup)
I've never done this!
@tulip sleet It doesn't work. After a few hours I've gotten JTAG to work. What a journey.
JTAG requires blowing a fuse on the ESP32-S3, pulling GPIO3 to ground on power-up, connecting a J-Link, starting the Espressif OpenOCD and GDB in the ESP virtual environment, and building CP with DEBUG=1 and ENABLE_JTAG=1. After that, everything needs to be powered up in just the right sequence. Whew.
I did get SWD to mostly work -- no fuses. Are some pins now stuck as only JTAG?
No, but the ENABLE_JTAG stops CP from resetting the JTAG pins.
The fuse I blew was EFUSE_STRAP_JTAG_SEL. It lets you choose the interface (SWD over USB or JTAG) by strapping GPIO3 at power-up. Once the board is up, GPIO3 is available as usual.
I'm writing up a gist so I don't lose the recipe.
So far, it's stable. I'm going to call it a day and hopefully I'll have a crash I can poke at in the morning.
You could copy it to https://adafruit-playground.com/ to make it more visible.
We could put it in a Guide later.
thanks!
@jaunty juniper, I noticed that you forked adafruit_fancyled recently and, assuming that was in preparation of adding hsv2rgb_rainbow() to it, might I suggest also making that function capable of handling normalized floats as well.
Your [recent port](#help-with-circuitpython message) of that function was extremely convenient for me when converting some existing code to CircuitPython, but its 8-bit resolution is admittedly somewhat limiting. In my opinion, hsv2rgb_rainbow() would be far more capable if its input could also accept (0.0-1.0) floats similar to rainbowio.colorwheel() and fancyled.CHSV().
I don't want to look a gift horse in the mouth, and I greatly appreciate the time you took to port the existing function, but while it's on your brain's front burner, please consider improving it slightly to meet the fantastic capabilities of other CircuitPython libraries.
I hit another, taller wall with what I was trying to do, so I stopped working on this. I guess close it out the next time you merge from MicroPython.
Sorry to hear! But it's on the list -- thanks.
Could we add the CPSAVES drive to Metro RP2350 to make it more closely mimic the Fruit Jam?
@slender iron I made draft release notes for 10.0.0-alpha.1. Anything you want to include in that, that's not merged yet, like https://github.com/adafruit/circuitpython/pull/10214 (CIRCUITPY_DISPLAY_LIMIT)?
I opened an issue in the repo to discuss how to integrate it into the library. I'll also probably upload my scripts as a standalone library later today, we can surely make a version that works like colorwheel
@tulip sleet Is 9.2.x closed out? If so, I'll re-base my pending work to main.
We would fix important bugs on 9.2.x but not add new features. I think HTTP server bugs can be fixed in 10. We can point people to 10 alphas and betas if they encounter bugs we have fixed.
I'll move the BLE macro PR (the conflict is fixed) to main as well.
I thought I merged that already
oh, I guess not!
yeah, go ahead and move that one. I was a little worried about churn with that.
@dhalbert I'm splitting this. This PR covers the original change plus the recommended support matrix update. I'll open a separate issue for _bleio vs. _bleio_hci change as this will likely require some churn before we get it right.
From PR #9878 @dhalbert suggests:
Suppose _bleio for HCI was actually called _bleio_hci. The libraries would do something like:
try:
import _bleio
except ImportError
import _bleio_hci as _bleio
Conceivably, one could make a build that would support both, though it's not of much use (though there are compile issues about that, so you don't have to duplicate the shared-bindings code).
It'll be alpha.2 since I added another alpha.1 tag yesterday.
I think it's fine to get it out as-is
@lone axle looks like I'm missing the default icon too
and arrow_*.bmp
k, looks like I have all of the assets
I figured out that it is specifically Fruit Jam -> XR1 -> 7" HDMI display that is not supported with the 360x200 resolution. It seem that the XR1 does support it and tries to pass it along in a comprable format, but the display itself does not so it gets "unsupported format" error. If you go Fruit Jam -> 7" HDMI display directly it does negotiate a size that it supports.
right, the xr1 supports it, but then it passes it to the display which doesn't
I think it's more a problem between the XR1 and the display. Not worth trying to fix from the Fruit Jam, just an unfortunate quirk of those devices together.
kk, I can look after I get this OS stuff setup
gonna add serial input support to the launcher
since it isn't finding my mouse
for the mouse you may need to change adafruit_usb_host_descriptors.find_mouse_endpoint to find_boot_mouse_endpoint
I uncommented the find_all loop and it doesn't find anything
and no keyboard either
@lone axle would it be interesting to add a function to switch the device mode from boot to report to the usb host descriptors library ? (or is it already ?)
it isn't already AFAIK, and I think it'd be great to have there. That is what is needed to get the scroll wheel data from mice right?
yep
@tulip sleet hold off on 10.x prerelease. I think usb host may be broken
it looks like critical_section_enter_blocking isn't being inlined for me
and ending up in flash
These are used by USB host on core 1 and must be in RAM to work. The softer inline keyword allows the compiler to ignore it and put the function in flash instead. Core 1 will crash then.
Upstream PR is here: https://github.com/raspberrypi/pico-sdk/pull/2393
Surprising this was not noticed by other pico-sdk users earlier.
could be a compiler + settings thing
@slender iron the change in adafruit/pico-sdk caused a failure in CI in the Bazel build. Copilot suggests attribute((always_inline)) instead of __force_inline.
The former is available in both gcc and clang
__force_inline is a macro in the sdk I thought
maybe you are including that macro in the includes where it's used for us, but not in the .h directly.
so it's failing on other compiles in their tests
so need another include in the .h you changed?
ya, maybe
I think #include "pico/platform/compiler.h"
that is the include that actually defines __force_inline
welp, the close endpoints thing breaks us too
The close endpoints update broke our ability to open endpoints that the native TinyUSB driver had already opened. We need to add a way to fully detach the native driver.
Until then, limit the native HID driver to keyboards only. CircuitPython uses this for the native keyboard support.
āļø @lone axle this should fix your usb
@slender iron just curious - was pico-sdk pull request found by inspection, or did it actually bite circuit pyton ?
https://github.com/adafruit/pico-sdk/commit/96b363a15598d0a17a77542ba63150b7d3fa5fd5
it bit me on my build
because we run usb host on the core1 with the MPU set to block flash accesses
( I now scroll back and see how it hit )
thanks, at work we use COPY_TO_RAM for everything - so it would not have hit us yet - that's an interesting bug!
the whole firmware is in RAM?
less than 64K at that too
ya, that simplifies things!
I no longer get USBError, but something seems to be broken for the 2 mouse code (https://github.com/adafruit/Adafruit_CircuitPython_USB_Host_Descriptors/blob/main/examples/usb_host_descriptors_two_boot_mice.py). both mice are recognized, one of them works perfectly, but the other one only moves in the Y axis, it's like it's X is locked, or perhaps that index of it's buffer is getting wiped or not read correctly somehow
my mouse is doing that too
not sure why
you know, I think the native HID driver sets the mouse back to boot protocol
so maybe the non-working mouse is in non-boot mode
I did end up getting a USBError after ctrl-c / ctrl-D a few times
:+1:
Note that upstream PR is revised from the commit here a bit, and adds an #include which isn't needed in our particular case. We'll want to update to pico-sdk 2.1.2 when that PR is accepted.
one of my mice is actually a keyboard / trackpad combo, I'll try it with two plain ones.
is my current state
@slender iron mouse.read() is returning 8 bytes now. and the buffer it's writing to is only 4 bytes in size so that is one issue at least.
ya, probably a regular report
I am not sure this is a good idea at all, and I'd say don't bother with a PR for this right now.
@lone axle here is a fix for the other usberror: https://github.com/adafruit/circuitpython/pull/10220/commits/15620cb40b4058207dfa363f48e13cf25fe487a4
it'd help if we actually closed endpoints ourselves
Building now, I'll try this one
I added an additional fix here to CP so that the deinit method is correctly called as a finaliser.
Is there any way for code to check if a device is going to send 4 byte reports or 8? Or is it best to just assume 8 and always check the returned value from read()?
thank you, I see the code that disables flash now in core1_main in circuitpython/ports/raspberrypi/common-hal/usb_host/Port.c
I believe the size of the report is in the descriptor. I don't know how it works with the boot vs report stuff, is it a separate descriptor ? Does it change ? How do we know which is which ?
we can always assume 8 though for simplicity
The brand new build from that PR that Scott linked maybe does some of the additional mouse setup that you figured out recently but inside the core. So a mouse that on the old (current) version returned 4 byte boot reports is now returning 8 byte reports under this bleeding edge build.
is there any parsing of the incoming HID report descriptor? Or is it assuming it is a "boot" device? In that case the actual descriptor is ignored and a standardized descriptor is used. The descriptor can having anything in it. I don't know whether the USB host code in TinyUSB is doing that work.
Or maybe it's different from the work you've done. I'm not really sure tbh. But it did return only 4 bytes before I believe and now does 8. I haven't looked closer at what all is in the bytes yet though.
I've been using this function to parse the descriptor https://github.com/adafruit/Adafruit_CircuitPython_USB_Host_Descriptors/blob/main/adafruit_usb_host_descriptors.py#L80
tinyusb was setting it back to boot protocol: https://github.com/hathach/tinyusb/blob/master/src/class/hid/hid_host.c#L522 we now escape it early and so it doesn't
looks like hid defaults to "report" mode instead of boot
I refactored the SDRAM code and moved the data and sdram_init() call in board.c
Please have a look and let me know if this is a better approach :)
Everything is sounding great to me. Here's the test script I wrote up for reference: https://gist.github.com/relic-se/c4a05614e09d6ba79ee5af8fc4bfb846. @tannewt You're up for final review!
I only see the delay being converted from ms to ticks. The rest is all done in ticks.
@Neradoc Right. I'd mis-read the code. It does boil down to a question of precision as you describe.
There are some build errors in the CI - type conversion.
Using subticks to increase timer resolution by 5 bits, results running on a Raspberry Pi Pico W are:
10.0.0-alpha.1-19-g380b8bda7a-dirty
expected 10000 us, got 9997.95 us
I'll be making similar updates to other ports and will PR shortly.
Maybe we could have a note in the sleep() docs about precision being limited around the millisecond.
I've seen library code with time.sleep(0.00001) or 0.0001 which I don't know if this results in an actual sleep of 1 tick or 0.
Note that C python sleep docs says:
The suspension time may be longer than requested by an arbitrary amount, because of the scheduling of other activity in the system.
For CP, do we guarantee it's at least the time given (by rounding up) ? Do we say it's a "cl...
For CP, do we guarantee it's at least the time given (by rounding up) ? Do we say it's a "closest" effort plus overhead ? Do we just say it's an approximation ? Do we promise nothing ?
No guarantees as to whether it's a ceiling rather than a floor, because there are things that can make the interval longer, like gc and interrupt handling. Right now time.sleep(0.00001) doesn't really do anything. For more precise timing, one can use microntroller.delay_us(), which does a busy-wait loop....
@mortal kernel what is your new strategy for fractional tick delays? Are you counting subticks by getting the subtickvalue with get_raw_ticks(&subticks). Or are you using mp_hal_delay_us() for fractional ms?
The docs page title on latest: https://docs.circuitpython.org/en/latest/README.html is
CircuitPython ā Adafruit CircuitPython 1 documentation
and on stable (which would be 9.2.7 ?)
CircuitPython ā Adafruit CircuitPython 3 documentation
and on the 9.2.x branch it says 9.2.6
not that anybody reads page titles but still
latest saying 9.2.x I think is the result of the bug that Scott fixed with https://github.com/adafruit/circuitpython/pull/10216
i will check on the stable version
I'm using get_raw_ticks(). I've wrapped it in get_raw_subticks() for convenience.
I've seen library code with time.sleep(0.00001) or 0.0001 which I don't know if this results in an actual sleep of 1 tick or 0.
The conversion code in time_sleep first converts the floating time in seconds to milliseconds by floating multiplication and rounds up by adding 0.5. An implicit cast from float to int then truncates the fractional part (standard C). So, a value < 0.5 milliseconds will not sleep while a value >= 0.5 milliseconds will sleep at least 1 millisecond.
For more pre...
My update does not support sleep timer resolution beyond integral milliseconds.
Since the underlying timer has subtick resolution (in most cases), it is possible to resolve sleep to ~30 us. Perhaps change
mp_hal_delay_mstomp_hal_delay_us? This would avoid any busy waiting. Is there utility in doing this?
Are you saying change that call? mp_hal_delay_us() typically is a busy-wait, not a tick wait (which will save power, since it uses WFI() or the equivalent.
One issue is if a ...
Are you saying change that call? mp_hal_delay_us() typically is a busy-wait, not a tick wait (which will save power, since it uses WFI() or the equivalent.
Because there is not a generic mp_hal_delay_us(), I assumed it didn't exist. My bad. I agree that a busy wait is not a good idea due to power consumption implications. I'll choose another name that clarifies whether the implemented delay is a busy or a timer wait.
I'm currently thinking of making a CircuitPython sensor -> ROS factory utility class - so you could just set up your sensor, pass it into the class and it starts publishing on an appropriate topic
I've just implemented the first bit of the shared-bindings layer so I'd love to hear more about what you meant by this. I'm currently basing the module API off ofrclpy, but we could make a python wrapper library for other tasks.
@hierophect I've actually implemented the adaptor using circuitpython on a raspberry pi. It should work on ROS1 and ROS2 - but I've only tested on ROS1.
The code is here and a usage example is here
It basically allows you to create any sensor that complies with the [adafruit sensor conventions](ht...
@slender iron I didin't do an alpha yesterday because of https://github.com/adafruit/circuitpython/pull/10220#issuecomment-2775423820
I'll do USB updates this morning
Switch back to TinyUSB from hathach and Pico-PIO-USB from sekigon-gonnoc.
@tulip sleet āļø
great! tested?
i'll merge after CI finishes
CircuitPython version and board name
Adafruit CircuitPython 9.2.7 on 2025-04-01; PCA10059 nRF52840 Dongle with nRF52840
Board ID:pca10059
UID:9B577D0F0B41F302
Code/REPL
##### Central code
import os,gc,zlib,binascii,digitalio
import time,board,busio,_bleio,pwmio
import storage,analogio,microcontroller,supervisor
import adafruit_ads1x15.ads1015 as ADS
from adafruit_mcp230xx.mcp23017 import MCP23017
from adafruit_ble import BLERadio
from adafruit_ble.services.n...
Closed in favor of #10221.
Great! The first one is where every time the current areas fill, gc does a full collect. Lots of small allocations, like return tuples from functions, will cause very frequent collects.
yup
The other looks more like a bug. When a large allocation is made that is bigger than area size the heuristic wants to allocate, it will cause the heuristic on the next filled area to allocate a new area that is double the sum of all areas, including very large allocations.
For example, if a framebuffer is allocated, then the next time an area is added it will eat up most or all of the tlsf heap.
We run out of tlsf heap space so code that allocates outside of the VM cannot allocate. It's not causing the bug I'm working on, but I've hit it playing with framebuffer.
[adafruit/circuitpython] New tag created: 10.0.0-alpha.2
Much better! Two more minor things. Thanks!
Will this work if it is called? If not, then maybe remove it.
Automated website update for release 10.0.0-alpha.2 by Blinka.
New boards:
- wiznet_w5500_evb_pico2
Put this in a new supervisor/stm.h and rename to stm_add_sdram_to_heap. The port_ prefix is meant to be cross-port apis from supervisor/port.h.
No heap growing approach will be perfect ĀÆ_(ć)_/ĀÆ
for the timing bug, why not just round up and call it good?
i've been talking about the timing stuff with Bob when you were gone. I think he's on a good track. There was a bug in the RP2 subticks calculation as well.
I'm also not sure this is the best way. I think in the future _bleio will build on one BLE host stack (Zephyr) that we can configure with an HCI transport. Native BLE will then make it available as board.BLE or something.
kk, just don't let perfect be the enemy of good
not at all -- this is fixing some technical debt
right but that debt doesn't actually break much
these are not big changes. It's an improvement to time.sleep() to do sub-millisecond better and a bug fix
they just aren't that high priority for me even though they are under 10.x
Looks great! Thank you!
Let's close this as not planned.
Fixed by (I think) commit 05a50b8fd8f9146b0fe9dea28e55182c9acb4f5b. Thanks @relic-se!
@slender iron Please let me know what you'd rather I work on and I'll switch to it.
@todbot Tested this on my end with the new PR, and it works without error. The only other change is that in 10.x, you'll need to use synthio.Biquad instead of synthio.BlockBiquad.
I think you are on the right track. The ESP crash needs someone in the weeds
I can video/audio chat with you about heaps if you want too. Or talk about it on deep dive
Let's take it up during deep dive. I see you're busy and don't want to take up your time on something that's not too important right now.
Sure. It's important to me that you get my brain dumps before I'm on leave though too
@slender iron did the HSTX display change to 8bit color even for the smaller resolutions like 320x240? The other day Bitmapsaver was working for those displays when I tested, but now I seem to always get ValueError: Display must have a 16 bit colorspace raised even if I change the display to 320x240 in settings.toml.
yes, I think so. I think you can change bit dept in settings.toml too
fill_row() function seems to only support 16bit, which is what bitmapsaver uses. Ahh that is good to know.
maybe we can add support for 8bit fill_row() in FrameBufferDisplay so that screenshots can work.
sure! should be easy
I had a quick try it at. It was easy enough to get it to not raise the exception, but I'm not quite understanding where a color conversion needs to occur to account for it. The resulting screeshot comes out with white sections ending up as a mix of yellow and blue, which does seem like a 16bit to 8bit conversion issue where it might be truncating instead of converting to me perhaps. fill_row() ends up using fill_area() from Group and ultimately TileGrid or Vectorio objects. There is some logic inside of TileGrid fill_area() which references 8 bit color depth already, but I'm not sure entire what it's doing or if that part of the code is relavent to the color issue.
claude was happy to attempt to modify TileGrid fill_area() in a few different ways, but none that worked. I don't have my head wrapped fully around what is input_pixel and what is output_pixel in the use-case of bitmapsaver / display.fill_row() and which one needs to be converted to what colorspace in order to account for the display being in 8 bit depth. I'll move on for now, but maybe circle back and try some more later.
post your diff to a branch so I can see what I came up with
looks like it's reading the wrong bits sometimes
but looks close
https://github.com/FoamyGuy/circuitpython/tree/8bit_color_screenshot the only change needed to get that far was removing the logic in fill_row() that was raising on color depths other than 16. This branch has it.
None of claude and I's attempts at changes inside of TileGrid.fill_area() ended up with improving the colors any.
Here is the logic I found in there that seems to be dealing with 8 bit depth: https://github.com/adafruit/circuitpython/blob/main/shared-module/displayio/TileGrid.c#L569
I think you'd need to expand the row from 8 bits to 16bits before returning from fill_row
because the bitmap saver assumes it is 16bit color
Merge this after 10.x bundles are successfully built. Leaving as draft until then.
Was able to catch a failure with gdb over JTAG running. In the case I caught, crash was due to a double fault on thread 4:
Thread 4 (Thread 1070344812 "No Name" (Name: No Name, State: Running @CPU1)):
#0 _DoubleExceptionVector () at /home/rabeles/Development/cp-development/issue-9937/cp-repo-92x-9937/ports/espressif/esp-idf/components/xtensa/xtensa_vectors.S:564
#1 0x600c0034 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
In this instance the thr...
Breaking into a running system, thread 4 is the CircuitPython thread. Thread 9 (the tiny_usb thread) shows a valid stack, whereas for the crash case it didn't.
Following up on https://github.com/adafruit/circuitpython/issues/9541, I decided to look into getting touchio working for RP2350 without causing too much API change.
Here's a first attempt. It adds a new boolean pull_dir parameter to touchio.TouchIn. Defaulting to pull_dir=False, TouchIn acts as before. If pull_dir=True and an external 1M pull-up is wired, TouchIn will now also work on RP2350.
I believe this is similar to what DanH was imagining, but much simpler. (It fel...
hey since we have selectable sockets, is there any code using it ?
CircuitPython version and board name
Adafruit CircuitPython 9.2.6 on 2025-03-23; Seeed Xiao ESP32-C6 4MB Flash 512KB SRAM with ESP32-C6FH4
Code/REPL
import board
import alarm
import microcontroller
# LED pin for observing if deep sleep was reached (LED will go out)
LED_PIN = microcontroller.pin.GPIO15
led = digitalio.DigitalInOut(LED_PIN)
led.direction = digitalio.Direction.OUTPUT
led.value = False # turn on LED
pin_alarm = alarm.pin.PinAlarm(pin=board.D9, ...
I've finished a simple compiling implementation of my microROS support module, but unfortunately I'm getting a hardfault on init. Going to be deep diving on why but if anyone would be willing to give my allocator code a glance and tell me if I'm doing something deeply misinformed, I'd be very greatful! https://github.com/adafruit/circuitpython/blob/f171c44c4a72716f37db736f7063e05bf3943610/ports/espressif/common-hal/rclcpy/__init__.c
microros needs an allocator object to be able to store stuff like the strings it uses for node names. I implemented what it recommended with micropython's m_ versions but evidently something has gone wrong
Getting a hardfault on init, which probably means there's an issue with the microros allocator overrides I provided using the micropython allocator tools (m_alloc, m_free etc). If anyone's willing to lend an eyeball to see if there's something grossly wrong there it'd be very helpful.
I'm just curious: was this change for cosmetic/style reasons or is there a compiler difference?
I'm just curious: was this change for cosmetic/style reasons or is there a compiler difference?
Honestly the compiler yelled at me and this finally worked and I didn't have time to dig deeper.
@relic-se If you have a moment this is ready for testing. No rush.
You should not need to do this -- there are plenty of other f-suffixed constants. Which compiler and version are you using? I don't see these errors in the CI logs.
You should not need to do this -- there are plenty of other
f-suffixed constants. Which compiler and version are you using? I don't see these errors in the CI logs.
In file included from ../../py/obj.h:31,
from ../../shared-module/audiodelays/Reverb.h:8,
from ../../shared-bindings/audiodelays/Reverb.h:9,
from ../../shared-module/audiodelays/Reverb.c:10:
../../shared-module/audiodelays/Reverb.c: In function 'audiodelays_reverb_ge...
Aha, sory, I see, I haven't even used MICROPY_FLOAT_CONST before. There are quite a few f-suffixed float constants in, say common-hal/. By rights, yes, these could or should be using MICROPY_FLOAT_CONST.
Hey, I am currently trying to get XIAO ESP32C3 board to go into deep sleep. I don't fully understand why alarm is unavailable for its port. This PR explicitly says that all ESP boards should have it available. I think most ESP32C3 ports don't have it. See for example my board:
https://circuitpython.org/board/seeed_xiao_esp32c3/
alarm module is unavailable for both CirPy v9 and v10.
Can you help me understand the issue?
Hi, it's disabled by default on some boards with 4MB of flash or less, but will be added in Circuitpython 10 once we change the partition scheme (which will be relatively painless on C3 boards if you are used to save your files before updating Circuitpython with esptool).
https://github.com/adafruit/circuitpython/blob/ad73d0bc8eea469c852f4f088931d8bbb6c49e7a/ports/espressif/mpconfigport.mk#L280-L288
Hey, thanks for the quick response!
Hi, it's disabled by default on some boards with 4MB of flash or less, but will be added in Circuitpython 10 once we change the partition scheme
Is there a ETA for this?
Currently building with it would require modifying this file and disabling other modules to make some space.
I will look into that in the meantime. Thanks for the suggestion!
I'm learning how this works, but what I see is that when the palette is modified, the self->current_area_dirty of the shape is not set to true (which seems normal), and its self->ephemeral_dirty_area is empty. It's only redrawn because displayio_palette_needs_refresh returns true on its palette, when vectorio_vector_shape_get_refresh_areas is called.
https://github.com/adafruit/circuitpython/blob/ad73d0bc8eea469c852f4f088931d8bbb6c49e7a/shared-module/vectorio/VectorShape.c#L502-L503
C...
CircuitPython version and board name
CircuitPython 9.2.7 RP2040-Zero
Code/REPL
import time
import board
import busio
import adafruit_scd4x
import adafruit_sht4x
import adafruit_sht31d
i2c = busio.I2C(board.GP1, board.GP0)
si2c = busio.I2C(board.GP3, board.GP2)
Behavior
[144854.408519] usb 9-2: new full-speed USB device number 4 using xhci_hcd
[144854.539664] usb 9-2: New USB device found, idVendor=2e8a, idProduct=101f, bcdDevice= 1.00
[144854.5396...
Had a few fresh ideas. Found the CP task's stack by exploring its OpenRTOS TCB, and then decoded it manually:
tos: 0x403818f4 0x4002e2a8
0x3fcc1f98: 0x00060e30 0x820032d8 0x3fcc2050 0x3fcc2178 m_alloc
0x3fcc1fa8: 0x00000001 0x00000001 0x00000004 0x3c1ee794
0x3fcc1fb8: 0x3c1efca0 0x00000000 0x3fcc2020 0x3c1efca8
0x3fcc1fc8: 0x3fcc2054 0x00000004 0x3c1efcac 0x00000017
0x3fcc1fd8: 0x00000000 0x0000001e 0x00000000 0x00000000
0x3fcc1fe8: 0x40056f5c 0x40056f72 0xf...
I'm learning how this works, but what I see is that when the palette is modified, the shape is not impacted: self->current_area_dirty is not set to true (which seems normal), and its self->ephemeral_dirty_area is empty. It's only redrawn because displayio_palette_needs_refresh returns true on its palette, when vectorio_vector_shape_get_refresh_areas is called.
https://github.com/adafruit/circuitpython/blob/ad73d0bc8eea469c852f4f088931d8bbb6c49e7a/shared-module/vectorio/VectorShape.c#L...
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-alpha.2 on 2025-04-04; Waveshare ESP32S3 Touch LCD 2 with ESP32S3
Code/REPL
import board
import displayio
import time
import vectorio
display = board.DISPLAY
display.auto_refresh = False
pal = displayio.Palette(1)
pal[0] = 0xFF0000
shape1 = vectorio.Circle(pixel_shader=pal, x=50, y=50, radius=30)
main_group = displayio.Group()
main_group.append(shape1)
main_group.append(shape1) # expected ...
Is there a ETA for this?
We don't give ETA's but it's actively being worked on. We need new bootloaders first.
If a write was in progress when you unplugged or hard-reset the board, the filesystem might have gotten corrupted, and then would come up as read-only. Do a sync before that, ideally, or wait a few seconds.
If you jumper D9 (GPIO20) to ground, does it sleep? Is anything connected to D9?
No read and write was in progress since the usb volume (/dev/sdb1) was never mounted.
I think there are valid use-cases for having an object in multiple groups. E.g. you have two groups that you alternatively hide. The object in both groups will stay visible. Think of a multiple button-bars, all with a shared OK-button.
In your example you are adding the object to the same group twice. That is a bit different and might be considered as an error.
Yes, the sdram_test() works, I have been using it to test the full RAM on the Daisy.
I left it in because I thought it would be useful for other SDRAM boards in the future, but I can remove it, no problem.
For the re-used 'Okay' button I think a Bitmap and TileGrid are more likely to be in use than a Vectorio shape. In the case of Bitmap and TileGrid you can have multiple TileGrids that share the same Bitmap, so you could make two TileGrids that re-use the same Ok button graphic Bitmap file and put them in two different Groups.
I haven't traced through all of the code to be sure, but I think that both TileGrid and Vectorio shapes have internal variables related to dirty region and refreshing t...
Confirmed that for RP2350, SRAM contents do not survive a POR. This eliminates RESET button press during wait_for_safe_mode_reset() as a viable method for entering safe mode on these parts. Since the Raspberry Pi Pico boards lack a RESET button, using the RUN pin was never an entirely useful option for these boards.
It is feasible to sense the BOOT button during the "wait for reset" interval. When pressed, the BOOT button pulls the flash memory CS wire low. A small routine running from SRA...
Good point.
If I strap D9 to ground or 3V3, the board still does not sleep.
I tried with the following alarms individually, all which failed to sleep:
pin_alarm = alarm.pin.PinAlarm(pin=board.D9, value=True, pull=False)
pin_alarm = alarm.pin.PinAlarm(pin=board.D9, value=False, pull=True)
pin_alarm = alarm.pin.PinAlarm(pin=board.D9, value=False)
pin_alarm = alarm.pin.PinAlarm(pin=board.D9, value=True)
<@&356864093652516868> We'll have our weekly meeting in about 90 minutes from now in this text channel and in the circuitpython voice channel. Please take the time to add your notes in advance to the document: https://docs.google.com/document/d/1YPAPoECwKzqUCmavSv04hAZjQAgRlVLxPIYjfHTctbE/edit?tab=t.0 -- I look forward to everyone's updates!
Google Docs
CircuitPython Weekly Meeting for April 7, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you canāt make the meeting and would st...
An independent podcast with the people in and around CircuitPython. Created and hosted by Paul Cutler.
Dual LCD Retro Game Review #trending
#python #trending #Robot #shorts #short #Python #AI #IOT #subscribe #Gadgets #DIY #shortvideo
Thanks for hosting Liz, have a great week everyone! š
@mortal kernel are you going to stay in esp32 debugging land or move to another platform?
you could also try doing the esp-idf update
I'm keeping it alive as a background task for now, but moving on. I'm testing a PR for #9710 (RP2350 won't enter safe mode). The SRAM gets reset to garbage on a POR, so our method of saving a word for a reset press won't work. I've implemented a workaround using the BOOTSEL button. After that's done, I can take on the esp-idf update.
ok, sounds good. let me know if you have any questions about any of it
There are other esp32 issues to debug as well if you want to do debugging
safe mode on rp2350 would be good though
I love debugging. Please point me to the issues you'd like me to look into.
updating idf first is probably best though. since it could be a bug on their side
anything in 10.0.0 with an esp32* label
Sounds good. I just got into safe mode on my first try of my BOOTSEL update. A bit flaky, but the whole sense the flash CS line thing works. Woot!
on what board? most boards besides pico can do it as a normal input
I wouldn't add something special for pico
Here is the notes document for next Mondayās CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if youāll be attending the meeting - itās super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and weāll read them off during the meeting. Hope to see you there! <@&356864093652516868>
https://docs.google.com/document/d/1q0T9l-qybjcu0ID3zVOcn2vIgiXJgV_teC48ew8GNrI/edit?tab=t.0
Google Docs
CircuitPython Weekly Meeting for April 14, 2025 Here is the notes document for next Mondayās CircuitPython Weekly Meeting. 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 a...
I'm looking at the schematic for the Feather RP2350, like the Pico boards, the BOOTSEL button connects only to QSPI_CS.
this is metro rp2350
Hmmm, we've got some variation among boards.
feather 2350
how are you reading it?
you should be able to read the usbboot pin rather than cs
I don't know if most RP2(350) boards supported by CP have the boot button on a pin, do the Waveshare and Seeed ones do it for example ? And then we still want a way to put the pico 2 in safe mode, speaking as someone who does support
I don't see USBBOOT making its way to any of the RP2350 pins on the Feather.
ah true
it seems like a bad idea to mess with cs directly
the bootrom can do it because flash isn't active yet
We're early enough in the boot process (no second core started), so it should be safe. But I'm not rejecting your caution. I didn't isolate the reason that SRAM was getting garbaged. Maybe I should take another look?
the first core is running code from flash
It is, but I jump into SRAM with interrupts disabled to sense the pin.
I'm curious what the datasheet says about ram clearing
heya, not to butt in, but can i ask a quick sanity-checking question? I'm doing a project with some RGBMatrix hub75 displays, on an rp2350, and i have the basic code working which is fine. But my stretch goal is to have an SD card connected via SPI, and stream many frames of 32x32 or 64x64 bitmap data off it, ideally at like 8-10fps (or more of possible but not required) ... i know that sd cards on spi are running the slowest way possible, so I'm wondering if i'm within the ballpark of a doable idea or if i need to think of an alternative
This is a better question for #help-with-circuitpython
got it, ok! , my bad!
np this channel is for developing CP itself
I went over it carefully. It doesn't say anything specifically about clearing in the hardware, but bootrom code clears it under certain circumstances. What it does say is that the POR does a complete power up on all of the power boundaries.
After just now repeating a test on the saved location a number of times, it looks like what I was taking for garbage is actually a repeating pattern. Powering SRAM up/down wouldn't do that. Maybe we're getting clobbered by the much more complex bootrom code?
yup, that could be. though there is separate bootram too
we definitely had that problem on nrf
Mysterious. Let me spend a few more cycles on it.
looks like we'll have to use the boot button
ram is powered down by run
@jaunty juniper would safe mode from repl help people?
OK, that issue and the one it links are congruent with what I'm seeing. No SRAM breadcrumbs for us. I wonder if we could use the double-tap hardware flag mentioned in #2043/#2083?
I don't think so because the bootrom will be triggered then
Yeah, you're right. I'll put it aside for now and wait to hear whether we want to pursue the BOOTSEL path.
ya, go ahead with reading cs
I agree its best to have safe mode working
I ran into this myself last week
I've used it, too. So I agree.
This PR provides a "native" implementation for touchio that is identical to the generic touchio, but expects a 1M pull-up resistor instead of a 1M pull-down resistor. RP2040 targets still use generic touchio.
Tested on RP2040 and RP2350.
well safe mode is mostly for 2 cases: when boot.py sets the drive to read only or hides it, and when there's some boot loop caused by user code or a bug. The first case can usually be handled with the REPL, but it's more practical to have safe mode. The other is quite a challenge without safe mode.
and might end with having to nuke the flash
Thank you @candid sun for hosting the meeting! Sorry I couldn't be there
Hi - Did you have a chance to listen to the CircuitPython meeting recording for today?
What @tannewt suggested, and makes sense to me, is to add an optional argument to TouchIn, which is the pull direction, and which defaults to DOWN. For native TouchIO, the argument is ignored (we didn't discuss that case in the recording). For boards that support generic TouchIn with a pull-down, the pull argument must be DOWN (which it defaults to, so not change in user code required). Otherwise raise...
This is the old comment, but your implementation works the opposite way.
Just listened now, after having seen the github. doh!
Having an optional argument to TouchIn() is what I originally did (you may've seen my opened-and-quickly closed PR #https://github.com/adafruit/circuitpython/pull/10223) as I realized this would impact all other ports, increase their code footprint, and require me to touch many more files to adjust the touchio API for all ports.
As I listen to the meeting audio, I'm conflicted. I like the simplicity of this change, but dislike ...
@slender iron I've started playing with your pathlib branch, I know it's in early dev but when I spot things do you want me to submit PRs to your fork, post issues or just wait until it's further along?
PRs to my branch are fine! thanks!
I saw that PR. I was going to comment that I think it's OK, and preferred, to use digitalio.Pull, because we use that consistently elsewhere. The argument will need to be validated to be of type Pull or None. Yes, it will grow the SAMD21 port slightly. We could #if out the validation on SAMD21 (or anything not TOUCH_NATIVE) to save space if we needed to.
SAMD21 and Espressif are the only two ports with native touchio. So there aren't that many other places to change to add the extr...
Changing all ports is the nature of changing a CircuitPython API. It ensures consistency. The reason is to make the up or down choice explicit so folks know to change their setup.
The benefit of adding an additional parameter would be that you can use the common touchio code still. It can support both up and down and only raise an exception on RP2350 with down.
Do we want to split out generic touchio into a new module? That wouldn't change touchio on SAMD and allow both to coexist in th...
Is there a ETA for this?
We don't give ETA's but it's actively being worked on. We need new bootloaders first.
C3 doesn't have a UF2 bootloader. We can do non-Sx now.
4mb flash boards of ESPs disable alarm and bleio in favor of dual bank and OTA. Let's switch this for 10. To do so, we need to remove all CIRCUITPY_LEGACY_4MB_FLASH_LAYOUT. This will move all boards to a non-ota partition scheme. We can do all non-S2 and S3 boards because they require a TinyUF2 update.
This was added in https://github.com/adafruit/circuitpython...
Good sleuthing @Neradoc! I think your fix would be great! We need to make sure all users of palette do this too.
Great work so far! I haven't dug into everything quite yet, but the biggest issue at the moment is definitely the mix implementation. <0.5 doesn't seem to work for me.
All my testing was on an RP2040 with mono 22050hz sample audio (StreetChicken.wav).
I haven't quite figured out why, but when mix is <0.5 (ie: 0.499999), there is no effect at all in the output. When mix is 0.5+, then the effect is at full volume and the sample volume decreases as you approach 1.0. The implementation in audiodelays_reverb_get_mix_fixedpoint appears correct.
Should be spelled "reverberant", but also I feel that this description isn't precise. A higher value "dampens" the high frequency response and reduces reverberation among those frequencies (lower frequencies aren't affected as much).
Linux does read the filesystem before a mount happens. I think it is inspecting the FS for the label for example.
Please try the absolute latest builds too. I've been tweaking this behavior in the repo.
Also you can try a simple erase and reformat of the fileystem? In the REPL:
import storage
storage.erase_filesystem()
Since you are doing this really early, can you just have one dynamically allocated array? It'll make all of the other accessing code simpler.
Thanks for the move to main. My main question is if we can simplify to one dynamically allocated array.
Do this after you've gotten the display object to inspect. Maybe add an actual function to get display X that can switch been the static array and the dynamic one.
ifeq ($(CIRCUITPY_RCLCPY),1)
Please add //| docs here.
As for comments on your questions, I think it is fine to keep reverb in audiodelays. Although it is filter-based, it is mostly associated with delay, and it is unlikely at the moment for us to add multiple reverb-based effects in to warrant a dedicated audioreverbs module (but I am a fan of spring reverb...). It can always be moved around in a future release if need be.
Okay, I may have changed my mind. What if we did create a new audioreverbs module, renamed this effect to "Room...
That was my original attempt, however the boards that had displays defined as board.DISPLAY didn't like the dynamic memory allocation. I tried multiple pointer configurations to try and get the compile to work but didn't look into modifying how board.DISPLAY was defined.
I can go back and dig into the board.DISPLAY setup and try and get it to work with the dynamically allocated memory structure if you think that makes sense.
Ah, right. board.DISPLAY is static.
I wonder if it'd be more fruitful to just try and allocate displays to the CP heap first and then move them over if needed.
@lone axle did you try buffering the audio at all?
I haven't tried anything different from the code here really: https://github.com/adafruit/Fruit-Jam-OS/issues/1 (code-wise at least. I did try different audio files and display resolutions)
I don't know how to buffer the audio from a wave file. Is there example code of that somewhere?
Looks like you can provide a buffer: https://docs.circuitpython.org/en/latest/shared-bindings/audiocore/index.html#audiocore.WaveFile
the 720x400 is definitely more taxing on the memory bus
@tannewt I thought you mentioned somewhere else about replacing board.DISPLAY with something else in 10 or 11? Would board.display() or similar be helpful?
I still don't have a working understanding of the complete CP memory model so I'm not sure how I would do that, is there a mechanism like port_malloc that would allocate heap space?
We now have supervisor.runtime.display too: https://github.com/adafruit/circuitpython/issues/8675
Right now it is read-only. The longer-term idea was to opt a display into being the console by setting that value instead of doing it implicitly like we do today.
I tried changing the wave init line to be like this: wave = WaveFile(wave_file, bytearray(1024)) and there are loud chirping and scratching sounds in the audio playback with it that way. Similar to the artifacts that were audible witht he larger .wav files. If I remove the bytearray(1024) argument and run the same code and audio file I don't hear the loud chirping and scratching. This was all with the 360x200 display size. I will try 720x400 in a moment.
I still don't have a working understanding of the complete CP memory model so I'm not sure how I would do that, is there a mechanism like port_malloc that would allocate heap space?
Yup, m_malloc and a number of other helpers:
https://github.com/adafruit/circuitpython/blob/ea91e38c25f9d948a3feea52ded3587c030fa02b/py/misc.h#L77-L111
These allocate into split heap chunks that are allocated with port_malloc.
Essentially the same with 720x400, there is more loud chirping and scratching when using bytearray(1024) than without. Though at that resolution there is some scratching and chirping even without bytearra(1024) The visual artifacts of static and letters disappearing are the same in both cases at 720x400 as well.
ya, I bet it is just pushing memory bandwidth too hard
I remember seeing code.py slow with 720x400 too
I wonder if we should make picodvi able to switch modes
the problem with starting up in a lower res is that it's unlikely you'll be able to allocate a bigger framebuffer later
for a text editor
Once this PR was set, I was going to take a run at getting the supervisor.runtime.display object to be settable but I have no idea what road blocks I might run into. It looked to me like getting the primary_display variable working was doable and the first step....
I have found when the audio doesn't get the CPU cycles required you start to hear more scratchy type behavior. Sometimes (depending what is taking those cycles) a time.sleep(0.01) is enough to help trigger RUN_BACKGROUND_TASKS to go
I don't know. Honestly I have very little experience with audio.
I do not have confidence that I can make it any better than the current version posted to the issue with it running at 360x200 with the reduced size wave file that is attached to the issue.
If there is a desire to improve it beyond that, or run it on the 720x400 resolution display and have the animation run without the blinking in and out and loud audio artifacts then I do not feel like I can do that, so I would need more direct help or ideas from you or someone else.
ok, I'll do that this week
I think mark is onto something because we have to do conversions to match the output format of the i2s
I don't really have time at the moment but feel free to send me something @lone axle and I can take a look at it.
You can also use audiomixer on top of the wave and it allows larger buffers if that helps.
The current version is here: https://github.com/adafruit/Fruit-Jam-OS/issues/1 If you get time and have thoughts feel free to post there on the issue or pint me here on discord.
it looks like the i2s output always does a copy too
(running at 720x400) time.sleep(0.01) inserted into that code after display.refresh() does maybe make the audio slightly better, but still some scratches remain, and the leters are still disappearing.
I'll look at it later this week
I ran into similar things recently. No amount of sleep really helped. Only thing that helped was increasing the buffer size.
My dog REALLY hates the 'scratching' sound as you described it.
I did try overclocking using the way shown in: https://www.youtube.com/watch?v=vBAJ0AmmGn4 and it was leading to weird things printed out and then hard fault memory error.
I'd rather get it working without overclocking
If there is something incompatible with the overclocking technique shown in that video and the Fruit Jam or something else about newer version of circuitpython it might be good to add a warning to the description of that video or as a popout in it if possible.
my thinking is to put gpio highs and lows around sound processing and display processing to see how they interact
I consider overclocking to be you do it at your own risk
That isn't mentioned in the description or introduction of the video, and the video does kind of make it seem like this is supported functionality IMO.
Using a modified version of the BOOTSEL button sense code works. Pressing BOOTSEL when the LED starts flashing immediately after applying power or pressing RESET (if there is one) successfully enters safe mode.
CircuitPython version and board name
Raspberry Pi PicoVerified on 8.x, 9.x, and even the 10 pre-releases. raspberry_pi_pico_w, but also verified on a pico 2w.
Code/REPL
import board
import audiobusio
import audiocore
import time
audioOut = audiobusio.I2SOut(bit_clock=board.GP8, word_select=board.GP9, data=board.GP7)
sound = audiocore.WaveFile("leftright.wav")
audioOut.play(sound)
while audioOut.playing:
time.sleep(1)
print("done")
Behavior
No ...
Implements BOOTSEL button entry to safe mode the RP2 port.
Resolves issue #9710.
@dhalbert Pinging for a review.
OK, this looks good, going on my recollections of the previous PR. Thanks!
Do this after you've gotten the display object to inspect.
Thanks! moving it is much cleaner.
Maybe add an actual function to get display X that can switch been the static array and the dynamic one.
When you suggest an actual function do you mean the macro functions I'm using in the other modules? I left it out here because there were only a couple instances and thought it was easier to understand without the macro. Or are you suggesting I add a new common_hal function that retur...
These allocate into split heap chunks that are allocated with port_malloc
I'll give using m_malloc a try, will using the heap be compatible with board.DISPLAY or is there another advantage over the port_malloc approach?
@danh I need a small assist getting the UF2 bootloader flashed onto an oddball board, the SAM E54 Xplained Pro. This is for issue #10172. No hurry.
The disambiguated _bleio didn't show up exactly as I expected. It looks, for example, like this in https://docs.circuitpython.org/en/latest/shared-bindings/support_matrix.html:
Misplaced """. I do this all the time and now prefer to put the closing """ on a separate line to make the mistake less likely. Also touched up the arg description a bit.
//| :param ~microcontroller.Pin pin: the pin to read from
//| :param Optional[digitalio.Pull] pull: specify external pull resistor type. If None, assume pull-down or chip-specific implementation that does not require a pull.
//| """
//| ...
This looks good. I will test it tomorrow. I fixed an issue with the Python docstring.
The disambiguated _bleio didn't show up exactly as I expected.
@dhalbert I see the extra _bleio in the example and throughout. I'll need to dig into docs/shared_bindings_matrix.py to figure out why that's happening and follow up with additional PR.
ESP-IDF 5.4.1 is the current release version. If there's no objection, I'll fit out local commits onto upstream tag v5.4.1.
@lone axle Took a look at the issue and code, and I suspect there is a load of disk loading from the sprite sheets and the wave file that are probably slow. I'll try to see if I can run it on a RP2350 even without a display hooked up (I don't have one).
If you want to try a larger buffer with audiomixer you could like:
mixer.voice[0].play(wave)
audio.play(mixer)
I wonder if it'd be more fruitful to just try and allocate displays to the CP heap
m_malloc seems to complain (crash) if the VM is not running. I could allocate the m_malloc memory when the display is allocated in the displayio modules allocate_display and allocate_display_bus. I think I'd need to add a new structure to keep track of which displays had not yet had memory allocated as well. None of the dynamic displays would survive the VM but I could copy the primary display to the s...
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-alpha.1-19-g380b8bda7a-dirty on 2025-04-08; ESP32-S3-DevKitC-1-N8R8 with ESP32S3
Board ID:espressif_esp32s3_devkitc_1_n8r8
UID:468E334483CD
Code/REPL
import busio
import board
import sdcardio
sd_card_cs_pin = board.IO15
spi0_module = busio.SPI(clock=board.IO12, MOSI=board.IO11, MISO=board.IO13)
sd_card = sdcardio.SDCard(spi0_module, sd_card_cs_pin, baudrate=int(250000))
buff_write = by...
10.x bundles are now building: https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20250408, so this is ready for review.
As mentioned above the Mac seems to cache the old name. To forget the old name on the Mac I seem to be able to:
- Run "Audio MIDI Setup"
- If the Pico is connected and powered on I can see it in Audio MIDI Setup
- Disconnect the Pico (You can't delete the device in Audio MIDI Setup unless you disconnect it)
- Select the Pico in Audio MIDI Setup
- Delete the Pico
- Reconnect the Pico and it will reappear in Audio MIDI Setup
I called usb_midi.set_names() from boot.py per the instru...
CircuitPython version and board name
Hello.
Not sure if this is a bug report or a feature request, but I was wondering if there is a way to prevent IO pins from changing state randomly while the device boots?
I use these ESP32-S3-Zero boards to build wireless light sources, I use 4 pins as PWM outputs to drive some LED drivers. While the ESP32 boots circuitpython, before my program runs, the pins go through a cicle of full on - full off, which makes my LEDs go full on while th...
The pins may be going from unconnected to pulled up. The default reset state for a pin is to enable the internal pullup, which is roughly 50 kohms: this minimizes power draw, believe it or not. We used to reset the pins to float, but changed it to the standard reset state several years ago.
I think the reliable thing to do here is to put a stronger external pull-down resistor on these pins, like 10k. That will ensure that pin fluctuations during restart don't affect your outputs.
Oh!
That's a good idea, and it won't need to many extra components. I like this!
Thanks!!
Let us know if you are still seeing glitches after that!
I'm looking for some help getting the uf2 bootloader flashed onto a SAM E54 Xplained Pro board.
That board has a second microcontroller on it that provides an "EDBG" (Embedded Debugger). The documentation could be better but it says it's usable from Atmel Studio. https://onlinedocs.microchip.com/oxy/GUID-AA358083-AEED-4BA8-8511-9F986D3390A5-en-US-2/index.htmlhttps://ww1.microchip.com/downloads/en/devicedoc/atmel-42096-microcontrollers-embedded-debugger_user-guide.pdf
You can also connect something like a J-Link via SWD: https://onlinedocs.microchip.com/oxy/GUID-AA358083-AEED-4BA8-8511-9F986D3390A5-en-US-2/GUID-561FB075-0555-4441-A9EF-9D50F20850C7.html
Atmel Studio has flash programming features. It is huge to install but oh well.
I can't remember, do you have a BlackMagic probe or a J-Link?
Very nice! It works perfectly!
Thanks again!!
J-Link supports JFlashLiteExe, a simple flasher, and I imagine there may be something similar for other SWD probes
I have a J-Link and an Atmel programmer. I wanted to avoid Atmel Studio, but if it must be...
the J-Link would be the simplest, assuming you have the cables
I do.
the Atmel programmer is probably also fine, and there may be standalone tools. I have only used Atmel Studio a few times, to mess with fuses.
The UF2 bootloader fixes up the fuses (setting BOOTPROT properly) if it detects they are wrong. It sets the fuses properly and then restarts itself.
JFlashLiteExe is part of the J-Link software package
That's a nice feature re: fuses. So I should be able to build the binary and flash with JFlashLiteExe without having to install Atmel Studio?
yes, you can build it in Linux with adafruit/uf2-samdx1 and just flash the .bin
there are a couple of boards already there that might just work or you just need to tweak: generic-atsame54 and same54_xplained
Thanks for the detail issue description, I looked through the modules you covered and I could be mistaken but I think there is an unsigned integer issue.
sdcardio_sdcard_writeblocks/readblocks return mp_uint_t values so the negative errors end up as positive 2s-compliments in common_hal versions of the routines. The mp_unit_t write_blocks routine appears to only return EAGAIN, errors with mangled negative codes or a zero so the return value could be forced negative if non-zero in the calling...
@danh One quick thing before I head out the door: The SAME54-Xplained boards have switched to the SST26VF064 flash part. The new boards with that part are red while the older boards with the original flash part are blue. There may be a few blue boards with the SST26VF064 out there that were made during the chip shortage, but I'm not 100% sure about that. The key difference between the boards (aside from the new red boards not working with CP that I'm fixing) is that red boards have 8MB of flash while the older blue boards have 16MB. This info should go into doc somewhere...
Platforms tested:
- RP2040 -
raspberry_pi_pico - RP2350 -
raspberry_pi_pico2 - SAMD21 -
neopixel_trinkey_m0 - ESP32-S2 -
lolin_s2_mini
OK, great, you did the testing I was going to do! Thanks!
I'm assuming that all functions that call āsdcardio_sdcard_writeblocksā and āsdcardio_sdcard_readblocksā are of int type, so changing the function type to mp_int_t and negating MP_EAGAIN should not break anything.
If do not change the function type, everything will still work. A negative error will become just a large positive number, for example MP_EAGAIN = 11, but if you change it to -11, the functions will return something like 0xFFFFFFF5. But since all calling functions are of int type, t...
The project from this learn guide: https://learn.adafruit.com/cleveland-museum-of-art-pyportal-frame
Is unable to run on CircuitPython 9.2.7 on either Pyportal or Pyportal Titano. I did not try earlier versions to find the last working one, but could if that is helpful.
Here is its output include stacktrace. The project code wraps the exception with a message about the SDCard but the rest of the trace shows the root cause is pystack exhausted in the network stack libraries.
code.py ou...
Did you try adding something like CIRCUITPY_PYSTACK_SIZE=4000 to settings.toml by any chance?
If you put CIRCUITPY_PYSTACK_SIZE=2048 in settings.toml, does it work, and if not 2048, what size works? There is an issue for this, #10189, but we deferred it to 10.0.0. At the very least we should put a warning in the guide.
Thank you for the review! Sorry, haven't finished up the docs yet, was still keeping this in draft mode until I get past this memory hardfault.
What is the reason for calling it rclcpy vs microros or similar?
It does work with CIRCUITPY_PYSTACK_SIZE=2048. Thank you.
I'll close this, and for now we can note this in the guide and it's example settings.toml.
We can probably modify the PIO I2SOutput code to change the word select polarity and it'll be fixed. I'm not sure we ever checked this.
Looks fine to me but the CI is unhappy.
rclcpy
That's what the ROS2 CPython version is called: https://github.com/ros2/rclpy
I'd be ok with either. Originally I was naming the whole thing microros but after deciding to follow the rclpy API in terms of implementation I felt rclcpy was more in line with Circuitpython conventions for adapting existing Cpython modules.
[adafruit/circuitpython] Pull request opened: #10236 increase default PYSTACK size from 1536 to 2048
- Fixes #10235.
- Fixes #10189.
Increase default CIRCUITPY_PYSTACK_SIZE from 1536 to 2048, except on SAMD21. This fixes pystack-exhausted errors for several PyPortal projects, and doesn't use up too much RAM.
Yes, please rebase changes on https://github.com/adafruit/esp-idf/tree/circuitpython-v5.3.2 onto a new circuitpython-v5.4.1 branch. I'll invite you as a repo collaborator there.
Got it. I missed the rclpy reference above, and thought cpy was for CircuitPython, not CPython. I ahve to say, though, that rcl standing for ROS client library is quite obscure.
CircuitPython version and board name
See AdaFruit Forum:
10.0.0 Alpha-2 created 2 drives
Adafruit CircuitPython 10.0.0-alpha.2 on 2025-04-04; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w
Code/REPL
Any code.py
Behavior
10.0.0 Alpha-2 creates 2 drives on Pico W. One showing the files. The other waiting for the user to insert an SD card in the USB drive. The Pico W does not have an SD card slot.
Description
Extra SD drive
##...
None of the dynamic displays would survive the VM but I could copy the primary display to the static memory before the VM shut down.
Yup, that's what I had in mind. I'd only expect it to be called from user code. displayio.DISPLAY and the picodvi init will use the single static allocation that is the display we also use for the terminal.
Originally reported here: https://forums.adafruit.com/viewtopic.php?t=217730.
@tannewt My impression is that this should not be happening on this board?