-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Add support for B-CAMS-OMV shield on STM32H747 disco #92476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add support for B-CAMS-OMV shield on STM32H747 disco #92476
Conversation
Hello @dkouba-atym, and thank you very much for your first pull request to the Zephyr project! |
|
Hello @dkouba-atym and thank you for extending the adapters to one more camera! DCMI is involved with the parallel port protocol, and offloads all the memory filling to DMA. It does not look like the frame size require this much RAM, the 1 MByte of on-chip ram should have been able to store the full frame. The STM32H747 was tested 4 days ago via Arduino Nicla Vision (after the merge of #91506 2 weeks ago). The devkit is different though, with large (32-MByte) external SDRAM. Maybe something in Possibly related as it is DCMI on the same chip: Thanks again for pushing support for it this far! |
Hey @josuah, yes I did try in that configuration — see my note below the log output in my original post. Without SMH: I never see the "captured frame" log message, despite the DMA continuing to work in the background (continuous With SMH: I'm hoping to extend support for SMH mostly because we can, but also because there are other cameras that have higher resolutions that we may want support for in the future, for which the internal RAM is insufficient. Good call on #92354. After a little digging, that is exactly what I have seen when using the SDRAM. Good that I am able to replicate using pure Zephyr...hopefully that helps isolate things. |
Bouncing from #92354 (comment) It seems like the OV5640 driver modifies the pixel clock PLL settings, so that should effectively slow-down the link rather than just insert padding before/after: https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/video/ov5640.c#L797-L809 You might be able to just lower the FPS from the application and try again. |
FYI: |
I think the OV5640 runtime clock tree update is only happening in case of CSI2 based sensor. For a DVP sensor this seems to be rather fixed, hence my quick & dirty patch for trial to directly change the register manually. |
This PR is a WIP to add support for the ST B-CAMS-OMV shield to the STM32H747I Discovery board.
In the process I have ported the changes from #91506 to the H747 board to support the onboard SDRAM.
I am currently having trouble with two things:
Example of what happens with SMH enabled:
Without SMH enabled,
HAL_DCMI_FrameEventCallback
continues to return forever, but we never see a completed frame.I don't know enough about the internals to debug this as quickly as you all might and I would appreciate any pointers.