v3.9.4¶
v3.9.4 adds a buzzer module, Himax HM01B0 motion detection ioctls
(with low-power wake-on-motion examples), MT9V034 readout-window control,
Ethernet low-power functions, an OV7670 camera driver, and the Arduino Nano
33 BLE Sense camera. It also lands a large batch of JPEG / LCD / TV speedups.
The VSYNC output API was replaced with a callback and the MT9V034 gain/exposure
math was corrected — read the breaking changes below.
Highlights¶
Buzzer module — a new
buzzermodule (freq(),duty(),RESONANT_FREQ) on the OpenMV Pure Thermal.HM01B0 motion detection — new Himax motion-detection ioctls plus a low-power wake-on-motion example.
MT9V034 readout window — control the global-shutter readout window via
sensor.ioctl().New cameras / boards — basic OV7670 driver, Arduino Nano 33 BLE Sense camera, and the Bormio board.
Faster pipeline — rewritten SIMD JPEG encoder, faster debayering, and big LCD/TV transfer speedups.
Breaking:
sensor.set_vsync_output()was replaced withsensor.set_vsync_callback()and the MT9V034 gain/exposure math was corrected — see the breaking changes.
New features¶
Buzzer — added a
buzzermodule withbuzzer.freq(),buzzer.duty(), and abuzzer.RESONANT_FREQconstant (OpenMV Pure Thermal).HM01B0 motion detection — added the
IOCTL_HIMAX_MD_ENABLE/MD_WINDOW/MD_THRESHOLD/MD_CLEARandIOCTL_HIMAX_OSC_ENABLEioctls, with a Himax motion-detection example and ahimax_wakeup_on_motion_detection.pylow-power wake example.MT9V034 readout window — added
IOCTL_SET_READOUT_WINDOW/IOCTL_GET_READOUT_WINDOWfor MT9V034 readout-window control viasensor.ioctl().Ethernet low power — added Ethernet power-down / low-power functions.
Portenta — added enable/disable external-oscillator callback functions.
Other changes and improvements¶
Rewrote the JPEG encoder with SIMD and sped up Bayer→YCbCr encoding, kept the hardware JPEG core powered during script execution, sped up debayering (~19.5 ms for VGA), offloaded JPEG compression to MDMA, accelerated the TV/LCD transfer paths with SIMD/efficient DMA, and massively reduced SPI LCD bus usage. Added a USB3320 ULPI PHY driver for high-speed USB.
Bug fixes¶
Camera and sensors:
Fixed the HM01B0 driver init/streaming and tuned its AE target / max gain, corrected MT9V034 AGC/AEC gain clamping, and fixed OV5640 autofocus firmware loading (byte order).
Display:
Fixed SPI LCD DMA transfers larger than 64 KB, LCD output polarity, and LCD bus stability (AXI QOS).
System and connectivity:
Fixed the SDMMC instance used by the CYW43 WiFi driver (with a board-defined SDMMC instance), improved FLIR Lepton DMA efficiency (VOSPI raised to 20 MHz on H7), fixed Portenta low-power / standby behavior (PMIC SW1 current limit, Ethernet and ULPI low-power), made the RTSP server tolerate out-of-order
CSeqandPLAY Rangeheaders (FFPLAY), fixed linker stack 8-byte EABI alignment, and fixed a broken import in the Portentamqtt_sub.pyexample.
Hardware and board support¶
OV7670 camera sensor — basic driver.
Arduino Nano 33 BLE Sense — camera sensor driver (nrf port) with reset-pin and I2C bus fixes.
HM01B0 — added a 320x320 resolution.
Bormio — PLL clock configuration, flash layout, and GPIO PORT K (also enabled on Portenta).
USB3320 ULPI PHY — high-speed USB.
Breaking API changes¶
User-visible API breaks between v3.9.3 and v3.9.4. Scope: Python C-modules in
modules/ and Python libraries in scripts/libraries/.
Each change is tagged with its impact:
major — affects most scripts that used the feature; you will need to port code.
behavior — same API, different results; re-check tuned scripts.
Changes are grouped by impact in that order. If you just want to port your code, jump to the migration checklist at the end. Each commit hash links to its diff on GitHub.
VSYNC output replaced with a callback (major)¶
sensor.set_vsync_output(pin) was removed and replaced with
sensor.set_vsync_callback(callback). The VSYNC line no longer drives a
Pin directly; instead a Python callable is invoked with the VSYNC state,
and your callback toggles the Pin itself. Code that used
sensor.set_vsync_output() must be ported (see the updated
vsync_gpio_output.py example).
Commits: 5bbe25c20
MT9V034 gain/exposure math corrected (behavior)¶
The MT9V034 clock speed and gain/exposure math were corrected, so
sensor.set_auto_gain() / sensor.set_auto_exposure() now produce
accurate (and therefore different) values than before. Scripts that hard-coded
compensating gain/exposure values to work around the old incorrect math on
MT9V034 global-shutter cameras should drop those workarounds and re-tune.
Commits: 4420536c4
Migration checklist¶
For a clean port to v3.9.4 the typical work is:
Replace
sensor.set_vsync_output(pin)withsensor.set_vsync_callback(callback)and toggle thePinfrom inside the callback (the VSYNC change).Re-tune any MT9V034 gain/exposure workarounds against the corrected math (the MT9V034 change).
All other scripts run unchanged.