2025-03-19 11:48 AM - last edited on 2025-03-19 4:43 PM by Tesla DeLorean
Hello everyone.
I have some problems with the configuration of the OV5640 camera module and I need your help.
https://github.com/STMicroelectronics/stm32-ov5640
I am using the OV5640 library created by STM above. I have a card that I have drawn and with this card I get the image from the OV5640 camera and save it to the uSD card via SDRAM. But before I get the image, I am currently working on the configuration of the camera. I have never dealt with DCMI before and I do not know how to use the library written by STM. I do the configuration with I2C but when I use any function in the library, STM enters the hardfault handler
I think the problem is that I do not define which I2C I configure the camera with anywhere. The processor I use is STM32H743ZIT6 and I am trying to make the configuration using I2C1.
I2C_HandleTypeDef hi2c1;
HAL_I2C_Mem_Read(&hi2c1, DevAddress, MemAddress, MemAddSize, pData, Size, Timeout)
For example, in this function, reading is done by sending the hi2c1 handle to the function, but there is no such definition in the OV5640 library that I use and I think I need to do it somewhere but I don't know how to do it or the problem may not be caused by this at all.
Has anyone configured the OV5640 using this library before? If so, what are the solutions?
Thanks in advance.
2025-03-19 2:57 PM
Suggests the pointer you're handing the routines is invalid, or the transfer length is too long.
Make sure the I2C instance has been properly initialized before use. Look at other I2C examples for the H7
Check those first.
Have a functional Hard Fault Handler that can identify the specific code, and registers at the point of failure.
2025-03-19 3:10 PM
There is a little bit of an issue posting this here. First, it's an OmniVision camera, not an ST one. And although the people who support this Imaging sensor page (including me) are familiar with the STM32, we aren't quite as good as the STM32 support folks.
I'd suggest you post this to the STM32 page. Might get more answers.
- john
2025-03-19 4:44 PM
Thanks John, I've moved and retagged this.
I think this can be handled under STM32 HAL, I2C and DCMI related topics
2025-03-19 5:14 PM
Here you can find help with your STM32 project and debugging the program.
2025-03-19 5:32 PM