gpdma

-deleted-
27 Jun 2012

hey guys! I'm trying to stream 'video' from a ls_y201 camera (jpeg) by constantly taking multiple photos. I tried editing the camera program and libraries to make it take pictures faster but could only get it down to 3.7 seconds for each picture. Felt that it could be a limitation of the 2MB flash on the mbed as it's pretty slow.

I'm trying to write the pictures to the ram directly to speed it up but I can't find any way/idea to do it.

Any ideas?

-deleted-
27 Jun 2012

whoops, should've set the topic name to "trouble with writing to ram" i don't suppose there is a way to edit the thread name is there?

27 Jun 2012

I wouldn't want to write to the mbed flash as it has a finite write cycle. And if it reaches that much write cycles, there is no guarantee that your mbed will still work reliably due to the flash being unreliable at this time (especially that the program code is loaded from the same flash).

Either way, if you wanted it written to RAM, you first need to know what the storage size of the image is. That will eventually determine if you have enough RAM to hold the image.

A cheap and easy way to do this is via an SDcard as they are really cheap this days. You can run petitFS on the mbed to have the image still readable from your computer, or you can write RAW without any filesystem.

There's also an option for SPI/I2C based SRAMs. They come in a variety of sizes and should be faster than writing to an SDcard (compromise on storage space).

-deleted-
27 Jun 2012

Herson Bagay wrote:

I wouldn't want to write to the mbed flash as it has a finite write cycle. And if it reaches that much write cycles, there is no guarantee that your mbed will still work reliably due to the flash being unreliable at this time (especially that the program code is loaded from the same flash).

Either way, if you wanted it written to RAM, you first need to know what the storage size of the image is. That will eventually determine if you have enough RAM to hold the image.

A cheap and easy way to do this is via an SDcard as they are really cheap this days. You can run petitFS on the mbed to have the image still readable from your computer, or you can write RAW without any filesystem.

There's also an option for SPI/I2C based SRAMs. They come in a variety of sizes and should be faster than writing to an SDcard (compromise on storage space).

wow that's a very good point, didn't think of that before.

hmm... well what do you think about having the mbed just transfer the file from the camera to an output immediately? As I plan to broadcast the 'video' on wifi (using a wifly breakout) which is connected to the mbed as well, I know there are such things as P2M and M2P techniques but is it possible to do a P2P(peripheral to peripheral)?

27 Jun 2012

Well you transfer serial data from the camera directly to the wifi via some DMA voodoo consistent of the message interface of the wifi board.

as far as I know, the camera is serial and the wifly is SPI so you can do direct DMA transfer the moment you received a "start of frame" char from camera. Im not too familiar with how the wifi board works and how you initiate a data transfer so I can't really comment on how to do it. I do have some low level code for DMA tranfer from a serial port.

-deleted-
28 Jun 2012

oh okay, cool! would you mind showing me some of that code?