cancel
Showing results for 
Search instead for 
Did you mean: 

DCMI Issues, looking for insight.

stbbrad3
Associate II
Posted on November 07, 2011 at 17:23

Hello everyone,

I have had a couple porblems resolved by sharing with the community here. I am now moving into the toughest part of my project. I am incorporating a Micron VGA CMOS Digital Image Sensor that I have previously had working on an 8051 through an Altera FPGA chip.

The image sensor only put out intersperesed 8 bit serial LVDS so I have it going through a de-serializer and all the signals look perfectly fine as expected. I have 1 byte of data the Pixel clock and H and V Syncs all wired into the STM3220g eval board, which has the F207IG on board.

Now that the quick introduction is out of the way. Let me get started out with what I am seeing. I have DMA setup to transfer a picture into SRAM and this is happening, except for the fact that all my image data is exactly the same. The DMA is transferring 0x04040404 into memory as that is all that is put in the data register. I know this is not all the data that the camera is putting out as it I have it setup in test mode putting out a grayscale image. I know that it is seeing something from the camera though as it is not getting anythign in the data register when i disconnect the camera.

I do notice some discrepencies between the memory map file and the reference manual from what I am actually seeing in the DCMI_SR. In Crossworks Studio I am seeing:

DRDY

CECS

SECS

CEIS

SEIS

Where in the reference manual it is showing:

FNE

VSYNCE

HSYNC

Has anyone else noticed these differences or know what the CECS,SECS, CEIS, SEIS may stand for?

The DRDY, CECS, and SECS flags are the onse being set. When DRDY is set so is CECS, and SECS is reset. When SECS is set, DRDY and CECS are reset.

Regarding my issue, I know I really didn't address with a question as I am a bit confused still with working with this DCMI. I will at keep everyone posted on my progress.

Please if you have any experience using DCMI and are willing to share I am willing to read!

Thanks,

Brad
47 REPLIES 47
Posted on June 26, 2012 at 21:23

Surely that should be

void DCMI_IRQHandler(void)

unless you've changed it in the vector table source
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
baris_togrul
Associate II
Posted on June 27, 2012 at 20:38

I tried as you suggest and finally interrupt occured but some wierd thing happend:) 

I enabled frame caprute interrupt to check it.I simply write toggle some pin as an interrupt function.The wierd thing is toggling periode is only 300ns.I expected some thing like 30ms(for 30fps)

I tried with different HS VS PCK polarities but i am not sure if it is the problem or not.

Thanks for your help..

stbbrad3
Associate II
Posted on June 27, 2012 at 20:53

Hello,

Do you have access to an oscilloscope? If possible look at VSYNC and HSYNC on there to confrm everythign is running as it should.

As far as the polarities I had to flip them in the DCMI initialization. Though the fram is valid when VSYNC is high, I had to configure it as

DCMI_InitStructure.DCMI_VSPolarity = DCMI_VSPolarity_Low;

baris_togrul
Associate II
Posted on June 28, 2012 at 10:20

hi h.brad :)

i mentioned before that i used a logic analyzer to check signals.Both of them seems ok to me.i have a vsync pulse at every 40ms and 176 pulse between every vsync (i am using B&W QCIF).But data is streaming when VSYNC is low and HSYNC is high

About polarities i configured sensor as default.so do you suggest that

DCMI_InitStructure.DCMI_VSPolarity = DCMI_VSPolarity_High;

DCMI_InitStructure.DCMI_HSPolarity = DCMI_VSPolarity_Low;

well what about pclk polarity?i read data sheet but could not find pclk polarity and data streaming relaition.

By the way still confused about interrupt periode :)

baris_togrul
Associate II
Posted on July 01, 2012 at 19:30

Well i made some progress.

Firstly i found that i have a problem with clearing pending bits and flags.

here final situation with signals.it seems fine.

http://spostimage.org/m80g77fwn/clk.jpg

I was collecting very meaningful data until i messed up my code:)

According to me DMA and DCMI is fine.but as

0690X0000060MllQAE.gifpredicted sensor configurations is problem.

Could any body give me 1bit shift test pattern and/or 8bit rgb configuration with qcif resolution?

i tried like this and always get 02020202020202 ( before i messed up it was logical data but i could not get it back :) )

{0x12, 0x80}, //reset all register

{0x40, 0x80}, //rgb 565 + full range

{0x12, 0x00}, //qcif + rgb

{0x11, 0x00}, //pll option

{0x6B, 0x20},//x2 PLL

{0x71, 0x35},//no test pattern

{0x70, 0x4A},//no test pattern

re
Associate II
Posted on July 04, 2012 at 02:11

Check your camera's manual register set. From what I checked form 7740's there is a register in where you set the clock, vsync and hsync polarities, maybe there's the same with your camera.

But from your image all data is on polarity high ;)

nakulrao
Associate II
Posted on August 11, 2012 at 13:54

hi everyone

Im working on stm3240g eval board. I have some issues regarding JPEG. I get low res images in other formats on the LCD as well as on the SD card. But when I edit the code for Jpeg format I dunno what exactly I get.The data i get I ma unable to display it on the screen. i transferred it to the sd card. but then its in hex format(no FAT). in case of BMP images, there are direct converters from hex to bmp. I dunno what I am supposed to do in case of JPEG images. Any ideas??

jeno
Associate II
Posted on July 17, 2013 at 23:41

Hallo!

I'm working with the same devices. Did you managed a working code?

If so, could you help me with dcmi-dma configuration?

Thanks,

Jeno