Commit Graph

59 Commits

Author SHA1 Message Date
iabdalkader
6ddd0b0faf ports/stm32: Fix I2C lockup on bus error.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-30 23:43:20 +02:00
iabdalkader
5aec3162ec ports/stm32: Fix DCMI pipe reset.
Since the DCMI is not reinitialized on every reset anymore,
the pipe states must be reset to reconfigure them. The HAL
drivers never just handle these things as usual.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-30 23:43:20 +02:00
iabdalkader
1ddd69bfbe ports/stm32: Fix spi_transfer_abort.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-29 17:20:49 +02:00
iabdalkader
7f4e5e81c7 common/csi: Abort CSIs on soft-reboot.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-29 17:20:49 +02:00
iabdalkader
64fa8c472f ports/stm32: Implement shutdown op.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-29 17:20:49 +02:00
iabdalkader
822fc11003 ports/stm32: Fix PSRAM settings.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-29 17:11:27 +02:00
Kwabena W. Agyeman
7d2b334066 ports/stm32: Fix all sensor RGB565/GRAYSCALE/BAYER/YUV422 modes.
Tested against all our supported sensors. Everything works.
2025-06-27 23:27:16 -07:00
Ibrahim Abdelkader
81dd44aef4
Merge pull request #2735 from openmv/refactor_csi_init
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
misc: Refactor CSI initialization code.
2025-06-27 22:42:05 +03:00
iabdalkader
4ded9fba91 common: Remove xalloc.
Originally meant to abstract gc_collect but we could just use
m_alloc and friends. Also was meant to provide functions like
alloc0, alloc_maybe etc.. which are all available in MP anyway.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-27 14:50:16 +02:00
iabdalkader
a266ac33f1 ports/all: Fix calls on uninitialized CSIs.
Detection flag should be set after CSIs are detected in
the scanning code, and functions that loop over CSIs
should check it.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-27 10:03:48 +02:00
iabdalkader
02f42b6837 ports/nrf: Add support for multiple CSIs.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-25 21:15:24 +02:00
iabdalkader
be6b3fa80d ports/rp2: Add support for multiple CSIs.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-25 21:15:24 +02:00
iabdalkader
e4ee291028 ports/alif: Add support for multiple CSIs.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-25 21:15:24 +02:00
iabdalkader
668b1c2f74 ports/mimxrt: Add support for multiple CSIs.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-25 21:15:24 +02:00
iabdalkader
25b7b8cbb2 ports/stm32: Add support for multiple CSIs.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-25 21:15:24 +02:00
Kwabena W. Agyeman
c4795d3191 ports/stm32: Increase SPI DMA efficency.
The SPI fifo triggers a request when it has 4-bytes of data allowing
for more efficent bus usage. The same technique is used on the H7
to reduce system bus matrix resources.
2025-06-24 10:19:31 -07:00
Kwabena W. Agyeman
3984ec783f ports/stm32: Move VOSPI memory near DMA controller.
On the STM32N6 the DMA memory meant to be used with the SPI bus is
in the low-performance memory domain. Moving the DMA buffers and
linked list buffers there reduces the AHB cycle time by the DMA
controller making it more stable.
2025-06-24 10:19:31 -07:00
Kwabena W. Agyeman
fc0cc40a31 drivers/sensors/lepton: Update lepton driver with asynchronous fb.
The FLIR Lepton driver now continously receives frames in the background
that are stored in allocated frame buffers. On snapshot the stored frame
is post-processed to produce a color an image.

* Transpose now works allowing for image rotation with IMU.
* Bilinear scaling is now used when drawing at a higher res.
2025-06-24 10:19:29 -07:00
Kwabena W. Agyeman
89d60c8002 ports/stm32: Add missing init bits to fix glitches. 2025-06-23 14:40:11 -07:00
Kwabena W. Agyeman
1dece0b461 ports/stm32: Fully implement N6 GPU driver for draw_image. 2025-06-23 14:29:32 -07:00
Kwabena W. Agyeman
8f81f16963 ports/stm32: Fix NEMA GPU driver.
* You have to clean and invalidate the destination image so that
  the processor writes out the full image and so that the processor
  doesn't flush cache lines ontop of the GPU writing the image.
* The ICACHE doesn't automatically flush itself after a draw operation.
  Depending on the situation, it will just hold the entire source
  image internally and never read it again. In particular, when
  scaling something like 160x120 it just caches the whole image
  and never reads it again.
2025-06-23 12:34:41 -07:00
iabdalkader
43c6b6c5fd ports/stm32: Fix GPU drawing offset. 2025-06-23 12:34:41 -07:00
iabdalkader
b04f2fcf6a ports/all: Refactor CSI I2C bus.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-23 14:14:02 +02:00
iabdalkader
e5178be046 ports/stm32: Reset pipes states on abort.
HAL STOP doesn't seem to do so.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-23 13:04:45 +02:00
iabdalkader
19f818c49f ports/alif: Refactor CSI.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-23 12:49:57 +02:00
iabdalkader
fef2e1dc8b ports/stm32: Refactor CSI.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-23 12:41:25 +02:00
iabdalkader
6cfd8dd82b ports/nrf: Refactor CSI. 2025-06-23 12:41:21 +02:00
iabdalkader
f1286053e9 ports/mimxrt: Refactor CSI.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-23 12:41:16 +02:00
iabdalkader
7db2782d4b ports/rp2: Refactor csi.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-23 12:41:16 +02:00
iabdalkader
f2823a53c1 misc: Disable rtl-loop2_doloop for M55.
Current toolchains are broken.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-20 14:20:55 +02:00
Kwabena W. Agyeman
acd4506e5a ports/stm32: Fix missing sleep clocks.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-20 14:20:52 +02:00
iabdalkader
deba7c05a6 modules/py_audio: Add support for MDF. 2025-06-19 16:24:38 +02:00
iabdalkader
6793761eb8 ports/stm32: N6 support.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-19 16:13:14 +02:00
Kwabena W. Agyeman
8c842d1306 ports/alif: Fix SPI default clock polarity to match other ports. 2025-06-17 15:29:01 -07:00
iabdalkader
ef44dbc03f micropython: Update submodule.
Add support for Alif machine_pin IRQ.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-17 18:28:50 +02:00
iabdalkader
6261074439 ports/alif: Disable SPI DMA mode.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-16 14:10:43 +02:00
iabdalkader
c6e8b499b9 ports/alif: Implement spi_transfer with poll and timeout.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-16 14:01:39 +02:00
Sighthesia
59e36120d9
ports: Add conditional compilation for py_fir_init0() 2025-06-10 22:57:31 +08:00
iabdalkader
7be7bb3ded ports/stm32: Make dma handle static. 2025-06-07 16:34:54 +02:00
iabdalkader
333eea86da modules/py_display: Pass DT to display controller initializer.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-02 16:11:59 +02:00
iabdalkader
6ddc772c2f modules/py_display: Use board-defined DSI PLL config.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-02 10:01:24 +02:00
iabdalkader
bbb2c2b8fc ports/alif: Define sign_alt flag.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-01 10:11:59 +02:00
iabdalkader
ec1ead267d ports/mimxrt: Define sign_alt flag.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-01 10:11:59 +02:00
iabdalkader
009ca76049 ports/stm32: Define sign_alt flag.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-01 10:11:55 +02:00
Kwabena W. Agyeman
aeda4eb09c ports/mimxrt: Fix unitialized edma_config fb pointer. 2025-05-05 15:34:22 -07:00
iabdalkader
78d1db2e81 ports/alif: Remove old event poll macro. 2025-05-05 17:17:07 +03:00
Kwabena W. Agyeman
1c377a506e ports/alif: Change HP U55 config to SRAM_OPSI.
The correct performance information should be reported now when compiling the HP ROMFS img.
2025-04-27 14:56:45 -07:00
iabdalkader
7e668073e7 ports/nrf: Refactor framebuffer API to accept a context.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-27 09:04:30 +03:00
iabdalkader
5b412cf953 ports/rp2: Refactor framebuffer API to accept a context.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-27 09:04:30 +03:00
iabdalkader
a421777d42 ports/alif: Refactor framebuffer API to accept a context.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-27 09:04:27 +03:00