2024-08-04 01:56 AM
my task is to use a ov2640 camera to capture photo for further using(yolo model input),I've configure DMA DCMI for this task. Now the situation is the sccb communication with ov2640 is ok but when I start DMA to get the photo data I can't get the photo. It seems no write to my buffer. I get the data as same as I initialize the buffer(photo below:I initialized the image_buffer array {1,1,1,2,2,2} and the result didn't change).
My OV2640 Pins: GND SCL SDA RST PWDN DCLK NC D0-D7 VSNYC HREF
I have no sdcards or other extern memory devices connecting to my NUCLEO-H745ZI-Q
I have tried several successful program but got same result
My code(uvision5) below:
2024-08-04 02:18 AM
my connection:
Board-OV2640
PC6, PC7, PC8, PC9, PD3, PE4, PE5, PE6-D0, D1, D2, D3, D4, D5, D6, D7
PA4-HREF
PG9-VSYNC
PB6-SCL
PB7-SDA
PA6-DCLK
PD12-PWDN
PD13-RST
cubemx view:
2024-08-04 03:43 AM
At what speed you/DMA read (data clock)?
Because you have all pins at low speed setting, max. 3MHz working then.
Set speed matching the expected max. clock, maybe medium-low or medium-high (up to 110MHz). (Dont set highest speed, giving too much ringing.)
2024-08-04 03:45 AM
I have change the speed in code to very high
2024-08-04 03:46 AM
I found there are data in dcmi DR register. I think it is a DMA problem