cancel
Showing results for 
Search instead for 
Did you mean: 

Question about dcmi dma on nucleo-h745

EsonShen
Associate II

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屏幕截图 2024-08-04 165451.png

My code(uvision5) below:

4 REPLIES 4
EsonShen
Associate II

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 171815.png

 

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.)

 

If you feel a post has answered your question, please click "Accept as Solution".

I have change the speed in code to very high

EsonShen
Associate II

I found there are data in dcmi DR register. I think it is a DMA problem