cancel
Showing results for 
Search instead for 
Did you mean: 

Fast IR camera data tranfer to computer

megahercas6
Senior
Posted on September 20, 2014 at 13:12

Hello,

I am working on projects that takes snapshot from camera, stores it to SRAM via DMA, and when process image by some mathematics, and calculate beam spot on sensor. And sends information to computer, where beam is.this part is simple.

Problems is, from time to time it would be good to send whole picture to computer ( to labview/mathlab) to see how our laser beam profile looks like. picture is exact 1024x1024 @10bits.

Right now i inly use FT2232D in spi mode, that can transfer data at 64b chunks, and whole transfer will take around 1s. since transfer will use processor time,as well as load sram, processor will not be able to do calculations, so ideally i want to transfer image to computer as fast as i can.

Second problem, this must work in labview/mathlab enviroment, and i am not that good with USB programming. Does any one have idea how to send image as fast as possible to computer with as little effort as possible ?

One idea is to use USB HS PHY (on board or external) but programing is a bit too difficult.

processor is STM32F429 running at 180MHz 144pin
4 REPLIES 4
stm322399
Senior
Posted on September 20, 2014 at 13:31

This is somehow similar to my project: taking snapshot from CCD sensor 1280*960*8bit (note that we use SDRAM, not SRAM), then do some math (JPEG compression!) and send outside.

We use LWIP network stack + LWFTP (hosted on github) to send JPEG images to server.

FTP transfer is fast, but a proprietary TCP/UDP might do a better job, if it is possible for you to use Ethernet.

megahercas6
Senior
Posted on September 20, 2014 at 14:35

Just tested how fast FT2232D SPI is, well, in read workd it gives 5,27Mbps, while ftdi states that it can go up to 30Mbps, i have no idea how they can say that, if at maximum spi clock frequency gap between two burst of  1024 chars  is very small.

(100us)

0690X00000605AFQAY.png

I still have ETH PHY in RMII mode left, but i have no idea how to write program in labview as well as stm32f429 to make it work

stm322399
Senior
Posted on September 22, 2014 at 09:17

No wonder that you cannot go faster than 5.27Mbps. The FT2232D DS says that using MPSSE (I assume this is the way SPI is configured), the maximum sustainable rate is 5.6Mbps. So you achievement is pretty good.

Well you nearly hit the max bandwidth of your device.

I don't known where you read about 30Mbps, but it can't be a sutainable rate as FT2232D is a full-speed device (12Mbps on USB). Maybe 30Mbps is the max SPI clock for a transfer with a limited amount of data, not very useful in your case.

megahercas6
Senior
Posted on September 22, 2014 at 14:25

Hi, thanks for answer.

One good thing about SPI communications is that i only use DMA in circular mode, so processor even don't know that he has communication with computer, data magically goes from one memory place to computer, and computer sends data to other memory place.

I ordered  DP83848 from ebay, and found LWIP programs from ST website, will try to use it as starting point. STM32F429 with SRAM, dcmi in 10b mode still has room for ETH PHY in MII Mode, but PCB design will have to use 4 layer pcb in that case, and that is 2x more expensive

I tested SRAM, it is 1/3 faster than SDRAM (36MHz vs 22MHz) and still don't know will it be fast enough for 48MHz PCLK