v4.0.2

v4.0.2 introduces the initial RP2040 port (Raspberry Pi Pico / Arduino Nano RP2040 Connect board files), PixArt PAJ6100 and MT9M114 sensor support, a PDM audio filter library, and sensor improvements. STM32 ADC and the image-transfer path changed — read the breaking changes below.

Highlights

  • Initial RP2040 port — Raspberry Pi Pico / Arduino Nano RP2040 Connect board files.

  • New sensors — PixArt PAJ6100 and a working MT9M114 driver.

  • PDM audio filter library; sensor.set_framerate() works for any FPS.

  • Breaking: the STM32 ADC driver was aligned with upstream and full MDMA image-transfer offload was enabled — see the breaking changes.

New features

  • RP2040 port — added the RP2040 port with Raspberry Pi Pico and Arduino Nano RP2040 Connect board files (initial bring-up; WiFi/Bluetooth land in v4.1.0).

  • PixArt PAJ6100 camera sensor support and a working MT9M114 driver.

  • PDM audio filter library added to the audio path.

  • Sensorsensor.set_framerate() now works for any FPS, a method to read the actual XCLK frequency was added, additional sensor resolutions are supported, and a disable_full_flush framebuffer option was added.

Other changes and improvements

  • Snapshot error messages were made clearer; Ethernet updates and a low-power mode were added (Portenta).

Bug fixes

  • Fixed the pyb.Servo timer channel state, the LSM6Dx IMU driver, the STM32 H7 dma_nohal_init, and a missing framesize init check.

Hardware and board support

  • Raspberry Pi Pico / Arduino Nano RP2040 Connect — initial board files.

  • PixArt PAJ6100 and MT9M114 camera sensors.

Breaking API changes

User-visible API breaks between v4.0.1 and v4.0.2.

Both breaking changes are behavior changes (same API, different results) — re-check affected scripts. Each commit hash links to its diff on GitHub.

STM32 ADC alignment and full MDMA offload (behavior)

The STM32 ADC driver was aligned with the upstream MicroPython implementation, so machine.ADC behavior/readings may differ slightly from previous releases. Separately, full MDMA offload of image transfers was enabled, which speeds up capture but changes the transfer path and timing. Re-check ADC-dependent code and timing-sensitive captures.

Commits: 661169f85, 772bfab26

Migration checklist

Re-validate any machine.ADC readings and timing-sensitive capture code against the aligned ADC driver and full MDMA offload (the behavior changes). All other scripts run unchanged.