Skip to content

Conversation

josuah
Copy link
Contributor

@josuah josuah commented Jul 20, 2025

west build --board nucleo_n657x0_q//sb --shield st_b_cams_imx_mb1854 samples/subsys/usb/uvc/

I had this error at startup:

[00:00:00.011,000] <err> video_common: failed to write to I2C register
                                       37 16 01                                         |7..
[00:00:00.011,000] <err> video_common: Failed to write to register 0x3716
[00:00:00.011,000] <err> video_imx335: Unable to initialize the sensor
*** Booting Zephyr OS build v4.2.0-86-g2ea7c71a00fb ***
[00:00:00.022,000] <inf> uvc_sample: Waiting the host to select the video format
uart:~$

Which is due to gpio-hog; not working when placed on a gpio-nexus. I tested by probing the FPC, the pinout from the user manual is correct:

scrot_20250721_003301_1115x292

It still does not work because UVC does not use the crop/compose API so the frame is too big for the RAM, and the format is the one from the raw sensor. It will need more patch to get the image through end-to-end.

Not tested with STM32N6570-DK as I do not have it.

Thank you!

josuah added 3 commits July 20, 2025 21:29
Add an instance for DCMIPP as well as devicetree definitions to allow
plugging Raspberry Pi 22 pins or 15 pins shields via the csi_* devicetree
labels.

Signed-off-by: Josuah Demangeon <[email protected]>
On the Nucleo N6 board, extra delay is required to get the IMX335
respond to the I2C commands in time. This was observed with the
st_b_cams_imx_mb1854 shield and the nucleo_n657x0_q board.

Signed-off-by: Josuah Demangeon <[email protected]>
The "gpio-hog;" devicetree property configuring the "power enable" pin at
boot was not working, due to being placed on a gpio-nexus. This is not
supported and lead the gpio-hog inactive. Instead, let the board specify
their CSI_IO0 and CSI_IO1 pin as GPIO hogs with status = "disabled",
letting shields enable them and set the direction as needed.

Signed-off-by: Josuah Demangeon <[email protected]>
@josuah josuah added platform: STM32 ST Micro STM32 area: Video Video subsystem block: HW Test Testing on hardware required before merging labels Jul 20, 2025
@zephyrbot zephyrbot added area: Shields Shields (add-on boards) platform: NXP Drivers NXP Semiconductors, drivers labels Jul 20, 2025
Copy link

@kartben kartben assigned erwango and unassigned kartben Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Shields Shields (add-on boards) area: Video Video subsystem block: HW Test Testing on hardware required before merging platform: NXP Drivers NXP Semiconductors, drivers platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants