Commit Graph

89 Commits

Author SHA1 Message Date
Andrew Leech
e56fa55dec ports/stm32: Replace FatFS calls with VFS abstraction.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
2025-10-14 12:17:12 +11:00
iabdalkader
d7e0a0fc96 misc: Fix code formatting.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-10-05 13:15:02 +02:00
iabdalkader
f8e110ca91 misc: Format code.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-28 19:45:07 +02:00
iabdalkader
7952364d20 ports/stm32: Add ADC12 RIF config.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-27 11:39:27 +02:00
iabdalkader
cec54bab3e ports/stm32: Add support for CRC32.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-25 09:49:23 +02:00
iabdalkader
01113ebee9 stm32: Disable clock gating during sleep for STM32N6 peripherals
Remove individual peripheral sleep clock enable/disable calls and instead
enable all AHB/APB peripheral clocks during sleep mode. This is needed
because MicroPython doesn't manage peripheral sleep clocks individually.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-16 18:20:38 +02:00
iabdalkader
616ce71b96 ports/stm32: Implement hardware accelerated CRC.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-11 22:08:58 +02:00
iabdalkader
66c8e7e8d5 ports/all: Update framebuffer API.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-02 16:05:55 +02:00
iabdalkader
cf7b84d682 ports/all: Remove old profiling macros.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-24 14:40:02 +02:00
Kwabena W. Agyeman
c601c706fe ports/stm32: Simplify CSI_DMA_MAX_SIZE logic. 2025-08-16 18:50:28 -07:00
Kwabena W. Agyeman
170a7eb107 ports/stm32: Move dma_queue to port bits. 2025-08-16 18:36:29 -07:00
Kwabena W. Agyeman
9778028f40 ports/stm32: Add N6 error message for unsupported modes. 2025-08-16 18:36:12 -07:00
Kwabena W. Agyeman
feaca6af12 ports/stm32: Fix DMA transfer of small buffer sizes.
HAL_DCMI_Start_DMA() only sets up one node in the circular linked-list
when the transfer size is < 64KB. This causes a user setting transfer
error which locks up the DMA hardware.

The fix is to dynamically make the link list linear on smaller sizes
and circular on larger sizes.
2025-08-16 18:36:12 -07:00
Kwabena W. Agyeman
2e525c504b ports/stm32: Fix N6 csi camera config settings.
Fixes support for mono bpp == 2 and rgb/yuv swap.
2025-08-16 18:36:10 -07:00
Kwabena W. Agyeman
76fc074c0f ports/stm32: Set oneshot on MDMA snapshot to invalidate. 2025-08-15 18:11:20 -07:00
Kwabena W. Agyeman
2c14af97e7 ports/stm32: Fix JPEG mode 3 support. 2025-08-15 18:11:17 -07:00
Kwabena W. Agyeman
080641c827 ports/stm32: Fix DMA line size error calculation.
The error calculation needs to be on the raw byte size.
2025-08-15 17:29:44 -07:00
Kwabena W. Agyeman
cc137456dc ports/stm32: Only enable frame int manually in jpeg mode.
The frame interrupt was being enabled for non-JPEG transfers,
causing massive image corruption and out-of-sync issues on the M4
and M7. This interrupt only needs to be enabled for JPEG mode
where the size of the image is not known.
2025-08-15 17:29:08 -07:00
Kwabena W. Agyeman
908d612ace ports/stm32: Fix SystemClock_config() hard faulting. 2025-08-15 15:05:16 -07:00
Ibrahim Abdelkader
8217c22fee
Merge pull request #2807 from openmv/update_micropython
lib: Update to MicroPython 1.26.0.
2025-08-15 20:56:08 +03:00
iabdalkader
d30b2e8b71 ports/stm32: Deinit I2C target if enabled.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-15 19:20:46 +02:00
iabdalkader
75f3ee3caf ports/stm32: Remove HAL_InitTick call.
This is already called from HAL_Init.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-15 19:20:46 +02:00
iabdalkader
bbfe90aa74 ports/stm32: Configure system clock before HAL_Init.
This ensures SystemCoreClock is updated after the
system clock has been configured.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-15 19:20:46 +02:00
iabdalkader
49d830d6dc ports/stm32: Fix build.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-15 19:20:46 +02:00
iabdalkader
18a53b7fee ports/stm32: Use MicroPython GPDMA handles.
Now that MicroPython uses GPDMA for N6, the GPDMA handles
as well as IRQs are shared.

Note: care must be taken when choosing GPDMA channels
to avoid conflicts with MicroPython's channels.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-15 19:20:46 +02:00
iabdalkader
cb50ad479a ports/all: Use private CSI resolution table.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-14 11:40:33 +02:00
iabdalkader
9112cf2aae misc: Clean-up CSI flags.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-09 12:00:59 +02:00
Ibrahim Abdelkader
294eaf309f
Merge pull request #2795 from openmv/fix_dma_sec
Some checks failed
🔥 Firmware Build / build-firmware (ARDUINO_GIGA) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_33_BLE_SENSE) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_RP2040_CONNECT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NICLA_VISION) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_PORTENTA_H7) (push) Has been cancelled
🔥 Firmware Build / build-firmware (DOCKER) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV2) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4P) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMVPT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_AE3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_N6) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_RT1060) (push) Has been cancelled
🔥 Firmware Build / code-size-report (push) Has been cancelled
🔥 Firmware Build / stable-release (push) Has been cancelled
🔥 Firmware Build / development-release (push) Has been cancelled
ports/stm32: Fix N6 DMA security config.
2025-08-03 12:25:55 +03:00
iabdalkader
84b1814ae7 ports/stm32: Fix N6 DMA security config.
Fix DMA security config for non-circular channels.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-03 10:39:51 +02:00
Kwabena W. Agyeman
a15fb0b831 ports/stm32: Add max transfer sizes for the N6. 2025-08-03 09:45:47 +02:00
Kwabena W. Agyeman
c9dfbb7650 ports: Add GPU tranform support. 2025-07-31 13:26:14 -07:00
Kwabena W. Agyeman
47c5618231 lib/imlib: Add transform argument to draw_image. 2025-07-31 13:13:45 -07:00
Kwabena W. Agyeman
20839405a2 lib/imlib: Add transform support to GPU drivers. 2025-07-31 13:12:48 -07:00
iabdalkader
60d015c82d ports/stm32: Use HAL_InitTick to init SysTick.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-27 15:35:51 +02:00
iabdalkader
7f20081d9c ports/stm32: Use the new framebuffer API.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-23 18:24:55 +02:00
iabdalkader
f3e530cfec ports/stm: Re-enable frame interrupt in JPEG mode.
This macro was removed so FRAME_IT was not enabled.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-23 11:03:43 +02:00
Kwabena W. Agyeman
bacfb7aeb7 modules/py_fir_lepton: Remove lepton control through fir module. 2025-07-21 23:10:40 -07:00
iabdalkader
95d1c0a6cc ports/all: Switch to gnu11 standard.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-21 17:51:07 +02:00
Ibrahim Abdelkader
c736ea4076
Merge pull request #2772 from kwagyeman/kwabena/remove_buzzer
Some checks are pending
🔥 Firmware Build / build-firmware (ARDUINO_GIGA) (push) Waiting to run
🔥 Firmware Build / build-firmware (ARDUINO_NANO_33_BLE_SENSE) (push) Waiting to run
🔥 Firmware Build / build-firmware (ARDUINO_NANO_RP2040_CONNECT) (push) Waiting to run
🔥 Firmware Build / build-firmware (ARDUINO_NICLA_VISION) (push) Waiting to run
🔥 Firmware Build / build-firmware (ARDUINO_PORTENTA_H7) (push) Waiting to run
🔥 Firmware Build / build-firmware (DOCKER) (push) Waiting to run
🔥 Firmware Build / build-firmware (OPENMV2) (push) Waiting to run
🔥 Firmware Build / build-firmware (OPENMV3) (push) Waiting to run
🔥 Firmware Build / build-firmware (OPENMV4) (push) Waiting to run
🔥 Firmware Build / build-firmware (OPENMV4P) (push) Waiting to run
🔥 Firmware Build / build-firmware (OPENMVPT) (push) Waiting to run
🔥 Firmware Build / build-firmware (OPENMV_AE3) (push) Waiting to run
🔥 Firmware Build / build-firmware (OPENMV_N6) (push) Waiting to run
🔥 Firmware Build / build-firmware (OPENMV_RT1060) (push) Waiting to run
🔥 Firmware Build / code-size-report (push) Blocked by required conditions
🔥 Firmware Build / stable-release (push) Blocked by required conditions
🔥 Firmware Build / development-release (push) Blocked by required conditions
ports/stm32: Remove old buzzer module.
2025-07-21 11:03:33 +03:00
Kwabena W. Agyeman
0390360a92 ports/stm32: Fix typo in stm32_pwm. 2025-07-21 09:24:57 +02:00
Kwabena W. Agyeman
ccb947924a ports/stm32: Remove old buzzer module. 2025-07-20 22:33:08 -07:00
iabdalkader
a82169dae2 ports/stm32: Use common alignment macros.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-16 11:18:56 +02:00
iabdalkader
58fe4f33b5 ports/stm32: Refactor CSI PWM config.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-12 17:12:37 +02:00
iabdalkader
cb0b0bc224 ports/stm32: Add timer helper functions.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-12 17:12:37 +02:00
iabdalkader
07d3e3f559 ports/stm32: Support using DCMI and DCMIPP.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-12 17:12:34 +02:00
iabdalkader
77d79ba58a ports/stm32: Decouple CSI instance used by main driver.
This patch removes the assumption that the main driver
always uses the default CSI instance. Instead, the CSI
instance used by each interface is now explicitly set.

This prepares the driver for supporting multiple CSIs
using the main driver.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-12 17:12:34 +02:00
iabdalkader
a48e545bc0 ports/stm32: Disable DCMI pins init for DCMIPP.
DCMIPP is used exclusively for CSI sensors now.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-12 17:12:34 +02:00
Ibrahim Abdelkader
f7aa6985e5
Merge pull request #2658 from openmv/remove_uvc2
Some checks failed
🔥 Firmware Build / build-firmware (ARDUINO_GIGA) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_33_BLE_SENSE) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_RP2040_CONNECT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NICLA_VISION) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_PORTENTA_H7) (push) Has been cancelled
🔥 Firmware Build / build-firmware (DOCKER) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV2) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4P) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMVPT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_AE3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_N6) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_RT1060) (push) Has been cancelled
🔥 Firmware Build / code-size-report (push) Has been cancelled
🔥 Firmware Build / stable-release (push) Has been cancelled
🔥 Firmware Build / development-release (push) Has been cancelled
ports/stm32: Remove UVC firmware.
2025-07-09 11:31:53 +03:00
Ibrahim Abdelkader
1b59395beb
Merge pull request #2759 from kwagyeman/kwabena/enable_n6_lcd
boards/OPENMV_N6: Enable SPI LCD/TV Displays.
2025-07-09 10:31:50 +03:00
Kwabena W. Agyeman
e14bbe586d lib/imlib: Fix update_jpeg_buffer to update from the passed image.
framebuffer_update_jpeg_buffer was previously bugged as it always
updated the jpeg buffer from the frame buffer versus the image
object it was attached to. e.g. img.flush() always flushed the
frame buffer and not the image object it was called on.
2025-07-07 20:39:29 -07:00