cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with Nucleo STM32-H7A3ZI-Q and DCMI with OV5640 camera

CEarl.2
Associate II

 

I've been trying to connect to multiple OV5640 camera sensors from different brands and even STM32's official board B-CAMS-OMV on the STM32-H7A3ZI-Q nucleo board and have had no luck with it whatsoever. Does ST have any projects that are built off this board to interface with the OV5640 drivers that ST provides? The one that is provided with the STM32 b-u585I-IOT2a board works just fine and when comparing against the two projects the function calls are nearly identical except for the hardware initialization since the u585 uses GPDMA rather than DMA. Whenever my project is ran across the H7A board the DMA will always pull 0's. I know that the i2c communication works properly since I am able to pull the device ID from the camera.

 

Any help is greatly appreciated.

 

 

7 REPLIES 7

I'm not sure this officially targets the NUCLEO boards

https://www.st.com/en/evaluation-tools/b-cams-omv.html

So I'm not sure what pins it needs, nor if those are available on the NUCLEO.

You'd do well to check the schematics for this and the DISCO boards under the "CAD Resources" tabs of the assorted boards.

ST typically just furnishes software for things they ship in a very narrow sense, and not off-label usage and third party gear.

Any available driver code will be under the Driver\BSP\Components type trees in the CubeH7 and perhaps CubeXX repo's for other part families. I'd look at others too, as the DCMI has a relatively consistent design over multiple part generations.

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KDJEM.1
ST Employee

Hello @CEarl.2,

As shown in the below figure, the camera module is connected to the DCMI through the following signal types:
• DCMI clock and data signals
• I2C configuration signals

KDJEM1_0-1720449016940.png

 

For that, it is necessary to refer to the Camera module and to the board Schematics and MCU datasheet and check the required pins for this connection.

To find the required pins used to connect B-CAMS-OMV module with an MCU you can refer to UM2779.

This connection made with CN4 connector as shown in the below table.

KDJEM1_4-1720449180460.png

To find the required pins used to connect STM32H7A3  with an camera module, I advise you to refer to the datasheet and search the pins of DCMI clock and data signals and I2C configuration signals.

Also you can find the pins connection of NucleoH7A3ZI-Q with an camera module by using STM32CubeMX, choose A3ZI-Q then enable DCMI.

 

Also, I advise you to get inspired fromDCMI examples these example used the  B-CAMS-OMV and STM32H747I-Discovery board.

Could you please take a look at Introduction to digital camera interface (DCMI) for STM32 MCUs - Application note section 6.4 DMA configuration.

Are you using the STM32CubeMx for generation code? 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Yes, I am using the Cube IDE to generate my code to build out the DCMI interface. I find myself able to access the device over i2c without and issue, and I am using the STM32 provided driver code to access the chip. I can tell that part is working because the i2c functions of the driver code work just fine. I have the DCMI plugged in properly to my board as well.

 

KDJEM.1
ST Employee

Hi @CEarl.2 ,

 

Which STM32CubeIDE version are you using?

Edit link: Please make sure that the DMA init order is set correctly, please take a look at this post Solved: MX_DMA_Init order in the main.c file generated by ... - Page 4 - STMicroelectronics Community.

I recommend you this FAQ: DMA is not working on STM32H7 devices may help you.

Edit link

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

CEarl.2
Associate II

Cube version is 1.15.1.

 

Ill read over it, the first link says I don't have access to it though because of permissions?

 

KDJEM.1
ST Employee

Hello @CEarl.2 ,

I apologize for the wrong link. I edited it "Solved: MX_DMA_Init order in the main.c file generated by ... - Page 4 - STMicroelectronics Community." . In below the correct order:

 MX_GPIO_Init();
 MX_DMA_Init();
 MX_I2C2_Init();
 MX_DCMI_Init();

 Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.