Camera, SMI, JPEG

Anything related to hardware, devices, drivers and how to use them with Ultibo.
pik33
Posts: 857
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Camera, SMI, JPEG

Postby pik33 » Sun May 12, 2019 6:14 am

The main problem with SMI is GPIO pins available (or rather not available) in RPi. Only 4 address lines are available on RPi GPIO which makes all this SMI stuff nearly unusable.
andrea.varesio
Posts: 4
Joined: Sat May 11, 2019 5:03 pm
Location: Italy
Contact:

Re: Camera, SMI, JPEG

Postby andrea.varesio » Sun May 12, 2019 6:52 am

I believe the lack of address lines is not an issue in cases, like video port connection, where a fifo is to be read. I have a single device providing 8 bit at each rising clock edge.

Do you have an hardware specification to be shared?

Andrea
Gavinmc42
Posts: 1586
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Camera, SMI, JPEG

Postby Gavinmc42 » Mon May 13, 2019 12:56 am

The goal is to interface directly a sensor (OV2640) to the RPI.

I have done this before on other chips at 26MHz

I have checked the data sheet and there is a DMA mode that can fetch from a single address and copy to a auto incremented address.
Setting the Alt GPIO mode as a parallel data inputs is easy enough.

Have not played with DMA enough to figure this out and I don't have any of the Arducams to try it with.

Mind you this is a useful thing to have, DMA GPIO to memory, because high speed ADC could turn a Pi into a CRO or without ADC a logic analyzer.
andrea.varesio
Posts: 4
Joined: Sat May 11, 2019 5:03 pm
Location: Italy
Contact:

Re: Camera, SMI, JPEG

Postby andrea.varesio » Mon May 13, 2019 2:51 am

I agree. But I lack infos on which GPIO can be used.

In BCM2835-ARM-Peripherals.pdf there are no infos on which gpio can be programmed to be an input clock or a strobe that latches data from the data bus.
In the IDE_TRIAL (https://github.com/fenlogic/IDE_trial) there seems to be only programmed I/O with an auxiliary fpga (no infos on the functionalities performed by the fpga): I believe the fpga detects a read request performed by raspberry on REn and generates an interrupt request.

In a post has been mentioned a pdf for the SMI hardware specification (https://github.com/fenlogic/documentati ... erface.pdf) no more available. Does anyone downloaded it?

The driver (https://github.com/raspberrypi/linux/bl ... 2835_smi.c) it is not clear to me as it works. it seems there is a programmed io read functionality that basically polls a RD signal to detect when (for example from a fifo) data is available. But it is also mentioned a paced DMA transfer. In the latter case it is not clear whether data is synchronous with an external clk (input into raspberry).

Andrea
Gavinmc42
Posts: 1586
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Camera, SMI, JPEG

Postby Gavinmc42 » Mon May 13, 2019 4:44 am

I have no idea why the pdf disappeared, but attached my copy.

ALT 1 for SMI mode, in nice low contrast colours ;)
https://elinux.org/RPi_BCM2835_GPIOs
This SMI mode also supports parallel data LCDs but I don't remember seeing anyone use it that way.

Interesting is ALT4 video input?
Attachments
Secondary Memory Interface.zip
(399.6 KiB) Downloaded 3 times
Gavinmc42
Posts: 1586
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Camera, SMI, JPEG

Postby Gavinmc42 » Mon May 13, 2019 4:49 am

Don't have a compute module but there is some readable SMI ALT1.
https://www.alliedelec.com/m/d/8b06433a ... 035f02.pdf
andrea.varesio
Posts: 4
Joined: Sat May 11, 2019 5:03 pm
Location: Italy
Contact:

Re: Camera, SMI, JPEG

Postby andrea.varesio » Mon May 13, 2019 5:59 am

Thanks a lot for smi pdf.
No way: SMI input is not designed to work with an external (input) synchronous clock. Strobe signal are generated by the raspberry.
I need to adapt, using an fpga and a memory, the synchronous output of the perhipheral with the rasperry-paced SMI reading.

Interesting ALT4 but no infos again. And in the compute module pdf video input (in the alt4 colum) disappeared.

Very annoying... a quite complete processor lacking of parallel synchronous data input interface.

Andrea
Gavinmc42
Posts: 1586
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Camera, SMI, JPEG

Postby Gavinmc42 » Mon May 13, 2019 6:37 am

Long time ago I used a cpu clock as a camera chip clock.
i2c comms commands and GPIO pins as triggers to hardware DMA.
Vsync out from the camera triggers the DMA capture cycle.
You can hold the sensor in reset until everything is setup.

I have used GPIO4 as a GPCLK0 output on Pi's, even the original Pi camera prototypes did it that way.
The Pi chips were designed to use parallel or CSI camera sensors.
RPF makes money from their cameras so ........

Return to “General”

Who is online

Users browsing this forum: No registered users and 0 guests