Skip to content

[pull] main from adafruit:main#98

Merged
pull[bot] merged 38 commits intoryesearchanddevelopment:mainfrom
adafruit:main
Sep 24, 2025
Merged

[pull] main from adafruit:main#98
pull[bot] merged 38 commits intoryesearchanddevelopment:mainfrom
adafruit:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Sep 24, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

jepler and others added 30 commits May 27, 2025 17:05
This is a newer abstraction in micropython; it'll for instance
allow background tasks to be checked once per ms in the internal
select module modselect.

Because `MICROPY_INTERNAL_EVENT_HOOK` is used in a few locations,
our own CIRCUITPY-CHANGE call to `RUN_BACKGROUND_TASKS` can be
nixed. Specifically, `mp_event_handle_nowait` calls
`MICROPY_INTERNAL_EVENT_HOOK` so paths from it don't need
`RUN_BACKGROUND_TASKS` anymore.
See https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/user-guide-esp32-c3-lyra.html
This commit adds support for the status LED.

It's not 100% clear to me why the default neopixel_write implementation
doesn't work, but it seems that deleting the RMT channel triggers some
sort of glitch signal that clears the WS2812C LED.

Tested on this board:
- console/REPL over USB/UART (connection works but is not stable)
- web interface and editor over wifi
- audiomp3 playback (sounds terrible)
- neopixel library
- Enabled BUSIO in mpconfigport.mk
- Stubs added for busio.I2C & busio.SPI
- Implemented busio.UART to basic working functionality
- Added MCU-specific UART data in peripherals/<mcu>/max32_uart.c & max32_uart.h
- Still have a couple issues where UART generates garbage characters or
  does not respond to timeouts / generate asynchronous IRQs
- Add debug-dap.sh to spawn OpenOCD process & gdb-multiarch process for debugging.
  Requires MaximSDK install & path settings inside this script.
  Also depends on gdb-multiarch and connected CMSIS-DAP probe over USB.
- debug-dap.gdb simply holds the gdb commands for this script

+ small style fix on common-hal/microcontroller/Pin.c
- Graceful recovery from timeouts added
- Remaining issue still exists where a timeout occurs after a while
- No ISR for UART writes, but uses timeouts
- Reads use ISRs, but also incorporate timeouts
- Formatting & codespell fixes from pre-commit
- Call NVIC_SetRAM in supervisor/port.c to move NVIC table to RAM, enabling ISR RAM remapping.
- Rename UART ISR to be generic for any UART IRQn.
- Remove background led writes from background.c.
- Data structure and constructor for I2C (tested)
- Lock and probing functions complete and tested

TODO: Implement I2C Write, Read, Wr/Rd

Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
Currently coupled a bit to APARD32690-SL board. Will refactor after testing BUSIO.SPI

Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
TODO:
- Figure out assigning CS Pins for SPI
- Test & Debug SPI / I2C

Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
…ipherals.

Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
Also reformatted pinmaps for SPI/I2C/UART on MAX32690

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
- Fixed errors with peripheral bus hardware descriptions in MAX32690 "peripherals/"
- Resolved all FIXME comments
- Removed unused ringbuf API from common-hal/busio/UART.c

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
- Add correct ringbuffer handling code to ports/analog/common-hal/UART.c

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
- Used direct hardware values to rely on common HW implementation
- Accounted for TX Lockout conditions in Transmit FIFO causing errors

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
- Probe function caused infinite loops / unreliable ACK values
- Replaced with probe-function with low-level routines

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
- Use existing error messages from locale/circuitpython.pot for
  most error messages
- Replace ConnectionError (networking specific) calls with others
  (usually RuntimeError)
- Remove '\n' from mp error calls (since they add it already)
- Remove some redundant validation code that repeats checks done
  by shared-bindings/common-hal/busio code. e.g. pin validation

Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
- Use m_malloc_without_collect storage API change from CircuitPython
- Remove err number for asynchronous read error; just report it

Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
- Remove excess argument from UART ringbuf malloc call
- Remove unused err and intfl0 in I2C driver to remove warnings

Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
Brandon-Hurst and others added 8 commits September 22, 2025 20:33
- Reuse more messages in locales/circuitpython.pot in BUSIO
- Remove UART write timeout
- Refine some error handling for SPI initialization

Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
- Add clear flags + Shutdown/Init to I2C constructor
- Explicitly set frequency
- Add failsafe in probe function if MST mode disabled
  (can happen in some error conditions)

- Fix Makefile bug with missing "\" for source files

Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
Turns out it was a workaround for a bad LED on one particular board.
M5Stack CoreS3 refactor/fix M5Bus pins definitions
mpconfig: Use RUN_BACKGROUND_TASKS as the micropython event hook
Initial support for ESP32-C3-Lyra-V2 dev board
@pull pull bot locked and limited conversation to collaborators Sep 24, 2025
@pull pull bot added the ⤵️ pull label Sep 24, 2025
@pull pull bot merged commit 10de69c into ryesearchanddevelopment:main Sep 24, 2025
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants