-
Where did you get the camera module(s)?
Robotshop -
Model number of the product(s)?
5 MP Plus OV5642 -
What hardware/platform were you working on?
STM32F746ZG Nucleo Board -
Instructions you have followed. (link/manual/etc.)
Arducam Chip - Arducam
Understanding the SPI Bus timing on Arducam mini camera - Arducam
https://arducam.com/downloads/shields/ArduCAM_Mini_5MP_Plus_OV5642_Camera_Module_Hardware_Application_Note.pdf
- Started SPI and I2C (Using HAL library)
- Checked if ArduCamp SPI bus is OK (written command 0x80 with data 0x55 and then read it, received same values, i get SPI is ready)
- Checked if the camera module type is OV5642 (Read register 0x300A and it is 0x56, read register 0x300B and it is 0x42)
- Set format to JPEG
- Configured JPEG capture and image size.
- Wrote register 0x03 bit[1] = 1 for VSYNC active low (also tried with value high)
- Cleared fifo flag
- Write register 0x01 to take a single photo (value read and the wrote at command 0x83 the value (read value & 0xFC) to set the camera to take a single picture)
- Flushed fifo and cleared fifo flag
- Wrote command 0x04 bit[1] = 1 to “start capture”
- Waited for register 0x41 bit[3]: “camera capture done flag” to be up
I have modified provided example for STM32F103 at GitHub - ArduCAM/STM32 to use SPI and I2C with HAL libraries
-
Problems you were having?
ARDUCHIP_TRIG(0x41) is never set to CAP_DONE_MASK(0x08) after start capture… rather it is always 0x01…
condition i am using to evaluate this…
while(1)
{
uint8_t arduchip_trig = read_reg(ARDUCHIP_TRIG);
if ((arduchip_trig & CAP_DONE_MASK) == CAP_DONE_MASK)
{
printf(“Capture successful.\r\n”);
break;
}
} -
The dmesg log from your hardware?
Testing Camera
SPI is ready
ACK CMD OV5462 detected
ACK CMD switch to OV6542_640x480
ACK CMD CAM start single shoot -
Troubleshooting attempts you’ve made?
all write and read functions are proofread by logic analyzer… it is working fine… -
What help do you need?
Could you please help with probable causes why register 0x41 Bit 3 is never set and what i may be doing wrong with above steps…
Thanks.