2008-11-30 11:42:08     DMA and PPI related questions.

Document created by Aaronwu Employee on Aug 9, 2013
Version 1Show Document
  • View in full screen mode

2008-11-30 11:42:08     DMA and PPI related questions.

andy (UNITED STATES)

Message: 66039   

 

I have loaded uclinux onto the SRV platform:

 

http://www.surveyor.com/blackfin/

 

The srv source code already provided runs on the bare hardware. I am trying to port that code onto the linux platform. I am modifying the existing bfin_ppifcd driver in uclinux distribution to suit the needs. I have made sure that the dma and ppi settings are exactly the same except that I am using the dma in stop while srv is using flow mode. Also am using the exact same camera register settings. The images am getting are not good. Am just looking at the Y channel for now. My question is what could be different/wrong here?

 

The ppi and dma settings are exactly the same except for the mode. The camera register settings are the same. I dont think that flow mode could be a problem as in stop mode only when there is a vsync it would interrupt and cause the dma transfer from the ppi. Hence the dma transfers would be in sync right?

QuoteReplyEditDelete

 

 

2008-11-30 12:06:42     Re: DMA and PPI related questions.

andy (UNITED STATES)

Message: 66040   

 

Could it be that when am trying to read from certain pixels in the RAM the DMA is also writing to the same RAM locations and hence the values are screwed up?

QuoteReplyEditDelete

 

 

2008-11-30 12:11:20     Re: DMA and PPI related questions.

Frank Van Hooft (CANADA)

Message: 66041   

 

What do you mean by your images being "not good"?  What's wrong with them?

 

Usually the first thing you want to confirm is that your image is of the correct size (width & height) - this will allow you to confirm you're receiving the correct number of bytes from the PPI port.

QuoteReplyEditDelete

 

 

2008-11-30 12:27:33     Re: DMA and PPI related questions.

andy (UNITED STATES)

Message: 66043   

 

I have checked for the image width and height. They are correct. Here is a link to the images that I get.

 

http://picasaweb.google.com/7thharmonic/9655?authkey=wfZOLo91qbA#

 

As you can see there exist dark paches in the image. Check out image 4. Image 4 was taken 10 seconds after initializing the camera while image 1 was taken 2 seconds after initialization. Over time the image keeps getting worse.

 

 

QuoteReplyEditDelete

 

 

2008-11-30 15:13:42     Re: DMA and PPI related questions.

Frank Van Hooft (CANADA)

Message: 66046   

 

See how your back patches are occurring in bright parts of the image? That suggests to me that you have an overflow problem. For example, if you're grabbing 8 bit data from a 10-bit output, you'll get values 0x00 - 0xff correctly. But when the sensor outputs 0x100, if you're only grabbing the low 8 bits, you'll read 0x00, so you'll see black.

 

So check your bus widths, your PPI port settings, and how you're passing around the image data within your code once you've grabbed it from the PPI port.

QuoteReplyEditDelete

 

 

2008-12-01 04:01:19     Re: DMA and PPI related questions.

Michael Hennerich (GERMANY)

Message: 66060   

 

the SRV platform uses the Blackfin v4l Camera driver and not the bfin_ppifcd char driver.

 

-Michael

QuoteReplyEditDelete

 

 

2008-12-05 03:22:51     Re: DMA and PPI related questions.

Martin Strubel (SWITZERLAND)

Message: 66379   

 

Hi Andy,

 

 

 

you may want to check this link:

 

http://www.surveyor.com/cgi-bin/yabb2/YaBB.pl?num=1227614339

 

There's a link to a kernel image and a patch for the sources, applying the proper changes to the OV9655. Actually, it's just a port of Howard Gordon's JPEG code to the v4l model.

 

You should get a clean image out with the described method. The OV9655 is a beast to configure - not well documented. So the ov9655.c is pretty empty, actually, I think that sensor configuration shouldn't go into kernel space. It's easy to access the sensor over the i2c functions from userspace.

 

Greetings,

 

- Martin

Attachments

    Outcomes