.. _changelog_v4_0_2: 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 :mod:`sensor` improvements. STM32 ADC and the image-transfer path changed — read the breaking changes below. .. contents:: On this page :local: :depth: 1 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**; :func:`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. - **Sensor** — :func:`sensor.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 :class:`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. .. _v4_0_2_behavior: STM32 ADC alignment and full MDMA offload *(behavior)* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The STM32 ADC driver was aligned with the upstream MicroPython implementation, so :class:`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 :class:`machine.ADC` readings and timing-sensitive capture code against the aligned ADC driver and full MDMA offload (:ref:`the behavior changes `). All other scripts run unchanged.