using the intel Edison i find that it executes programs very slowly, like in a recursive loop for example,
like this simple while loop :
it prints out very slowly, like one output per second like that.
this is a concern for me as i want to use the GPIO using MRAA to capture data from an ov7670 camera with a pixel clock of only 8MHz, nothing too much considering the Intel Atom CPU operates at 500MHz and even the Quark micro-controller in there operates at 100MHz, which is way faster than the 16MHz that an arduino uno runs on(that the ov7670 is supposedly used for, which i think isnt a prroblem for the uno to execute without much problems as the uno is a microcontroller, which is without an operating system in it, therefore it has no scheduling of other programs to slow the execution of an arduino program)
is this due to the default processor scheduling priority for C++ executables in the intel edison or something like that?
and how do i overcome this very interesting problem ?
I don't think so, I have been doing base64 encoding/decoding at about 150MB/s (1 thread) and 300MB/s (2 threads) https://github.com/aklomp/base64 https://github.com/aklomp/base64 and crc32 at 2GB/s (1 thread) https://github.com/htot/crc32c https://github.com/htot/crc32c, which are a bit more computation intensive than your code above. It is probably related to printing tmpt.
I think you might be connected over the serial port and printing the data over that? (115kbd = about 11kb/s)?
If you connect with ssh over wifi you should be getting better results.
We have connected a USB/ETH chip and iperf is showing we are getting 80MB/s which is even better.
Thanks Ferry and Sergio
Yes i have tried using SSH to display the value, and indeed it is noticeably faster.
However the recursive loop was just a small aspect of the issue, this is more of an issue with the GPIO using MRAA not reading data fast enough to be captured, by the edison.
My thougts to overcome this problem (if it is indeed a problem and the edison cant read the pixels off of the ov7670 because it is too fast) is by using the internal MCU or a PIC MCU to capture the data, pixel by pixel, form a complete image image and then send it as a whole image to the intel edison. is this a sound idea or just simply a waste of time approaching ths problem using a microcontroller unit ?
documentation on the ov7670 camera can be found here: http://embeddedprogrammer.blogspot.my/2012/07/hacking-ov7670-camera-module-sccb-cheat.html http://embeddedprogrammer.blogspot.my/2012/07/hacking-ov7670-camera-module-sccb-cheat.html
That I wouldn't know. Maybe when using mmapped IO you will get better results?
I just had a quick look at your datasheet and it seems you would best have a DMA channel. I don;t think the GPU has this, and the embedded MCU is not documented at that level.